diff options
author | Anthony Wang | 2022-07-19 12:09:33 -0500 |
---|---|---|
committer | Anthony Wang | 2022-07-19 12:09:33 -0500 |
commit | 32386d81e36f09044be982275d62ba51674ebf7e (patch) | |
tree | bbc919b71d38ceaba3ec09c851cc0dd28b213d22 | |
parent | a69632ec558f0cf3aff1743b7a26b9b4a925ab71 (diff) |
Delete print-duplex script
-rwxr-xr-x | .local/bin/print-duplex | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/.local/bin/print-duplex b/.local/bin/print-duplex deleted file mode 100755 index ac6c060..0000000 --- a/.local/bin/print-duplex +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -# @see: https://opensource.com/article/20/4/print-duplex-bash-script#!/bin/bash - -# take any PDF file and print the odd pages first -# THEN, ask the user to put the paper back in the printer, face down -# THEN, print even pages - -# take the default printer from the cups configuration -# OR manually set it -_PRINTER="HP_LaserJet_1022" -#_PRINTER=$(grep DefaultPrinter -i /etc/cups/printers.conf | awk {'print$2'} | sed -e "s/>//") - -if [ "$#" -lt "1" ] -then - echo -e "Document to print is required." - exit 1 -fi - -_DOCUMENT_COUNT=$# -_INDEX=1 - -_print() { - lpr -P $_PRINTER -o $@ "$_DOCUMENT" -} - -_log() { - echo ${_DOCUMENT} - $1 -} - -_print_document() { - _log "Printing even pages" - _print page-set=even -o outputorder=reverse - - _log "Place paper back into the printer in EXACT OUTPUT ORDER (face down in tray) then press ENTER" - read _IS_DONE - - _log "Printing odd pages" - _print page-set=odd -o orientation-requested=6 -} - -_wait_between_documents() { - if [ "$_INDEX" -lt "$_DOCUMENT_COUNT" ] - then - _log "Press ENTER when document is finished printing ($_INDEX) $_DOCUMENT_COUNT" - read _IS_DONE - - ((_INDEX++)) - fi -} - -for _DOCUMENT in $@ -do - _print_document - _wait_between_documents -done |