aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rw-r--r--fullpdf2
-rw-r--r--fullpdf.py1
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"`
diff --git a/fullpdf b/fullpdf
new file mode 100644
index 0000000..de56fa7
--- /dev/null
+++ b/fullpdf
@@ -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/","/"))