mseri / doi2bib Goto Github PK
View Code? Open in Web Editor NEWSmall CLI to get a bibtex entry from a DOI, an arXiv ID or a PubMed ID
License: MIT License
Small CLI to get a bibtex entry from a DOI, an arXiv ID or a PubMed ID
License: MIT License
Some authors do not upload their DOI to arXiv but only the journal reference.
In this case it would be nice to be able to generate the correct journal bibtex.
It could be done from the journal reference (which would be messy and complicated), or one could use the presence of the journal reference to try and find the DOI, then use the DOI to get the bibtex entry.
Modify the CLI to accept multiple IDs from the command line or to read them from a file (separated by either spaces or newlines)
The bibtex entry returned by crossref has the doi url usually percent-escaped, but % is a comment in latex.
E.g.
$ doi2bib 10.1007/s10569-019-9946-9
@article{Bravetti_2020,
doi = {10.1007/s10569-019-9946-9},
url = {https://doi.org/10.1007%2Fs10569-019-9946-9},
year = 2020,
month = {jan},
publisher = {Springer Science and Business Media {LLC}},
volume = {132},
number = {1},
author = {Alessandro Bravetti and Marcello Seri and Mats Vermeeren and Federico Zadra},
title = {Numerical integration in Celestial Mechanics: a case for contact geometry},
journal = {Celestial Mechanics and Dynamical Astronomy}
}
we should parse the URL url = {https://doi.org/10.1007%2Fs10569-019-9946-9},
and unescape it. Until now I have encountered %2F
, %28
and %29
, i.e. /
, (
, )
, but <>:;
are also allowed in valid DOIs.
I want to experiment with nix cross-compilation as @anmonteiro recommended in discuss.
I created my own repo with the same contents as this repo but Nix build is unable to download 'https://github.com/anmonteiro/lwt_ssl/archive/e68d8aab.tar.gz' and fails. There is a chance, that if you rerun your actions in this repo, they will fail too.
How should I get working nix-based cross compilation?
Run nix build -L .#arm64-musl
nix build -L .#arm64-musl
shell: /usr/bin/bash -e {0}
copying path '/nix/store/y9[2](https://github.com/Kakadu/test-nix-ocaml/actions/runs/6024767254/job/16344135144#step:4:2)sva1921n1vczhqidc9nljfnsp2wyy-source' from 'https://cache.nixos.org'...
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'ocaml4.14.0-doi2bib-n-a-aarch64-unknown-linux-musl'
whose name attribute is located at /nix/store/y92sva1921n1vczhqidc9nljfnsp2wyy-source/pkgs/stdenv/generic/make-derivation.nix:270:7
… while evaluating attribute 'OCAMLFIND_CONF' of derivation 'ocaml4.14.0-doi2bib-n-a-aarch64-unknown-linux-musl'
at /nix/store/rljyx9nvvi9c662c8d8mvvdd4ys60q8j-source/cross/ocaml.nix:140:1[3](https://github.com/Kakadu/test-nix-ocaml/actions/runs/6024767254/job/16344135144#step:4:3):
139|
1[4](https://github.com/Kakadu/test-nix-ocaml/actions/runs/6024767254/job/16344135144#step:4:5)0| OCAMLFIND_CONF = oself.makeFindlibConf args;
| ^
141| buildPhase = ''
(stack trace truncated; use '--show-trace' to show the full trace)
error: unable to download 'https://github.com/anmonteiro/lwt_ssl/archive/e[6](https://github.com/Kakadu/test-nix-ocaml/actions/runs/6024767254/job/16344135144#step:4:7)[8](https://github.com/Kakadu/test-nix-ocaml/actions/runs/6024767254/job/16344135144#step:4:9)d8aab.tar.gz': HTTP error 404
response body:
Not Found
Error: Process completed with exit code 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.