merge two catima.zip exports
Project description
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.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file catimerge-0.1.1.tar.gz
.
File metadata
- Download URL: catimerge-0.1.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e34dedfd55034f741b11161fe82ce4fc6fc020b93620077f7eff8de6b5f1d9a |
|
MD5 | d37d536b37f77631e17ab7808f6ac588 |
|
BLAKE2b-256 | ffba3de55181abc366fab9cbba3e6b770032e22566e5005dedb647a5b0427927 |
File details
Details for the file catimerge-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: catimerge-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da23980c7f47b2fcd38db92239a8a2261d7e4ade835e8839f3752c0b18618731 |
|
MD5 | c8ce5109a67897d2f9d1881ed1f72f63 |
|
BLAKE2b-256 | 31d6eaa8ea5e805ec672ee107b3fd5d16c950861e377aec80a026f9bf7706911 |