From bfecdeac40805430d9fb79289b4c91d88af9c72c Mon Sep 17 00:00:00 2001 From: Jules Lasne Date: Sun, 27 Dec 2020 12:52:23 +0100 Subject: [PATCH] Base of the standard readme --- .pre-commit-config.yaml | 15 ++++++ README.md | 100 +++++++++++++++++++++++++++++++++------- media/Potodo.png | Bin 0 -> 4094 bytes 3 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 media/Potodo.png diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a6e86c5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.1.0 + hooks: + - id: flake8 + - repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + language_version: python3.7 + - repo: https://github.com/asottile/reorder_python_imports + rev: v1.9.0 + hooks: + - id: reorder-python-imports + args: [--py3-plus] diff --git a/README.md b/README.md index fcbccc4..a57926b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,18 @@ -# Potodo -![Build status](https://github.com/AFPy/Potodo/workflows/Tests/badge.svg) +[comment]: <> (

) +

+ +                    +![Python](https://img.shields.io/badge/python-v3.6+-blue.svg) +![Build status](https://img.shields.io/github/workflow/status/afpy/potodo/Tests) +[![GitHub Issues](https://img.shields.io/github/issues/afpy/potodo.svg)](https://github.com/afpy/potodo/issues) +![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) +![PyPI](https://img.shields.io/pypi/v/potodo) [![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) -![PyPI](https://img.shields.io/pypi/v/potodo) + +## What is it ? Potodo, a (almost) flawless TODO/progress listing CLI tool for po files. @@ -12,13 +21,14 @@ Potodo, a (almost) flawless TODO/progress listing CLI tool for po files. [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 -```bash +```sh pip install potodo ``` -## Usage +## Usage example ``` usage: potodo [-h] [-p path] [-e path [path ...]] [-a X] [-b X] [-f] [-o] [-n] [-c] [-j] [--exclude-fuzzy] [--exclude-reserved] [--only-reserved] [--show-reservation-dates] [--no-cache] [-i] [-l] [--version] [-v] @@ -49,22 +59,80 @@ optional arguments: -v, --verbose Increases output verbosity ``` +## 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.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 -You can run the tests using `tox` locally like: +1. Fork it () +2. Create your feature branch (`git checkout -b feature/fooBar` - tox -p auto +`/!\` Don't forget to bump the version in `potodo/__init__.py` when you're pushing your changes to your branch -before commiting. +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 -A pre-commit hook like: -```sh -cat < .git/hooks/pre-commit -#!/bin/sh -exec tox -s -p all -EOF -``` -may help. ## Contributors ✨ diff --git a/media/Potodo.png b/media/Potodo.png new file mode 100644 index 0000000000000000000000000000000000000000..a190a94e67dea498d27430b50bef99c22c28f057 GIT binary patch literal 4094 zcmaJ^dpy(s_n#sQWkT-vQdEdWuH`;`+;fRxkqvX7S?)f$@oCC!EhM*? zVhPh+E0?+CI?Oe{x9a!(VkH^kqkF(e1yw2tMJSWN0-1r!WFb4<(I%Wbhum*ux zT7ch<;3I%M=V&($DB`^I^({^G^(6x^{wOaWBnWgiJu+Pz)_PU69RYv#gkM)PQN!Ky z(fP#W%V_>&OR0X27aF-v+iYgS8GHi9&9z^@cDM~Rw>#Lg+v`GhL4g>oH8%akeh!~w zTS&l2>TRa@?Iloj<42q7TcVcG53tkU^<@ov`3B=Cdu1h<=ZZXPoq?bwYNBuL|7740S0Fdfk(}V|ZRS4kToo zWqCJV@P)9PtaXh9bD3K`D&0w$bnWKkjjL?(r#iTQvNzR38JWC()@P4n-+tLJ<^wMt z!awkhmKerOu!6M?+dFZ#~gf`9{P=_h`ZqIiS2+I+- zzl;q)7eQ_yGg&RLJfJxm0CNZefjD^&zAT^z`GSCw9cyA{$Uey>!g-QQIO9tlpc29w z-oWbn`}!jNupoU5(iMwzm%QzT^^`O=F|)M4b6fyO1FDIEu1(0$!l`>x>`dDRvZ8pt!aI0!lOp#DE%U$tJZ0#=MoRd{? zP)$p6zvXJ`$|2+*i#x=7!_h^J(^u}96D6Tz>uW!Kq*S{!zu;#ynXL0;TIY7JSK&Xti>d1q6}=0|F8U7!KA01gjJvVjzIf1%p6;OR|DMS0RT$W!+O4D<`M? z$wU89{nyUFA?FQ`)^yMrN&BaHCHCo6?&K4E+`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