{"id":19036546,"url":"https://github.com/salamek/cron-descriptor","last_synced_at":"2025-05-15T17:05:01.780Z","repository":{"id":41165468,"uuid":"49784431","full_name":"Salamek/cron-descriptor","owner":"Salamek","description":"A Python library that converts cron expressions into human readable strings.","archived":false,"fork":false,"pushed_at":"2024-08-24T18:11:54.000Z","size":316,"stargazers_count":166,"open_issues_count":13,"forks_count":37,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-09T10:53:33.046Z","etag":null,"topics":["cron-descriptor","cron-expression","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Salamek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-16T17:58:39.000Z","updated_at":"2025-05-03T04:54:19.000Z","dependencies_parsed_at":"2024-01-29T22:25:25.333Z","dependency_job_id":"9d457435-fd07-43c1-936c-771b83101837","html_url":"https://github.com/Salamek/cron-descriptor","commit_stats":{"total_commits":200,"total_committers":23,"mean_commits":8.695652173913043,"dds":"0.17500000000000004","last_synced_commit":"0c575c6b9ca13ac8e004237cb9e6ba81f7f544d3"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salamek%2Fcron-descriptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salamek%2Fcron-descriptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salamek%2Fcron-descriptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salamek%2Fcron-descriptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Salamek","download_url":"https://codeload.github.com/Salamek/cron-descriptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384987,"owners_count":22062422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron-descriptor","cron-expression","python"],"created_at":"2024-11-08T21:54:45.785Z","updated_at":"2025-05-15T17:04:56.771Z","avatar_url":"https://github.com/Salamek.png","language":"Python","funding_links":["https://www.paypal.me/salamek"],"categories":[],"sub_categories":[],"readme":"# Cron Descriptor\n\n[![Python tests](https://github.com/Salamek/cron-descriptor/actions/workflows/python-test.yml/badge.svg)](https://github.com/Salamek/cron-descriptor/actions/workflows/python-test.yml)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/salamek)\n\nA Python library that converts cron expressions into human readable strings. Ported to Python from https://github.com/bradyholt/cron-expression-descriptor.\n\n**Author**: Adam Schubert (https://www.salamek.cz)  \n**Original Author \u0026 Credit**: Brady Holt (http://www.geekytidbits.com)  \n**License**: [MIT](http://opensource.org/licenses/MIT)\n\n## Features         \n * Supports all cron expression special characters including * / , - ? L W, #\n * Supports 5, 6 (w/ seconds or year), or 7 (w/ seconds and year) part cron expressions\n * Provides casing options (Sentence, Title, Lower, etc.)\n * Localization with support for 17 languages\n * Supports Python 3.8 - 3.12\n\n## Installation\nUsing PIP\n```bash\npip install cron-descriptor\n```\n\n## Usage example\n\n### Simple\n```python\nfrom cron_descriptor import get_description, ExpressionDescriptor\n\nprint(get_description(\"* 2 3 * *\"))\n\n#OR\n\nprint(str(ExpressionDescriptor(\"* 2 3 * *\")))\n```\n\n### Advanced\n```python\n# Consult Options.py/CasingTypeEnum.py/DescriptionTypeEnum.py for more info\nfrom cron_descriptor import Options, CasingTypeEnum, DescriptionTypeEnum, ExpressionDescriptor\n\ndescriptor = ExpressionDescriptor(\n    expression = \"*/10 * * * *\",\n    casing_type = CasingTypeEnum.Sentence,\n    use_24hour_time_format = True\n)\n\n# GetDescription uses DescriptionTypeEnum.FULL by default:\nprint(descriptor.get_description())\nprint(\"{}\".format(descriptor))\n\n# Or passing Options class as second argument:\n\noptions = Options()\noptions.casing_type = CasingTypeEnum.Sentence\noptions.use_24hour_time_format = True\ndescriptor = ExpressionDescriptor(\"*/10 * * * *\", options)\nprint(descriptor.get_description(DescriptionTypeEnum.FULL))\n```\n\n## Languages Available\n\n|Language| Locale Code | Contributor |\n|--------|-------------|-------------|\n|English |en|[Brady Holt](https://github.com/bradyholt)|\n|Brazilian |pt_PT|[Renato Lima](https://github.com/natenho)|\n|Chinese Simplified | zh_CN |[Star Peng](https://github.com/starpeng)|\n|Spanish |es_ES|[Ivan Santos](https://github.com/ivansg)|\n|Norwegian |nb_NO|[Siarhei Khalipski](https://github.com/KhalipskiSiarhei)|\n|Turkish |tr_TR|[Mustafa SADEDİL](https://github.com/sadedil)|\n|Dutch |nl_NL|[TotalMace](https://github.com/TotalMace)|\n|Russian |ru_RU|[LbISS](https://github.com/LbISS)|\n|French |fr_FR|[Arnaud TAMAILLON](https://github.com/Greybird)|\n|German |de_DE|[Michael Schuler](https://github.com/mschuler)|\n|Ukrainian |uk_UA|[Taras](https://github.com/tbudurovych)|\n|Italian |it_IT|[rinaldihno](https://github.com/rinaldihno)|\n|Czech |cs_CZ|[Adam Schubert](https://github.com/salamek)|\n|Swedish |sv_SE|[Åke Engelbrektson](https://github.com/eson57)|\n|Tamil |ta_IN|[Sankar Hari](https://github.com/sankarhari)|\n|Persian|fa_IR|[M. Yas. Davoodeh](https://github.com/Davoodeh)|\n|Korean|ko_KR|[KyuJoo Han](https://github.com/hanqyu)|\n|Japanese |ja_JP|[Tho Nguyen](https://github.com/tho-asterist)|\n\n\u003c!-- SOON\n## Demo\n\n\n\n## Download\n\n--\u003e\n\n## Original Source\n - .NET - [https://github.com/bradyholt/cron-expression-descriptor](https://github.com/bradyholt/cron-expression-descriptor)\n\n## Ports\n - Java     - [https://github.com/RedHogs/cron-parser](https://github.com/RedHogs/cron-parser)\n - Ruby     - [https://github.com/alpinweis/cronex](https://github.com/alpinweis/cronex)\n - Golang   - [https://github.com/jsuar/go-cron-descriptor](https://github.com/jsuar/go-cron-descriptor)\n\n## Running Unit Tests\n\n```bash\npython setup.py test\n```\n\n## Translating\ncron-descriptor is using [Gettext](https://www.gnu.org/software/gettext/) for translations.\n\n\u003e To create new translation or edit existing one, i suggest using [Poedit](https://poedit.net/).\n\nYou can copy/rename and translate any file from `locale` directory:\n```bash\ncp ./cron_descriptor/locale/de_DE.po ./cron_descriptor/locale/YOUR_LOCALE_CODE.po\npoedit ./cron_descriptor/locale/YOUR_LOCALE_CODE.po\n```\nor you can generate new untranslated *.po file from sources by running in `cron_descriptor` directory:\n```bash\ncd cron_descriptor\nxgettext *.py -o locale/YOUR_LOCALE_CODE.po\n```\n\nGenerating *.mo file from *.po file. In root directory run command:\n```bash\nmsgfmt -o cron_descriptor/locale/YOUR_LOCALE_CODE.mo cron_descriptor/locale/YOUR_LOCALE_CODE.po\n```\n\n## Developing\n\nAll suggestions and PR's are welcomed\n\nJust clone this repository and register pre-commit hook by running:\n\n```bash\nln -s ../../pre-commit.sh .git/hooks/pre-commit\n```\n\nThen install dev requirements:\n\n```bash\npip install ruff\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalamek%2Fcron-descriptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalamek%2Fcron-descriptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalamek%2Fcron-descriptor/lists"}