Repository navigation
Conversation
The cover page image, the Paper Wallet background and its diagonal cryptocurrency names, the watermark, and the diagonal group labels on the cards were always printed. Make it an option: a `backgrounds` argument of produce_pdf and write_pdfs, defaulting to defaults.BACKGROUNDS (True, so the output is unchanged), selected on the command line with --backgrounds and --no-backgrounds, like --cover and --no-cover. With --no-backgrounds, the PDF is plainer to read and cheaper to print: no background image behind the Paper Wallets and the cover page, and no text across the cards. Add backgrounds_test.py.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cover page image, the Paper Wallet background and its diagonal cryptocurrency names, the watermark, and the diagonal group labels on the cards are always printed. This makes it an option, so that the PDF can be plainer to read and cheaper to print (no background image behind the Paper Wallets and the cover page, and no text across the cards):
It is a
backgroundsargument ofproduce_pdfandwrite_pdfs, defaulting to the newdefaults.BACKGROUNDS, which isTrue: the output is unchanged unless--no-backgroundsis given. The command line options follow the style of--coverand--no-cover.slip39/defaults.py(BACKGROUNDS),slip39/layout/pdf.py(the cover image and fade, the card group labels and watermark, the wallet background and diagonal names are only set ifbackgrounds),slip39/main.py(the two options), and the usage inREADME.org.slip39/backgrounds_test.pyrecords the template values rendered into the PDF, with and without backgrounds and by default (cover, cards and, if scrypt is available, a BIP-38 Paper Wallet), and checks that the command line options are passed towrite_pdfs.pytest(without the invoice/communications tests, which need optional packages): 44 passed, 4 skipped.Note that the Paper Wallet's semi-transparent white overlays (behind its text and QR codes) are still set without backgrounds; on white paper they print nothing.