From 6c7d722852d3e52abb24509283cc27828b7ae15c Mon Sep 17 00:00:00 2001 From: n0tori <188390306+n0tori@users.noreply.github.com> Date: Sat, 9 May 2026 21:54:35 +0100 Subject: tools --- README.md | 15 +++++++++++++++ fullpdf | 2 ++ fullpdf.py | 1 + 3 files changed, 18 insertions(+) create mode 100644 README.md create mode 100644 fullpdf create mode 100644 fullpdf.py 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/","/")) -- cgit v1.2.3