Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 articles

Flags:
-h, --help help for search

Use "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 PDF

Flags:
-h, --help help for get

Use "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 PDF

Usage:
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
```