Skip to content

include instructions in text copy #16

@anarcat

Description

@anarcat

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions