diff options
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | fullpdf | 2 | ||||
| -rw-r--r-- | fullpdf.py | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..2f63ed8 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +> very intuitive name btw + +One liner tool to open the full pdf resource from a Github repo, without having to save to disk or clicking 'load more pages'. + +# Usage + +pick your poison, does the same thing + +## Python + +`python3 fullpdf.py "https://github.com/user/repo/blob/main/file.pdf"` + +## Bash + +`chmod +x fullpdf && ./fullpdf "https://github.com/user/repo/blob/main/file.pdf"` @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo "${1/github.com/raw.githubusercontent.com}" | sed 's|/blob/|/|' diff --git a/fullpdf.py b/fullpdf.py new file mode 100644 index 0000000..795b3d8 --- /dev/null +++ b/fullpdf.py @@ -0,0 +1 @@ +import sys; print(sys.argv[1].replace("github.com","raw.githubusercontent.com").replace("/blob/","/")) |
