aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: fd48708593b8e0865fe0f3fa3efceceeaec533ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Crane

Crane is a literature download and organization web service. Paper and metadata
download is possible for (nearly) every open-access journal which satisfies
citation HTML `<meta>` tags, journals supported by sci-hub, and direct download
links.

Goals of the project are to be minimal, support data portability (no databases
or app-proprietary formats), and secure. Paper "categories" are simply
directories created on the filesystem, and paper metadata is derived from
[doi.org](https://www.doi.org/) or `<meta>` tags and written to disk as XML.

A read-only demo instance can be [found here](https://r.jordan.im/).

## Installation

Crane can be compiled with `make` or `go build`, and installed system-wide by
running `make install` with root-level permissions.

## Usage

Crane can be run locally or on a server. The index (`"/"`) endpoint lists papers
but does not permits modification to the set. The admin (`"/admin/"`) endpoint
supports optional authentication and permits paper download, deletion, and
moving between categories, as well as category addition, deletion, and rename.

```
Usage of ./crane:
  -host string
        IP address to listen on (default "127.0.0.1")
  -port uint
        Port to listen on (default 9090)
  -path string
        Absolute or relative path to papers folder (default "./papers")
  -sci-hub string
        Sci-Hub URL (default "https://sci-hub.hkvisa.net/")
  -user string
        Username for /admin/ endpoints (optional)
  -pass string
        Password for /admin/ endpoints (optional)
```

By default, crane listens on `127.0.0.1:9090` but this is configurable with the
`--host` and `--port` parameters. Authentication is optional but can be enabled
with `--user` and `--pass` parameters; the index is always publicly accessible.

Papers are written to `--path`, stored in directories which serve as paper
categories.