#!/bin/bash
# p3 - PDF helper
set -e
source "/home/zwelch/src/mcf/mcsh-release/install/share/mcsh/mcsh.sh"
lib_load 'doc/pdf'
######
# PDF CLI
p3_cat() { pdf_cat "$@"; }
p3_burst() { pdf_burst "$@"; }
p3_stamp() { pdf_stamp "$@"; }
p3_overlay() { pdf_overlay "$@"; }
p3_encrypt() { pdf_encrypt "$@"; }
p3_decrypt() { pdf_decrypt "$@"; }
p3_fairuse() { pdf_fair_use "$@"; }
p3_join() { pdf_join "$@"; }
p3_page() { cmd_dispatch "$@"; }
p3_page_count() { for_each pdf_page_count "$@"; }
######
# Main
p3_desc() { echo "PDF helper"; }
p3_usage() {
cat <<USAGE
<cmd> ...
PDF Commands:
cat <src> <dst> <pages> Extracts page ranges
burst <src> <dir> Extracts each page as file in dir.
stamp <src> <dst> <overlay> Stamps page with an overlay page
overlay <src> <dst> <overlay> Stamps pages with overlay pages
encrypt <src> <dst> <passwd> Encrypts document with a password
decrypt <src> <dst> <passwd> Decrypts password-protected document
fairuse <src> <dst> Decrypts protected document (fair use)
join <dst> <src>+ Concatenates files together
page ... PDF page commands
USAGE
}
app_run "$@"
Generated on Fri Jul 28 14:34:28 PDT 2017 by mcsh d14 v0.23.0.