Backup notes and images from Catch.com
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README
backup.py

README

Tool to back up notes and media items from Catch account

usage: backup.py [-h] [-f OUTFILE] [-d DIR] [-u USERNAME]

Backup data from Catch API

optional arguments:
  -h, --help            show this help message and exit
  -f OUTFILE, --file OUTFILE
                        JSON data file to write (default: notes.json)
  -d DIR, --dir DIR     output directory for media and one note per file dump
  -u USERNAME, --username USERNAME
                        username to use

Example run:

./backup.py -u catchuser -d /ext/catch-backup
Password:
Fetching notes...
Writing notes to notes.json
JSON Backup complete!
Starting one-note-per-file and media dump. Output dir: /ext/catch-backup
Fetching media for note 24627592 size 2487388 bytes
Fetching media for note 24627592 size 505281 bytes
Fetching media for note 24627592 size 1186871 bytes
Fetching media for note 24622035 size 757637 bytes
Fetching media for note 24258985 size 953102 bytes
Fetching media for note 24058249 size 1276211 bytes
Fetching media for note 24046985 size 1156698 bytes

Example of on-disk output format (one-file-per-note):

$ ls /ext/catch-backup/
WhiteChristmas-21716751-20101223-100853.txt
WhiteChristmas-21716752-20101223-101005.txt
WhosaystherearentanyexpensiveIri-21818037-20101229-133700.txt
WhyAIsucksintensereading-23421493-20110305-210153.txt
WhyChinacouldrulethenewageofgame-23202069-20110225-180049.txt
Wildboar-21602105-20101216-143235.txt
Wontonchashuramennosh-21383066-20101204-021739.txt
Xoomvsnookcolor-23204308-20110225-193819.txt

Example output data for note with attachment:

$ cat /ext/catch-backup/Japaneseboxteapot-23869189-20110321-041308.txt
Created Date: 2011-03-21T04:13:08.000000Z
Modified Date: 2011-03-21T04:13:32.000000Z
Longitude: 37.78280515
Latitude: -122.43147747
Tags: 
Attachments: /ext/catch-backup/media/23869189-0.jpg

Japanese box teapot