Skip to content

Commit

Permalink
Adds pdftotext-all() function
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Apr 3, 2024
1 parent 2ce8010 commit 31ad72e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .functionsrc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ deflate() {
printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat -- - $1 | gunzip
}

# Convert PDFs into a simple HTML file.
# Usage: pdftotext-all (dir)
pdftotext-all() {
find "${1:-.}" -name "*.pdf" -execdir [ ! -f "{}.txt.html" ] ';' -print0 | xargs -0 -t -I% -P8 pdftotext -htmlmeta "%" "%.txt.html"
}

# Convert svn branches and tags into git.
# Usage: svn2git
# See: http://stackoverflow.com/q/2244252/55075
Expand Down

0 comments on commit 31ad72e

Please sign in to comment.