Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of TestPyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# Cron Descriptor

Master: [![Master Build Status](https://api.travis-ci.org/Salamek/cron-descriptor.svg?branch=master)](https://travis-ci.org/Salamek/cron-descriptor) All: [![Build Status](https://api.travis-ci.org/Salamek/cron-descriptor.svg)](https://travis-ci.org/Salamek/cron-descriptor)

A Python library that converts cron expressions into human readable strings. Ported to Python from https://github.com/bradyholt/cron-expression-descriptor.

**Author**: Adam Schubert (https://www.salamek.cz)
**Original Author & Credit**: Brady Holt (http://www.geekytidbits.com)
**License**: [MIT](http://opensource.org/licenses/MIT)

## Features
* Supports all cron expression special characters including * / , - ? L W, #
* Supports 5, 6 (w/ seconds or year), or 7 (w/ seconds and year) part cron expressions
* Provides casing options (Sentence, Title, Lower, etc.)
* Localization with support for 14 languages
* Supports Python 2.7 - 3.4

## Installation
Using PIP
pip install cron-descriptor

## Usage example

# Simple
from cron_descriptor import get_description, ExpressionDescriptor

print(get_description("* 2 3 * *"))


print(str(ExpressionDescriptor("* 2 3 * *")))

# Advanced
# Consult Options.py/CasingTypeEnum.py/DescriptionTypeEnum.py for more info
from cron_descriptor import Options, CasingTypeEnum, DescriptionTypeEnum, ExpressionDescriptor

descripter = ExpressionDescriptor("*/10 * * * *", throw_exception_on_parse_error = True, casing_type = CasingTypeEnum.Sentence, use_24hour_time_format = True)
# GetDescription uses DescriptionTypeEnum.FULL by default:

#or passing Options class as second argument:

options = Options()
options.throw_exception_on_parse_error = True
options.casing_type = CasingTypeEnum.Sentence
options.use_24hour_time_format = True
descripter = ExpressionDescriptor("*/10 * * * *", options)


## Languages Available
* English ([Brady Holt](https://github.com/bradyholt))
* Brazilian ([Renato Lima](https://github.com/natenho))
* Spanish ([Ivan Santos](https://github.com/ivansg))
* Norwegian ([Siarhei Khalipski](https://github.com/KhalipskiSiarhei))
* Turkish ([Mustafa SADEDİL](https://github.com/sadedil))
* Dutch ([TotalMace](https://github.com/TotalMace))
* Chinese Simplified ([Star Peng](https://github.com/starpeng))
* Russian ([LbISS](https://github.com/LbISS))
* French ([Arnaud TAMAILLON](https://github.com/Greybird))
* German ([Michael Schuler](https://github.com/mschuler))
* Ukrainian ([Taras](https://github.com/tbudurovych))
* Italian ([rinaldihno](https://github.com/rinaldihno))
* Czech ([Adam Schubert](https://github.com/salamek))
* Swedish ([Åke Engelbrektson](https://github.com/eson57))

<!-- SOON
## Demo

## Download


## Original Source
- .NET - [https://github.com/bradyholt/cron-expression-descriptor](https://github.com/bradyholt/cron-expression-descriptor)

## Ports
- Java - [https://github.com/RedHogs/cron-parser](https://github.com/RedHogs/cron-parser)
- Ruby - [https://github.com/alpinweis/cronex](https://github.com/alpinweis/cronex)

## Running Unit Tests

python setup.py test

## Translating
cron-descriptor is using [Gettext](https://www.gnu.org/software/gettext/) for translations.

> To create new translation or edit existing one, i suggest using [Poedit](https://poedit.net/).

You can copy/rename and translate any file from `locale` directory:
cp ./cron_descriptor/locale/de_DE.po ./cron_descriptor/locale/YOUR_LOCALE_CODE.po
poedit ./cron_descriptor/locale/YOUR_LOCALE_CODE.po
or you can generate new untranslated *.po file from sources by running in `cron_descriptor` directory:
cd cron_descriptor
xgettext *.py -o locale/YOUR_LOCALE_CODE.po

Generating *.mo file from *.po file. In root directory run command:
msgfmt -o cron_descriptor/locale/YOUR_LOCALE_CODE.mo cron_descriptor/locale/YOUR_LOCALE_CODE.po

## Developing

All suggescions and PR's are welcomed

Just clone this repository and register pre-commit hook by running:

ln -s ../../pre-commit.sh .git/hooks/pre-commit

Then install dev requirements:

pip install pep8
pip install flake8
pip install pep8-naming
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cron_descriptor-1.2.5.tar.gz (25.0 kB) Copy SHA256 Checksum SHA256 Source Sep 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting