za3k / qr-backup

Paper backup of files using QR codes
Other
132 stars 12 forks source link

make multi-line notes look nicer #50

Closed anarcat closed 1 year ago

anarcat commented 1 year ago

This allows users to include arbitrary (longer) content without it being broken up in multiple lines and prefixed repeatedly with Additional note:, which quickly becomes redundant.

Fixes: #48

za3k commented 1 year ago

I think this does not fix #48 except for very, very short files. Notes are printed on every page, and a file more than about 1/3 to 1/2 the length of a page would break qr-backup.

Let me take a stab at this using something more like a header page or special handling, if we want to include plaintext output.

anarcat commented 1 year ago

oh i hadn't realized notes are printed on every page... that seems a little overkill, no? :)

za3k commented 1 year ago

Looks reasonable! To be approved: 1) Run the tests 2) Prefix "Additional note:" before each note. --note can be passed multiple times. 3) Please verify the word wrap length you've picked with some testing.

za3k commented 1 year ago

Well the idea for note is to add some metadata for the document. For example, "This is ZV's journal covering 2023-01 to 2023-04"

anarcat commented 1 year ago

Well the idea for note is to add some metadata for the document. For example, "This is ZV's journal covering 2023-01 to 2023-04"

yeah i understand that, but IMHO just a header on the first page would be fine :p

anarcat commented 1 year ago

Prefix "Additional note:" before each note. --note can be passed multiple times.

i've refactored the code a bit so it does that.

anarcat commented 1 year ago

before: motd-before

after:

motd-after

za3k commented 1 year ago

Here is what the final version will look like. motd

za3k commented 1 year ago

Done.