-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
the last line of the PDF produced by paperbackup is:
See https://github.com/intra2net/paperbackup/ for instructions
... that's great, but it's not that great. This repository could disappear at any time in the future, and instructions on how to restore this would be lost. I like how qr-backup does this, they include step-by-step instructions on how to do the restore.
in my case, I was able to restore the file by running this command and holding the sheets to the webcam one by one:
/usr/bin/zbarcam --raw -Sdisable -Sqrcode.enable | sed -e "s/\^/\x0/g" | sort -z -n | sed ':a;N;$!ba;s/\n\x0[0-9]* //g;s
/\x0[0-9]* //g;s/\n\x0//g'
but maybe just a copy of the end of paperrestore.sh
would be sufficient? E.g. something like this:
# zbarimg ends each scanned code with a newline
# each barcode content begins with ^<number><space>
# so convert that to \0<number><space>, so sort can sort on that
# then remove all \n\0<number><space> so we get the originial without newlines added
/usr/bin/zbarimg "$SCANNEDFILE" --raw -Sdisable -Sqrcode.enable \
| sed -e "s/\^/\x0/g" \
| sort -z -n \
| sed ':a;N;$!ba;s/\n\x0[0-9]* //g;s/\x0[0-9]* //g;s/\n\x0//g'
# replace 'zbarimg $SCANNEDFILE"' with 'zbarcam' if you have a webcam instead of a scanned document
Metadata
Metadata
Assignees
Labels
No labels