hardcopy
Current Release: 1.0.1
CLI tool for generating printable hard copies (PDF, HTML, TXT) of binary data: PGP keys, certificates, seeds, and other secrets.
Installation
Usage
# From stdin
|
# From file
# Disable QR codes (text only)
# Custom title and description
# HTML output with custom template
Output Formats
| Extension | Format | Notes |
|---|---|---|
.pdf |
Requires monospace font directory (--font-dir) |
|
.txt |
Plain text | Line-numbered word lists |
.html |
HTML | Uses template from --template |
Output Sections (enabled by default)
| Flag | Section | Description |
|---|---|---|
| (default) | PGPfone | Phonetic word list, 4 words/line |
| (default) | S/KEY OTP | 6-word lines with 2-bit checksum |
| (default) | QR Code | PNG images, chunked at 500 bytes |
--no-bip39 |
BIP-39 | 2048-word mnemonic, 6 words/line |
--no-diceware |
Diceware | EFF Large wordlist, 12 bits/word |
Disable any section with --no-<section> (e.g., --no-qrcode, --no-pgpfone).
Example: PGP Key Backup
# Export keys
# Generate PDF backup with all sections
|
# Minimal backup (text only, no QR)
|
Verification
Each output includes a SHA-256 checksum footer. Verify with softcopy:
# Enter checksum from hard copy when prompted
Options
hardcopy [OPTIONS] <OUTPUT_FILE>
OPTIONS:
-i, --input <FILE> Input file (default: stdin)
--no-pgpfone Disable PGPfone word list
--no-skeyotp Disable S/KEY OTP word list
--no-qrcode Disable QR code generation
--no-bip39 Disable BIP-39 word list
--no-diceware Disable Diceware word list
--font-dir <DIR> Font directory for PDF output
--font-name <NAME> Font family name for PDF output
--template <FILE> HTML template file
--debug Enable debug logging
Features
Default features: out-pgpfone, out-skeyotp, out-qrcode, out-bip39, out-diceware
[]
= { = "1.0.0", = ["out-qrcode", "out-bip39"] }
Recovery
Use softcopy (sibling project) to recover data from hard copies:
# Interactive decode from PGPfone word list
# Verify checksum