za3k / qr-backup

Paper backup of files using QR codes
Other
114 stars 11 forks source link

optionnally include file content in the output #48

Closed anarcat closed 1 year ago

anarcat commented 1 year ago

this sounds counter-intuitive, but hear me out.

i want to export OpenPGP certificates and particularly revocation certificates with qr-backup. those are actually readable files on their own, and not that long... with a small font, they could probably fit on a page, or at least some of them.

it would be nice to have a way to print the file content after the backup, in case it's human-readable. this would be optional, of course, as some binary files should not be printed as is. but in my test here i used /etc/motd and was surprised to see the file just not present at all in the output, as it would have been as good a backup as any to have directly the source file there...

the ultimate backup: just type the ascii back by hand! :)

thanks!

za3k commented 1 year ago

Is this feature more useful than just printing the file and stapling them together? I considered it and rejected it as a feature in my head, but I'm happy to take feedback if you would actually print a copy.

See also https://github.com/za3k/qr-backup/issues/31, https://github.com/intra2net/paperbackup, and http://www.jabberwocky.com/software/paperkey/

anarcat commented 1 year ago

Is this feature more useful than just printing the file and stapling them together?

i have thought about this, and i think the only difference is for very small files, the contents could fit on a single page...

but you're right, i am being kind of silly here, probably not worth it.

also: whoa, paperbackup already does that, good hint! :)

anarcat commented 1 year ago

actually, looking into this again, the --note issue would have worked wonders for me, except it prefixes each line with "additional note". it would be actually usable for me if it was just a heading and the text dumped after.

my use case is that i'm printing an OpenPGP revocation certificate and that document is small enough to fit on a single page, alongside the qrcodes. the idea of using qrcodes is that i can scan them easily (with qr-backup or instructions) but if that fails, i can still type out the certificate by hand (or use OCR).

za3k commented 1 year ago

This solution will only work if the note and QR codes both fit on one page. Otherwise, you'll overflow the page and qr-backup will break. I think supporting very long notes is a reasonable first step though.