1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

feat: add some scripts for reading pdfs

This commit is contained in:
2021-11-19 13:40:32 +01:00
parent c0efacd6ce
commit 06125303b8
2 changed files with 17 additions and 0 deletions

6
.bin/sample-pdf.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
filepath="$(shuf --head-count=1)"
pages="$(pdfinfo "$filepath" | awk '/^Pages:/{print $2}')"
random_page="$(shuf --input-range="1-$pages" --head-count=1)"
zathura --page="$random_page" "$filepath"