potodo


Namepotodo JSON
Version 0.23.0 PyPI version JSON
download
home_pageNone
SummaryList .po files to be translated.
upload_time2024-12-07 14:44:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License
keywords potodo gettext i18n
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <img width=60% src="https://git.afpy.org/AFPy/potodo/raw/branch/main/media/Potodo.png">
</p>
<p align="center">
    <a href="https://woodpecker.afpy.org/AFPy/potodo"><img src="https://woodpecker.afpy.org/api/badges/AFPy/potodo/status.svg"></a>
    <img src="https://img.shields.io/pypi/v/potodo?color=green">
    <img src="https://img.shields.io/badge/python-v3.7+-green.svg">
    <img src="https://img.shields.io/badge/license-MIT-green.svg">
</p>

## What is it ?

Potodo, a (almost) flawless TODO/progress listing CLI tool for po files.

### Potodo is part of poutils!

[Poutils](https://pypi.org/project/poutils) (`.po` utils) is is a metapackage to easily install usefull Python tools to use with po files
and `potodo` is a part of it! Go check out [Poutils](https://pypi.org/project/poutils) to discover the other useful tools for `po` file related translation!


## Installation

```sh
pip install potodo
```

## Usage example

When ran in the [french CPython documentation
translation](https://git.afpy.org/AFPy/python-docs-fr/) it shows:

```
$ potodo --exclude venv .venv whatsnew c-api/ distutils/

# python-docs-fr (95.31% done)

- bugs.po                         29 /  30 ( 96.0% translated).
- copyright.po                     6 /   7 ( 85.0% translated), 1 fuzzy.
- license.po                      87 /  91 ( 95.0% translated), 2 fuzzy.


# extending (56.81% done)

- building.po                     22 /  23 ( 95.0% translated), 1 fuzzy.
- extending.po                   120 / 158 ( 75.0% translated), 8 fuzzy.
- index.po                        11 /  12 ( 91.0% translated), 1 fuzzy.
- newtypes.po                     38 /  89 ( 42.0% translated), 3 fuzzy.
- newtypes_tutorial.po            31 / 123 ( 25.0% translated), 2 fuzzy.
- windows.po                      20 /  21 ( 95.0% translated), 1 fuzzy.

[...]

# TOTAL (50.01% done)
```

### Handling reservations

To avoid having two translators work on the same file at the same
time, one can tell other translations that a file is being translated
using an issue or a draft pull request.

`potodo` can fetch those issues and display it. It currently work with
Gitea and Github.

For example, in a clone of
[python-docs-fr](https://git.afpy.org/AFPy/python-docs-fr/) you can
run:

```
$ potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude .venv
[...]
# extending (56.81% done)

- building.po                     22 /  23 ( 95.0% translated), 1 fuzzy, reserved by Starmania.
- extending.po                   120 / 158 ( 75.0% translated), 8 fuzzy.
- index.po                        11 /  12 ( 91.0% translated), 1 fuzzy.
- newtypes.po                     38 /  89 ( 42.0% translated), 3 fuzzy.
- newtypes_tutorial.po            31 / 123 ( 25.0% translated), 2 fuzzy.
- windows.po                      20 /  21 ( 95.0% translated), 1 fuzzy.


# faq (90.88% done)

- extending.po                    55 /  58 ( 94.0% translated), 3 fuzzy.
- general.po                      88 /  98 ( 89.0% translated).
- gui.po                          16 /  17 ( 94.0% translated), 1 fuzzy, reserved by Iucounu.
- library.po                     139 / 140 ( 99.0% translated).
- programming.po                 340 / 389 ( 87.0% translated), 40 fuzzy.
[...]
```

Notice the **reserved by** column.

For github it would look like `--api-url 'https://api.github.com/repos/ORGANISATION/REPOSITORY/issues?state=open'`.

It's a bit verbose, so maybe hide this in a Makefile or whatever, but
this way you can tweak the parameters of the query, typically to
filter on a label if needed.

The way `potodo` maps issues to files is simple: the path of the file
just has to be present in the issue title, so any issues like:

- `I'm currently working on faq/extending.po`
- `Je travaille sur extending/index.po`
- `blah blah library/functions.po blah blah`

will correctly match their file.


## Development setup

Create a virtual environment
```sh
python3 -m venv venv
```

Activate it
```sh
source venv/bin/activate
```

Install the dev requirements
```sh
pip install -r requirements-dev.txt
```

Install the pre-commit hook
```sh
pre-commit install
```

Install `potodo` in a development version
```
pip install -e .
```

## Release History

* v0.23.0
  * Support basing progress calculations on external file structure (--pot flag) by @maciek
* v0.22.0
  * fix: consider finished files and hide them from output by default by @mattwang44
  * feat: extract po files from all PR to also mark them as reserved by @fviard
  * fix imports pre-commit hook by @maciek
* v0.21.4
  * CI and refactor by @mdk
* v0.21.3
  * Refactor by @mdk
* v0.21.2
    * FIX: Don't miss issues (reservations) to files containing multiple dots. Contributed by @eviau.
* v0.21.0
    * A nice new README
* v0.20.0
    * New exclude behavior with gitignore style matching !
* v0.19.2
    * Dropped `cache_args` to simplify cache functionality
* v0.19.1
    * Fixed a bug of division by 0
    * Replaced Travis-ci tests with github actions
* v0.19.0
    * Fixed windows support
* v0.17.3
    * Fixed a math error where the completion %age of a folder was wrong
    * Fixes on the `.potodoignore` file
* v0.17.0
    * Added tests
    * Fixed bug where github would rate limit your IP address
    * Fixed argument errors
    * Added `-l` `--matching-files` Which will print the path of files matching your arguments
* v0.16.0
    * Args passed to potodo are now cached as well ! This allows for a better control of what is cached !
    * The ignore file now works as the .gitignore does. Add a venv/ in your .potodoignore for example :)
* v0.15.0
    * Potodo now supports .potodoignore files ! You can finally ignore the venv you made 🎉
* v0.14.3
    * Added cache versioning to avoid errors when cache changes, for example if files are moved between `potodo` versions.
* v0.14.2
    * Nothing new, just code moved around ! Thanks for sticking around 🎉
* v0.14.1
    * Added `--only-reserved` option to display only reserved filed
    * Added `--reserved-dates` to display when a file was reserved
    * Added cache to cache `pofiles` to speedup the reading process
    * Added logging for verbosity
    * Added interactive option with `--interactive`
    * Added contributors in the readme
* < v0.14.1
    * Base version

## Contributing

1. Fork it (<https://git.afpy.org/repo/fork/100>)
2. Create your feature branch (`git checkout -b feature/fooBar`

`/!\` Don't forget to bump the version in `potodo/__init__.py` when you're pushing your changes to your branch

3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "potodo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "potodo, gettext, i18n",
    "author": null,
    "author_email": "Jules Lasne <jules.lasne@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/74/93/975b5ef746877fc94143f2790d738efd0dfd297918ed8ce8311ad86728b3/potodo-0.23.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <img width=60% src=\"https://git.afpy.org/AFPy/potodo/raw/branch/main/media/Potodo.png\">\n</p>\n<p align=\"center\">\n    <a href=\"https://woodpecker.afpy.org/AFPy/potodo\"><img src=\"https://woodpecker.afpy.org/api/badges/AFPy/potodo/status.svg\"></a>\n    <img src=\"https://img.shields.io/pypi/v/potodo?color=green\">\n    <img src=\"https://img.shields.io/badge/python-v3.7+-green.svg\">\n    <img src=\"https://img.shields.io/badge/license-MIT-green.svg\">\n</p>\n\n## What is it ?\n\nPotodo, a (almost) flawless TODO/progress listing CLI tool for po files.\n\n### Potodo is part of poutils!\n\n[Poutils](https://pypi.org/project/poutils) (`.po` utils) is is a metapackage to easily install usefull Python tools to use with po files\nand `potodo` is a part of it! Go check out [Poutils](https://pypi.org/project/poutils) to discover the other useful tools for `po` file related translation!\n\n\n## Installation\n\n```sh\npip install potodo\n```\n\n## Usage example\n\nWhen ran in the [french CPython documentation\ntranslation](https://git.afpy.org/AFPy/python-docs-fr/) it shows:\n\n```\n$ potodo --exclude venv .venv whatsnew c-api/ distutils/\n\n# python-docs-fr (95.31% done)\n\n- bugs.po                         29 /  30 ( 96.0% translated).\n- copyright.po                     6 /   7 ( 85.0% translated), 1 fuzzy.\n- license.po                      87 /  91 ( 95.0% translated), 2 fuzzy.\n\n\n# extending (56.81% done)\n\n- building.po                     22 /  23 ( 95.0% translated), 1 fuzzy.\n- extending.po                   120 / 158 ( 75.0% translated), 8 fuzzy.\n- index.po                        11 /  12 ( 91.0% translated), 1 fuzzy.\n- newtypes.po                     38 /  89 ( 42.0% translated), 3 fuzzy.\n- newtypes_tutorial.po            31 / 123 ( 25.0% translated), 2 fuzzy.\n- windows.po                      20 /  21 ( 95.0% translated), 1 fuzzy.\n\n[...]\n\n# TOTAL (50.01% done)\n```\n\n### Handling reservations\n\nTo avoid having two translators work on the same file at the same\ntime, one can tell other translations that a file is being translated\nusing an issue or a draft pull request.\n\n`potodo` can fetch those issues and display it. It currently work with\nGitea and Github.\n\nFor example, in a clone of\n[python-docs-fr](https://git.afpy.org/AFPy/python-docs-fr/) you can\nrun:\n\n```\n$ potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude .venv\n[...]\n# extending (56.81% done)\n\n- building.po                     22 /  23 ( 95.0% translated), 1 fuzzy, reserved by Starmania.\n- extending.po                   120 / 158 ( 75.0% translated), 8 fuzzy.\n- index.po                        11 /  12 ( 91.0% translated), 1 fuzzy.\n- newtypes.po                     38 /  89 ( 42.0% translated), 3 fuzzy.\n- newtypes_tutorial.po            31 / 123 ( 25.0% translated), 2 fuzzy.\n- windows.po                      20 /  21 ( 95.0% translated), 1 fuzzy.\n\n\n# faq (90.88% done)\n\n- extending.po                    55 /  58 ( 94.0% translated), 3 fuzzy.\n- general.po                      88 /  98 ( 89.0% translated).\n- gui.po                          16 /  17 ( 94.0% translated), 1 fuzzy, reserved by Iucounu.\n- library.po                     139 / 140 ( 99.0% translated).\n- programming.po                 340 / 389 ( 87.0% translated), 40 fuzzy.\n[...]\n```\n\nNotice the **reserved by** column.\n\nFor github it would look like `--api-url 'https://api.github.com/repos/ORGANISATION/REPOSITORY/issues?state=open'`.\n\nIt's a bit verbose, so maybe hide this in a Makefile or whatever, but\nthis way you can tweak the parameters of the query, typically to\nfilter on a label if needed.\n\nThe way `potodo` maps issues to files is simple: the path of the file\njust has to be present in the issue title, so any issues like:\n\n- `I'm currently working on faq/extending.po`\n- `Je travaille sur extending/index.po`\n- `blah blah library/functions.po blah blah`\n\nwill correctly match their file.\n\n\n## Development setup\n\nCreate a virtual environment\n```sh\npython3 -m venv venv\n```\n\nActivate it\n```sh\nsource venv/bin/activate\n```\n\nInstall the dev requirements\n```sh\npip install -r requirements-dev.txt\n```\n\nInstall the pre-commit hook\n```sh\npre-commit install\n```\n\nInstall `potodo` in a development version\n```\npip install -e .\n```\n\n## Release History\n\n* v0.23.0\n  * Support basing progress calculations on external file structure (--pot flag) by @maciek\n* v0.22.0\n  * fix: consider finished files and hide them from output by default by @mattwang44\n  * feat: extract po files from all PR to also mark them as reserved by @fviard\n  * fix imports pre-commit hook by @maciek\n* v0.21.4\n  * CI and refactor by @mdk\n* v0.21.3\n  * Refactor by @mdk\n* v0.21.2\n    * FIX: Don't miss issues (reservations) to files containing multiple dots. Contributed by @eviau.\n* v0.21.0\n    * A nice new README\n* v0.20.0\n    * New exclude behavior with gitignore style matching !\n* v0.19.2\n    * Dropped `cache_args` to simplify cache functionality\n* v0.19.1\n    * Fixed a bug of division by 0\n    * Replaced Travis-ci tests with github actions\n* v0.19.0\n    * Fixed windows support\n* v0.17.3\n    * Fixed a math error where the completion %age of a folder was wrong\n    * Fixes on the `.potodoignore` file\n* v0.17.0\n    * Added tests\n    * Fixed bug where github would rate limit your IP address\n    * Fixed argument errors\n    * Added `-l` `--matching-files` Which will print the path of files matching your arguments\n* v0.16.0\n    * Args passed to potodo are now cached as well ! This allows for a better control of what is cached !\n    * The ignore file now works as the .gitignore does. Add a venv/ in your .potodoignore for example :)\n* v0.15.0\n    * Potodo now supports .potodoignore files ! You can finally ignore the venv you made \ud83c\udf89\n* v0.14.3\n    * Added cache versioning to avoid errors when cache changes, for example if files are moved between `potodo` versions.\n* v0.14.2\n    * Nothing new, just code moved around ! Thanks for sticking around \ud83c\udf89\n* v0.14.1\n    * Added `--only-reserved` option to display only reserved filed\n    * Added `--reserved-dates` to display when a file was reserved\n    * Added cache to cache `pofiles` to speedup the reading process\n    * Added logging for verbosity\n    * Added interactive option with `--interactive`\n    * Added contributors in the readme\n* < v0.14.1\n    * Base version\n\n## Contributing\n\n1. Fork it (<https://git.afpy.org/repo/fork/100>)\n2. Create your feature branch (`git checkout -b feature/fooBar`\n\n`/!\\` Don't forget to bump the version in `potodo/__init__.py` when you're pushing your changes to your branch\n\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "List .po files to be translated.",
    "version": "0.23.0",
    "project_urls": {
        "Homepage": "https://git.afpy.org/AFPy/potodo"
    },
    "split_keywords": [
        "potodo",
        " gettext",
        " i18n"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18655e98e88e23a06d8f04080a820a963a0236cb4033cb600ab809d4cabe926a",
                "md5": "4a8d451f7b5fd9fc875fa4d80fa0d07c",
                "sha256": "1fa96126c49902aeabc0de9dc431f1d31db441c745b9d1e9cfce83f36031b7f1"
            },
            "downloads": -1,
            "filename": "potodo-0.23.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4a8d451f7b5fd9fc875fa4d80fa0d07c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15518,
            "upload_time": "2024-12-07T14:44:03",
            "upload_time_iso_8601": "2024-12-07T14:44:03.706944Z",
            "url": "https://files.pythonhosted.org/packages/18/65/5e98e88e23a06d8f04080a820a963a0236cb4033cb600ab809d4cabe926a/potodo-0.23.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7493975b5ef746877fc94143f2790d738efd0dfd297918ed8ce8311ad86728b3",
                "md5": "ee442f24d7769043fcd73ca3eea67be6",
                "sha256": "2ac416d8e9c187dbe36e7c98a52290020b16e4c21ab94da56ac36a34c77a7dba"
            },
            "downloads": -1,
            "filename": "potodo-0.23.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ee442f24d7769043fcd73ca3eea67be6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 26092,
            "upload_time": "2024-12-07T14:44:04",
            "upload_time_iso_8601": "2024-12-07T14:44:04.866005Z",
            "url": "https://files.pythonhosted.org/packages/74/93/975b5ef746877fc94143f2790d738efd0dfd297918ed8ce8311ad86728b3/potodo-0.23.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-07 14:44:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "potodo"
}
        
Elapsed time: 5.37980s