extcite
gets DOIS and generates citations for papers
gem install extcite
git clone [email protected]:sckott/extcite.git
cd extcite
rake install
if
rake install
fails, trysudo rake install
. If that fails, open an issue with whatrake install --trace
gives you
require 'extcite'
A single paper
require 'net/http'
File.write("foo.pdf", Net::HTTP.get(URI.parse("https://scottchamberlain.info/pdfs/GuoEtal2015PlosOne.pdf")))
Extcite.extract(path: 'foo.pdf')
bib citation is written to a file given in file
param
Many papers at once
Dir.mkdir('bar')
File.write("bar/foo1.pdf", Net::HTTP.get(URI.parse("https://scottchamberlain.info/pdfs/Chamberlain&Szocs2013F1000Research.pdf")))
File.write("bar/foo2.pdf", Net::HTTP.get(URI.parse("https://scottchamberlain.info/pdfs/GuoEtal2015PlosOne.pdf")))
Extcite.extract(path: 'bar')
All pdfs in the current directory:
extcite extract .
Single paper
extcite extract foo.pdf