Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include instructions in text copy #16

Open
anarcat opened this issue Mar 3, 2023 · 0 comments · May be fixed by #18
Open

include instructions in text copy #16

anarcat opened this issue Mar 3, 2023 · 0 comments · May be fixed by #18

Comments

@anarcat
Copy link

anarcat commented Mar 3, 2023

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
anarcat added a commit to anarcat/paperbackup that referenced this issue Mar 3, 2023
anarcat added a commit to anarcat/paperbackup that referenced this issue Jun 2, 2023
anarcat added a commit to anarcat/paperbackup that referenced this issue Jun 2, 2023
We use a triple-quoted raw string because there's a lot of escape
characters in there.

Fixes intra2net#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant