catimerge


Namecatimerge JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/obfusk/catimerge
Summarymerge two catima.zip exports
upload_time2023-06-25 20:40:23
maintainer
docs_urlNone
authorFC Stegerman
requires_python>=3.8
licenseAGPLv3+
keywords catima export merge
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- SPDX-FileCopyrightText: 2023 FC Stegerman <flx@obfusk.net> -->
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->

[![GitHub Release](https://img.shields.io/github/release/obfusk/catimerge.svg?logo=github)](https://github.com/obfusk/catimerge/releases)
[![PyPI Version](https://img.shields.io/pypi/v/catimerge.svg)](https://pypi.python.org/pypi/catimerge)
[![Python Versions](https://img.shields.io/pypi/pyversions/catimerge.svg)](https://pypi.python.org/pypi/catimerge)
[![CI](https://github.com/obfusk/catimerge/workflows/CI/badge.svg)](https://github.com/obfusk/catimerge/actions?query=workflow%3ACI)
[![AGPLv3+](https://img.shields.io/badge/license-AGPLv3+-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.html)

<!--
<a href="https://repology.org/project/catimerge/versions">
  <img src="https://repology.org/badge/vertical-allrepos/catimerge.svg?header="
    alt="Packaging status" align="right" />
</a>

<a href="https://repology.org/project/python:catimerge/versions">
  <img src="https://repology.org/badge/vertical-allrepos/python:catimerge.svg?header="
    alt="Packaging status" align="right" />
</a>
-->

# catimerge

Merge two [Catima](https://catima.app) `.zip` exports.

```sh
$ 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](gui.png)

## 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:

<details>

```sh
$ 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
```

</details>

## Installing

### Using pip

```bash
$ 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.

```bash
$ 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:

```bash
$ cd catimerge
$ git pull --rebase
```

## Dependencies

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

### Debian/Ubuntu

```bash
$ apt install python3-tk
```

## License

[![AGPLv3+](https://www.gnu.org/graphics/agplv3-155x51.png)](https://www.gnu.org/licenses/agpl-3.0.html)

<!-- vim: set tw=70 sw=2 sts=2 et fdm=marker : -->

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/obfusk/catimerge",
    "name": "catimerge",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "catima export merge",
    "author": "FC Stegerman",
    "author_email": "flx@obfusk.net",
    "download_url": "https://files.pythonhosted.org/packages/ff/ba/3de55181abc366fab9cbba3e6b770032e22566e5005dedb647a5b0427927/catimerge-0.1.1.tar.gz",
    "platform": null,
    "description": "<!-- SPDX-FileCopyrightText: 2023 FC Stegerman <flx@obfusk.net> -->\n<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->\n\n[![GitHub Release](https://img.shields.io/github/release/obfusk/catimerge.svg?logo=github)](https://github.com/obfusk/catimerge/releases)\n[![PyPI Version](https://img.shields.io/pypi/v/catimerge.svg)](https://pypi.python.org/pypi/catimerge)\n[![Python Versions](https://img.shields.io/pypi/pyversions/catimerge.svg)](https://pypi.python.org/pypi/catimerge)\n[![CI](https://github.com/obfusk/catimerge/workflows/CI/badge.svg)](https://github.com/obfusk/catimerge/actions?query=workflow%3ACI)\n[![AGPLv3+](https://img.shields.io/badge/license-AGPLv3+-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.html)\n\n<!--\n<a href=\"https://repology.org/project/catimerge/versions\">\n  <img src=\"https://repology.org/badge/vertical-allrepos/catimerge.svg?header=\"\n    alt=\"Packaging status\" align=\"right\" />\n</a>\n\n<a href=\"https://repology.org/project/python:catimerge/versions\">\n  <img src=\"https://repology.org/badge/vertical-allrepos/python:catimerge.svg?header=\"\n    alt=\"Packaging status\" align=\"right\" />\n</a>\n-->\n\n# catimerge\n\nMerge two [Catima](https://catima.app) `.zip` exports.\n\n```sh\n$ catimerge --help\nusage: catimerge [-h] [-v] [--version] FIRST_ZIP SECOND_ZIP OUTPUT_ZIP\n\npositional arguments:\n  FIRST_ZIP\n  SECOND_ZIP\n  OUTPUT_ZIP\n\noptions:\n  -h, --help     show this help message and exit\n  -v, --verbose\n  --version      show program's version number and exit\n$ catimerge -v catima1.zip catima2.zip out.zip\nMerging 'catima1.zip' and 'catima2.zip' into 'out.zip'...\nParsing...\nVersion: 2\nZIP #1 has   1 group(s),   9 card(s),   2 card group(s),   5 image file(s)\nZIP #2 has   2 group(s),   5 card(s),   3 card group(s),   3 image file(s)\nMerging...\nOutput has   3 group(s),  14 card(s),   5 card group(s),   8 image file(s)\nWriting...\n```\n\n## GUI\n\nThe additional `catimerge-gui` command provides a simple GUI.\n\n![screenshot](gui.png)\n\n## CAVEATS\n\nUnfortunately, Python does not support the password-protected ZIP\nfiles created by Catima.  You can either export your data without a\npassword, or use a tool like 7-Zip to create a temporary passwordless\nZIP file for the merge process.\n\nFor example, if you have two password-protected ZIP files as input and\nwant a password-protected output ZIP file as well:\n\n<details>\n\n```sh\n$ ls\ncatima1.zip\ncatima2.zip\n$ 7z -ocatima1 x catima1.zip            # extract into catima1/\n[...]\n$ 7z -ocatima2 x catima2.zip            # extract into catima2/\n[...]\n$ cd catima1\n$ 7z a ../catima1-nopass.zip *          # create passwordless ZIP\n[...]\n$ cd ..\n$ cd catima2\n$ 7z a ../catima2-nopass.zip *          # create passwordless ZIP\n[...]\n$ cd ..\n$ catimerge -v catima1-nopass.zip catima2-nopass.zip out-nopass.zip\nMerging 'catima1-nopass.zip' and 'catima2-nopass.zip' into 'out-nopass.zip'...\n[...]\n$ 7z -oout-nopass x out-nopass.zip      # extract into out-nopass/\n$ cd out-nopass\n$ 7z -p a ../out.zip *                  # create password-protected ZIP\n[...]\n$ cd ..\n$ ls\ncatima1\ncatima1-nopass.zip\ncatima1.zip\ncatima2\ncatima2-nopass.zip\ncatima2.zip\nout-nopass\nout-nopass.zip\nout.zip\n```\n\n</details>\n\n## Installing\n\n### Using pip\n\n```bash\n$ pip install catimerge\n```\n\nNB: depending on your system you may need to use e.g. `pip3 --user`\ninstead of just `pip`.\n\n### From git\n\nNB: this installs the latest development version, not the latest\nrelease.\n\n```bash\n$ git clone https://github.com/obfusk/catimerge.git\n$ cd catimerge\n$ pip install -e .\n```\n\nNB: you may need to add e.g. `~/.local/bin` to your `$PATH` in order\nto run `catimerge`.\n\nTo update to the latest development version:\n\n```bash\n$ cd catimerge\n$ git pull --rebase\n```\n\n## Dependencies\n\n* Python >= 3.8 (w/ Tk support for the GUI).\n\n### Debian/Ubuntu\n\n```bash\n$ apt install python3-tk\n```\n\n## License\n\n[![AGPLv3+](https://www.gnu.org/graphics/agplv3-155x51.png)](https://www.gnu.org/licenses/agpl-3.0.html)\n\n<!-- vim: set tw=70 sw=2 sts=2 et fdm=marker : -->\n",
    "bugtrack_url": null,
    "license": "AGPLv3+",
    "summary": "merge two catima.zip exports",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/obfusk/catimerge"
    },
    "split_keywords": [
        "catima",
        "export",
        "merge"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31d6eaa8ea5e805ec672ee107b3fd5d16c950861e377aec80a026f9bf7706911",
                "md5": "c8ce5109a67897d2f9d1881ed1f72f63",
                "sha256": "da23980c7f47b2fcd38db92239a8a2261d7e4ade835e8839f3752c0b18618731"
            },
            "downloads": -1,
            "filename": "catimerge-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c8ce5109a67897d2f9d1881ed1f72f63",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19547,
            "upload_time": "2023-06-25T20:40:22",
            "upload_time_iso_8601": "2023-06-25T20:40:22.043739Z",
            "url": "https://files.pythonhosted.org/packages/31/d6/eaa8ea5e805ec672ee107b3fd5d16c950861e377aec80a026f9bf7706911/catimerge-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffba3de55181abc366fab9cbba3e6b770032e22566e5005dedb647a5b0427927",
                "md5": "d37d536b37f77631e17ab7808f6ac588",
                "sha256": "6e34dedfd55034f741b11161fe82ce4fc6fc020b93620077f7eff8de6b5f1d9a"
            },
            "downloads": -1,
            "filename": "catimerge-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d37d536b37f77631e17ab7808f6ac588",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20116,
            "upload_time": "2023-06-25T20:40:23",
            "upload_time_iso_8601": "2023-06-25T20:40:23.609532Z",
            "url": "https://files.pythonhosted.org/packages/ff/ba/3de55181abc366fab9cbba3e6b770032e22566e5005dedb647a5b0427927/catimerge-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-25 20:40:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "obfusk",
    "github_project": "catimerge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "catimerge"
}
        
Elapsed time: 0.17557s