add unscan and dispatch command
This commit is contained in:
parent
1391b72c26
commit
498aba165e
1 changed files with 6 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ resolution='300'
|
|||
current_page=$(find "$PWD" -name "out*.pdf" | sort | tail -n 1);
|
||||
read -r current_pageno <<<"${current_page//[^0-9]/ }"
|
||||
current_pageno=${current_pageno:-0}
|
||||
last_out_file="out$current_pageno.pdf"
|
||||
next_out_file="out$((current_pageno+1)).pdf"
|
||||
|
||||
scan() {
|
||||
|
|
@ -74,13 +75,17 @@ scan() {
|
|||
--resolution="$resolution" \
|
||||
--source="$sides" \
|
||||
-x 210 -y 297 # A4
|
||||
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
scan)
|
||||
scan "${@:2}"
|
||||
;;
|
||||
unscan)
|
||||
rm "$current_pageno"
|
||||
;;
|
||||
dispatch)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: scanbuddy"
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue