-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add funciton of hosting a pdf file on local computer
- Loading branch information
Showing
2 changed files
with
21 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
pdfjs-broker | ||
--- | ||
CLI-tool which opens a pdf file specified by command line argument in the form of URI with pdf.js. | ||
CLI-tool which opens a pdf file specified by command line argument in the form of URL or local filepath with pdf.js. | ||
|
||
# Requirements | ||
- docker environment | ||
- docker environment (You have to be able to execute docker commands without `sudo`) | ||
- Python 3 (>=3.6) | ||
|
||
# Installation | ||
1. `$ git clone {this repository}` | ||
1. `$ cd pdfjs_server_url && docker build -t pdfjs_url .` | ||
1. Add $BROWSER={your browser you want to use for reading pdf} to environment variable | ||
1. `$ ln -s {/foo/broker.py} /usr/local/bin/pdfjs | ||
1. `$ cd ../pdfjs_server_file && docker build -t pdfjs_file .` | ||
1. Add $BROWSER={your browser you want to use for reading pdf files} to environment variable | ||
1. `$ ln -s {/foo/broker.py} /usr/local/bin/pdfjs` | ||
|
||
# Usage | ||
`$ ./broker.py {URL of pdf file you want to read}` | ||
|
||
*I recommend setting the alias to `broker.py`* | ||
`$ pdfjs [-u <URL of a pdf file> | -f <pdf file path>]` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters