tREADME - scholarref - tools for DOI and BiBTeX reference extraction, fetching, and parsing
(HTM) git clone git://src.adamsgaard.dk/scholarref
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tREADME (4630B)
---
1 # scholarref
2
3 POSIX shell tools to extract, fetch, and parse DOIs and BiBTeX bibliography
4 references. The following scripts provide the core functionality:
5
6 - getdoi: takes a file or a search query and returns its DOI
7 - getref: takes a DOI and returns the corresponding BiBTeX entry
8 - shdl: takes a DOI and fetches the corresponding pdf from sci-hub.tw
9 - jabbrev: returns journal names in abbreviated form
10
11 The script `scholarref` is an example where `getref` and `getdoi` are
12 combined to obtain a BiBTeX entry from a search query or a PDF. The
13 `articlesearch` script is an interactive PDF opener, reference manager,
14 and publication fetcher for X11 using dmenu[0] and the above tools.
15
16 A blog post detailing the tool background and usage:
17 https://adamsgaard.dk/scholarref.html
18
19 DISCLAIMER:
20 The functionality provided by these programs depends on communication
21 with third party webpages, which may or may not be permitted by law and
22 the terms of service upheld by the third parties. What is demonstrated
23 here is an example only. Use of the tools is entirely under your own
24 responsibility.
25
26 ## Installation
27 Use locally or run `make install` to install under `/usr/local`. Run
28 `make uninstall` to remove.
29
30 ## Author
31 Anders Damsgaard <anders@adamsgaard.dk> and others. See AUTHORS file.
32 Main repository: https://src.adamsgaard.dk/scholarref
33 The getdoi script is inspired by Luke Smith.
34
35 ## Contributing
36 Please send patches by e-mail to anders@adamsgaard.dk
37
38 ## License
39 ISC licensed, see LICENSE for details.
40
41 ## Usage
42 usage: getdoi [OPTIONS] QUERY
43 returns the publication DOI from http://api.crossref.org/works
44 where QUERY can consist of publication title, author, DOI, ORCID id,
45 or a PDF file. In case a file is specified, getdoi will attempt to
46 extract the DOI from it.
47 If no QUERY is specified, this program will expect a QUERY as stdin.
48
49 OPTIONS are one or more of the following:
50 -h, --help show this message
51 -v, --version show version and license information
52 -V, --verbose show verbose information
53 -t, --tor-socks use torsocks for HTTP requests
54 -n, --notify send result as desktop notification
55 -N, --number NUM return NUM results (default 1)
56 -c, --clip paste DOI to clipboard (requires xclip)
57 -o, --open open DOI as url in browser
58 -- do not consider any following args as options
59
60 usage: getref [OPTIONS] [DOIs ...]
61 will attempt to get a BibTeX citation from https://doi.org
62 If no DOIs are specified, this program will expect DOIs as stdin.
63
64 OPTIONS are one or more of the following:
65 -h, --help show this message
66 -v, --version show version and license information
67 -V, --verbose show verbose information
68 -t, --tor-socks use torsocks for HTTP requests
69 -j, --full-journal return full journal name in citation
70 -a, --full-author do not shorten author names
71 -n, --no-newline suppress trailing newline but prepend with newline
72 -N, --notify send desktop notification when complete
73 -- do not consider any following args as options
74
75 usage: shdl [OPTIONS] [DOIs ...]
76 will fetch each DOI from http://sci-hub.tw
77 If no DOI is specified, this program will expect DOIs as stdin.
78 The program extracts the DOI if a full doi.org URL is passed to it.
79 If the PDF download fails, e.g. due to captias, a tor-browser or
80 alternatively the system default browser will open sci-hub.
81
82 OPTIONS are one or more of the following:
83 -h, --help show this message
84 -v, --version show version and license information
85 -V, --verbose show verbose information
86 -t, --tor-socks use torsocks for requests to sci-hub
87 -b, --browser open sci-hub in browser immediately
88 -r, --reference add reference to bibliography using scholarref
89 -n, --notify send desktop notification when complete
90 -o, --open open downloaded document when complete
91 -- do not consider any following args as options
92
93
94 usage: jabbrev [OPTIONS] [QUERY]
95 returns a journal title abbreviation. If QUERY is not specified, an
96 interactive dmenu(1) prompt for searching the abbreviation list.
97
98 OPTIONS are one or more of the following:
99 -h, --help show this message
100 -v, --version show version and license information
101 -n, --notify send result as desktop notification
102 -c, --clip send abbreviation to clipboard (requires xclip)
103 -- do not consider any following args as options
104
105 Known bug: Unabbreviated words are also given a trailing dot.
106
107 ## References
108 0: https://tools.suckless.org/dmenu/