GithubHelp home page GithubHelp logo

nitram2342 / paperify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alisinabh/paperify

0.0 2.0 0.0 380 KB

Minimal PaperBackup for large files using QR codes.

License: GNU General Public License v3.0

Shell 87.49% Dockerfile 12.51%
backup qrcode paper scanner backup-tool

paperify's Introduction

Paperify

Main CI

Use QR codes to backup your data on papers. Simply backup your files, print them and store them in a safe place.

Printable version of paperify

Paperify

You can print the image above and include them in your backups so you would have a copy of paperify with them. :)

Requirements

Make sure you have these binaries installed on your system.

  • qrencode (qrencode)
  • convert (imagemagick)
  • gs (ghostscript) or pdfunite to combine QR code images to a PDF for easier printing.
  • zbarimg (zbar >= 0.23.1) only for decoding with digitallify.sh
  • scanimage (sane-utils) only as a helper for scanning images
  • img2pdf Is is only tried as an alternative to convert if policies prevent conversion.

Zbar: Binary support is just added in zbar 0.23.1 and not supported in earlier versions. Please verify that your zbar version is higher or equal to 0.23.1. You can do that by running

zbarimg --version
0.23.1

You can download and build zbar from github.com/mchehab/zbar/. Note that zbar is not required for paperify.sh It is only required for digitallify.sh decoding.

Mac OS X

To install the requirements you can use Homebrew.

brew install coreutils qrencode zbarimg

Installation

These are just bash scripts. There is no need to install them.

You can either use git to clone this repo or download it in zip.

git clone https://github.com/alisinabh/paperify.git && cd paperify
# --- OR ---
wget https://github.com/alisinabh/paperify/archive/master.zip -O paperify.zip && \
     unzip paperify.zip && cd paperify-master

Or you can use paperify's Docker image at alisinabh/paperify. More details below.

Usage

Backup

Creates FILE-qr directory with generated QR codes and a PDF file (if possible) inside. Then you can print those files and keep them. If you want to increase the error correction level use option -L (default, low error correction level, 2953 bytes per page, 7 % can be restored), -M (2331 bytes per page, 15 % can be restored), -Q (1663 bytes per page, 25 % of data can be restored), or -H (highest error correction level, 1273 bytes per page, 30% of data can be restored).

./paperify.sh [options] FILE

Example

  • Set TOOL_PATH, where the script code is:
TOOL_PATH=`pwd`

  • Create a test directory:
mkdir /tmp/test
cd /tmp/test
  • Create a test file with random input:
dd if=/dev/urandom of=test.dat bs=1024 count=10
  • Create a paper backup in PDF format:
$TOOL_PATH/paperify.sh test.dat
  • Print PDF output file test.dat.pdf.

Restore

  • Scan your pages. If you use SANE tools with a flatbed scanner, you can use the script scanimages.sh which scans page by page.

  • If you have a scanner with automatic page feeder, your scan result is likely a PDF file. You then split your PDF file into single pages:

$TOOL_PATH/splitpdf.sh test.dat.pdf

Afterwards, use digitalify.sh to parse QR codes in all image files from DIRECTORY and to reconstruct chunks into OUTPUT_FILE. Make sure input file names are correct.

$TOOL_PATH/digitalify.sh test.dat.recovered test.dat.pdf.splitted_pages

Finally, verify the SHA-1 sum:

sha1sum test.dat.recovered

Use with Docker

You can mount your files at /target in paperify's docker container. Then run paperify.

For simplicity, You can just copy the bellow commands which will mount your current directory automatically.

# To Paperify
# FIRST: cd into the folder that your file is in
docker run -v$(pwd):/target alisinabh/paperify FILE

# To Digitallify
# First cd into the folder that your scanned images are in
docker run -v$(pwd):/target --entrypoint=/paperify/digitallify.sh alisinabh/paperify OUTPUT_FILE .

Recommendations

Multiple files

Use tarballs and gzip to store and compress your data.

tar cvfz files.tgz file1.txt file2.txt

Encryption

To protect your data you can encrypt them using gpg (GnuPG).

gpg --symmetric file.txt

Then use file.txt.gpg in paperify.

License

Peperify is licensed in GPL-3.0

Read more in LICESE

paperify's People

Contributors

alisinabh avatar nitram2342 avatar mavnt avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.