floppy-qr
v1.6.0
Published
Floppy QR - Store files in QR codes
Maintainers
Readme
Floppy QR
Welcome to Floppy QR! This project provides a way to store and retrieve files using QR codes, inspired by the classic floppy disk style. With Floppy QR, you can encode a file into a series of QR codes and later reconstruct the file from those QR codes. It's a fun throwback to the days of floppy disks, but with a modern twist!
Features
- Create QR Codes: Split a file into chunks, encode each chunk into a QR code, and store them in a directory.
- Load QR Codes: Reconstruct the original file from a series of QR codes.
- Password Protection: Optionally encrypt your files with AES-256-CBC encryption for secure storage.
- Automatic Base64 Encoding: All files are automatically encoded in base64 format for reliable QR code generation.
- Customizable Options: Adjust chunk size and error correction level for QR codes.
- Retro Charm: Designed with a nostalgic nod to the floppy disk era.
Installation
Clone the repository and install the necessary dependencies using npm:
sudo npm install -g floppy-qrNote: Don't forget the "-g"
Usage
Create QR Codes
To generate QR codes from a file, use the create command. This will create QR codes for each chunk of the file.
floppy-qr create <file-path> [password] [-n, --note <optional-note>] [-s, --size <chunk-size>] [-c, --correction <level>]<file-path>: Path to the file you want to encode into QR codes.[password]: Optional password to encrypt the file. If provided, the file will be encrypted with AES-256-CBC.--note(-n): Optional note to include in the metadata QR code.--size(-s): Optional parameter to specify the size of each chunk. Default is1650bytes.--correction(-c): Optional parameter to set the error correction level. Options areL,M,Q,H. Default isQ.
Example:
floppy-qr create myfile.txtExample with password:
floppy-qr create myfile.txt MySecretPass123 --note "This is a test file." --size 2000 --correction HThis command will generate encrypted QR codes in a directory named myfile.txt-qr, with the metadata and file chunks encoded into individual QR codes. It uses chunks of 2000 bytes and a high error correction level (H).
Load QR Codes
To reconstruct a file from a series of QR codes, use the load command. This will read the QR codes from the specified directory and reassemble the file.
floppy-qr load <directory> [password]<directory>: Directory containing the QR codes to be read.[password]: Password to decrypt the file (required if the file was encrypted).
Example:
floppy-qr load myfile.txt-qr/Example with password:
floppy-qr load myfile.txt-qr/ MySecretPass123This command will read QR codes from the myfile.txt-qr directory, decrypt them with the provided password, and reconstruct the original file in the current directory. If a note was included, it will be displayed after reconstruction.
Project Structure
createQR.js: Contains functionality to create QR codes from a file.loadQR.js: Contains functionality to load and reconstruct a file from QR codes.floppy-qr.js: Main script for handling command-line interface.
Contributing
Feel free to contribute to this project! You can submit issues, create pull requests, or suggest improvements.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any questions or support, please reach out to [email protected].
