Skip to main content

GitHub Release PyPI Version Python Versions CI AGPLv3+

catimerge

Merge two Catima .zip exports.

$ catimerge --help
usage: catimerge [-h] [-v] [--version] FIRST_ZIP SECOND_ZIP OUTPUT_ZIP

positional arguments:
  FIRST_ZIP
  SECOND_ZIP
  OUTPUT_ZIP

options:
  -h, --help     show this help message and exit
  -v, --verbose
  --version      show program's version number and exit
$ catimerge -v catima1.zip catima2.zip out.zip
Merging 'catima1.zip' and 'catima2.zip' into 'out.zip'...
Parsing...
Version: 2
ZIP #1 has   1 group(s),   9 card(s),   2 card group(s),   5 image file(s)
ZIP #2 has   2 group(s),   5 card(s),   3 card group(s),   3 image file(s)
Merging...
Output has   3 group(s),  14 card(s),   5 card group(s),   8 image file(s)
Writing...

GUI

The additional catimerge-gui command provides a simple GUI.

screenshot

CAVEATS

Unfortunately, Python does not support the password-protected ZIP files created by Catima. You can either export your data without a password, or use a tool like 7-Zip to create a temporary passwordless ZIP file for the merge process.

For example, if you have two password-protected ZIP files as input and want a password-protected output ZIP file as well:

$ ls
catima1.zip
catima2.zip
$ 7z -ocatima1 x catima1.zip            # extract into catima1/
[...]
$ 7z -ocatima2 x catima2.zip            # extract into catima2/
[...]
$ cd catima1
$ 7z a ../catima1-nopass.zip *          # create passwordless ZIP
[...]
$ cd ..
$ cd catima2
$ 7z a ../catima2-nopass.zip *          # create passwordless ZIP
[...]
$ cd ..
$ catimerge -v catima1-nopass.zip catima2-nopass.zip out-nopass.zip
Merging 'catima1-nopass.zip' and 'catima2-nopass.zip' into 'out-nopass.zip'...
[...]
$ 7z -oout-nopass x out-nopass.zip      # extract into out-nopass/
$ cd out-nopass
$ 7z -p a ../out.zip *                  # create password-protected ZIP
[...]
$ cd ..
$ ls
catima1
catima1-nopass.zip
catima1.zip
catima2
catima2-nopass.zip
catima2.zip
out-nopass
out-nopass.zip
out.zip

Installing

Using pip

$ pip install catimerge

NB: depending on your system you may need to use e.g. pip3 --user instead of just pip.

From git

NB: this installs the latest development version, not the latest release.

$ git clone https://github.com/obfusk/catimerge.git
$ cd catimerge
$ pip install -e .

NB: you may need to add e.g. ~/.local/bin to your $PATH in order to run catimerge.

To update to the latest development version:

$ cd catimerge
$ git pull --rebase

Dependencies

  • Python >= 3.8 (w/ Tk support for the GUI).

Debian/Ubuntu

$ apt install python3-tk

License

AGPLv3+

Metadata

Release files for catimerge 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for catimerge 0.1.1
File Size Uploaded
catimerge-0.1.1.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for catimerge 0.1.1
File Interpreter ABI Platform
catimerge-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 39.7 kB

Release files / catimerge-0.1.1.tar.gz

Download URL catimerge-0.1.1.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6e34dedfd55034f741b11161fe82ce4fc6fc020b93620077f7eff8de6b5f1d9a
BLAKE2b-256 checksum
How to use checksums
ffba3de55181abc366fab9cbba3e6b770032e22566e5005dedb647a5b0427927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / catimerge-0.1.1-py3-none-any.whl

Download URL catimerge-0.1.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da23980c7f47b2fcd38db92239a8a2261d7e4ade835e8839f3752c0b18618731
BLAKE2b-256 checksum
How to use checksums
31d6eaa8ea5e805ec672ee107b3fd5d16c950861e377aec80a026f9bf7706911
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page