aseprite-ini


Nameaseprite-ini JSON
Version 0.0.6 PyPI version JSON
download
home_page
SummaryA tool to parse Aseprite '.ini' format file.
upload_time2024-03-16 17:53:39
maintainerAseprite Quest
docs_urlNone
authorAseprite Quest
requires_python>=3.10
licenseMIT License
keywords aseprite
VCS
bugtrack_url
requirements requests pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Aseprite INI

[![Python](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org)
[![PyPI](https://img.shields.io/pypi/v/aseprite-ini)](https://pypi.org/project/aseprite-ini/)

A tool to parse [Aseprite](https://github.com/aseprite/aseprite) `.ini` format file.

This format is being used for [language translation strings](https://github.com/aseprite/aseprite/blob/main/data/strings/en.ini).

## Installation

```shell
pip install aseprite-ini
```

## Usage

```python
import os

from aseprite_ini import Aseini
from examples import assets_dir, build_dir


def main():
    strings_en = Aseini.pull_strings('main')
    strings_en.fallback(Aseini.pull_strings('v1.3.2'))
    strings_en.fallback(Aseini.pull_strings('v1.2.40'))
    strings_en.save(os.path.join(build_dir, 'en.ini'))

    strings_my = Aseini.load(os.path.join(assets_dir, 'my.ini'))
    translated, total = strings_my.coverage(strings_en)
    print(f'progress: {translated} / {total}')
    strings_my.save(os.path.join(build_dir, 'my.ini'), strings_en)
    strings_my.save_alphabet(os.path.join(build_dir, 'my.txt'))


if __name__ == '__main__':
    main()
```

## Dependencies

- [Requests](https://github.com/psf/requests)

## License

Under the [MIT license](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "aseprite-ini",
    "maintainer": "Aseprite Quest",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "aseprite",
    "author": "Aseprite Quest",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/50/94/7286f918e09f24c66642ad56bdf45af9c841715e69726eae2e593d6dba8a/aseprite_ini-0.0.6.tar.gz",
    "platform": null,
    "description": "# Aseprite INI\n\n[![Python](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org)\n[![PyPI](https://img.shields.io/pypi/v/aseprite-ini)](https://pypi.org/project/aseprite-ini/)\n\nA tool to parse [Aseprite](https://github.com/aseprite/aseprite) `.ini` format file.\n\nThis format is being used for [language translation strings](https://github.com/aseprite/aseprite/blob/main/data/strings/en.ini).\n\n## Installation\n\n```shell\npip install aseprite-ini\n```\n\n## Usage\n\n```python\nimport os\n\nfrom aseprite_ini import Aseini\nfrom examples import assets_dir, build_dir\n\n\ndef main():\n    strings_en = Aseini.pull_strings('main')\n    strings_en.fallback(Aseini.pull_strings('v1.3.2'))\n    strings_en.fallback(Aseini.pull_strings('v1.2.40'))\n    strings_en.save(os.path.join(build_dir, 'en.ini'))\n\n    strings_my = Aseini.load(os.path.join(assets_dir, 'my.ini'))\n    translated, total = strings_my.coverage(strings_en)\n    print(f'progress: {translated} / {total}')\n    strings_my.save(os.path.join(build_dir, 'my.ini'), strings_en)\n    strings_my.save_alphabet(os.path.join(build_dir, 'my.txt'))\n\n\nif __name__ == '__main__':\n    main()\n```\n\n## Dependencies\n\n- [Requests](https://github.com/psf/requests)\n\n## License\n\nUnder the [MIT license](LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A tool to parse Aseprite '.ini' format file.",
    "version": "0.0.6",
    "project_urls": {
        "homepage": "https://github.com/aseprite-quest/aseprite-ini",
        "issues": "https://github.com/aseprite-quest/aseprite-ini/issues",
        "source": "https://github.com/aseprite-quest/aseprite-ini"
    },
    "split_keywords": [
        "aseprite"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "372137e66b067d8689444578bdf46963b2f390cabe75c54f19e798d3d26b5f75",
                "md5": "30d46afc8f9ef627249af81f23434e63",
                "sha256": "9be717f25a992aa4a79aba5b424331c7f12a012cdc23a5e3145b042da4a1bf6d"
            },
            "downloads": -1,
            "filename": "aseprite_ini-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30d46afc8f9ef627249af81f23434e63",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4043,
            "upload_time": "2024-03-16T17:53:37",
            "upload_time_iso_8601": "2024-03-16T17:53:37.945218Z",
            "url": "https://files.pythonhosted.org/packages/37/21/37e66b067d8689444578bdf46963b2f390cabe75c54f19e798d3d26b5f75/aseprite_ini-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "50947286f918e09f24c66642ad56bdf45af9c841715e69726eae2e593d6dba8a",
                "md5": "588d7d5e34633e4dfc8b1cbf342030fd",
                "sha256": "ef8dfbeb835372d5a96fe8f883c7595bd1f4722730a35e4f6b586cf2e123c8f2"
            },
            "downloads": -1,
            "filename": "aseprite_ini-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "588d7d5e34633e4dfc8b1cbf342030fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6115,
            "upload_time": "2024-03-16T17:53:39",
            "upload_time_iso_8601": "2024-03-16T17:53:39.477155Z",
            "url": "https://files.pythonhosted.org/packages/50/94/7286f918e09f24c66642ad56bdf45af9c841715e69726eae2e593d6dba8a/aseprite_ini-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-16 17:53:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aseprite-quest",
    "github_project": "aseprite-ini",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.1.0"
                ]
            ]
        }
    ],
    "lcname": "aseprite-ini"
}
        
Elapsed time: 0.70786s