Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lehigh-university-libraries/homebrew-papercut
Command line utility to help fetch papers from various sources.
https://github.com/lehigh-university-libraries/homebrew-papercut
Last synced: 3 days ago
JSON representation
Command line utility to help fetch papers from various sources.
- Host: GitHub
- URL: https://github.com/lehigh-university-libraries/homebrew-papercut
- Owner: lehigh-university-libraries
- License: apache-2.0
- Created: 2023-06-13T12:24:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-03T13:07:43.000Z (8 months ago)
- Last Synced: 2024-04-04T12:27:58.510Z (8 months ago)
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Papercut CLI
Command line utility to help fetch scholarly articles from various sources.
## Install
### Homebrew
You can install papercut using homebrew
```
brew tap lehigh-university-libraries/papercut
brew install papercut
```### Download Binary
Instead of homebrew, you can download a binary for your system from [the latest release](https://github.com/lehigh-university-libraries/homebrew-papercut/releases/latest)
Then put the binary in a directory that is in your `$PATH`
## Usage
### Search
```
$ papercut search --help
Search various sources for articles.A subcommand is required in order to search a specific database.
Usage:
papercut search [command]Available Commands:
arxiv Search arXiv for articlesFlags:
-h, --help help for searchUse "papercut search [command] --help" for more information about a command.
```#### arXiv
```
$ papercut search arxiv --help
Search arXiv for articles.Thank you to arXiv for use of its open access interoperability.
Usage:
papercut search arxiv [flags]Flags:
--directory-listing string URL to a web page listing faculty email addresses
-h, --help help for arxiv
-i, --ids string A comma separated list of arXiv IDs
-q, --query string The arXiv API search query to perform
-r, --results int The number of results to return in a response (default 10)
-s, --start int The offset
-u, --url string The arXiv API url (default "https://export.arxiv.org/api/query")
```### Get
```
$ papercut get --help
Fetch PDFs and/or metadata for articles.A subcommand is required in order to fetch the article from a specific source.
Usage:
papercut get [command]Available Commands:
doi Get DOI metadata and PDFFlags:
-h, --help help for getUse "papercut get [command] --help" for more information about a command.
```#### DOI
Download the metadata and PDFs given a file with one DOI per line.
```
$ papercut get doi --help
Get DOI metadata and PDFUsage:
papercut get doi [flags]Flags:
-f, --file string path to file containing one DOI per line
-h, --help help for doi
-u, --url string The DOI API url (default "https://dx.doi.org")
```## Updating
### Homebrew
If homebrew was used, you can simply upgrade the homebrew formulae for papercut
```
brew update && brew upgrade papercut
```### Download Binary
If the binary was downloaded and added to the `$PATH` updating papercut could look as follows. Requires [gh](https://cli.github.com/manual/installation) and `tar`
```
# update for your architecture
ARCH="papercut_Linux_x86_64.tar.gz"
TAG=$(gh release list --exclude-pre-releases --exclude-drafts --limit 1 --repo lehigh-university-libraries/homebrew-papercut | awk '{print $3}')
gh release download $TAG --repo lehigh-university-libraries/homebrew-papercut --pattern $ARCH
tar -zxvf $ARCH
mv papercut /directory/in/path/binary/was/placed
rm $ARCH
```