Better default for \$PDFSHARE and clarify its meaning in usage text

This commit is contained in:
Rob Pearce 2022-07-10 11:42:52 +10:00
parent 5ffa23ed10
commit af248a98e4
1 changed files with 6 additions and 3 deletions

9
scan
View File

@ -90,17 +90,20 @@ function is_mounted() {
function usage() {
echo "usage: $0 [OPTIONS] filename tag1 [tag2] [tag3] ... [tagX]"
echo ""
echo " Scans to: \$PDFDIR/tag1/<year>/filename"
echo " Creates symlinks in:"
echo " 1. Mounts \$PDFSHARE to \$PDFDIR"
echo " 2. Scans to: \$PDFDIR/tag1/<year>/filename"
echo " 3. Creates symlinks in:"
echo " \$PDFDIR/tag2/<year>/filename"
echo " \$PDFDIR/tag3/<year>/filename"
echo " ...etc..."
echo ""
echo " OPTIONS"
echo " -d scan in duplex mode"
echo " -f xxx for given tag, use financial year in path rather than calendar year"
echo " -h show this text"
echo " -l list all available scanners"
echo " -m multi-page mode (prompts to load new pages each time)"
echo " -M mount \$PDFSHARE to \$PDFDIR then exit"
echo " -o use ocrmypdf to straighten document, extract text into pdf and use tags as keyword metadata"
echo " -O xxx specify path to ocrmypdf"
echo " -p preview document after scanning"
@ -116,7 +119,7 @@ P2TPROG="pdftotext"
DUPLEXOPTS=""
MODE="scan"
DIR=${PDFDIR:-"~/Documents"}
SHARE=${PDFSHARE:-"//rob@nas.nethack.net:/pdfs"}
SHARE=${PDFSHARE:-"//user@smbhost.example.net:/pdfs"}
SCANNEROPTS=""
MULTIPAGE=0
OCR=0