A tool to parse Aseprite '.ini' format file.
Project description
Aseprite INI
A tool to parse Aseprite .ini
format file.
This format is being used for language translation strings.
Installation
pip install aseprite-ini
Usage
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
License
Under the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aseprite_ini-0.0.7.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file aseprite_ini-0.0.7.tar.gz
.
File metadata
- Download URL: aseprite_ini-0.0.7.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57b0ba905513487ae0a8e544e10f5e43971d2f78e65f103a6ff9772a8c4e3d3f |
|
MD5 | 3e3defa977c70089ae1962f8077ac204 |
|
BLAKE2b-256 | 0eadcba51133604322c50704e83f2275dca796449b10e1f43f71290ff40299d2 |
File details
Details for the file aseprite_ini-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: aseprite_ini-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43b52b1d37116e3f19a28b313fc540c034ae36748068272e59cb1d69d078066b |
|
MD5 | 552233e7d13359c5c6f164619643f65b |
|
BLAKE2b-256 | 9f1be6c697785b39319b9bbcbe835fa4e8dd7a09198c7a6cc58e84efed50c83a |