summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 15:36:49 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 15:36:49 +0000
commit9bbfea8c96179305aae2e2983a288b83b3b4eaaa (patch)
tree32339379d313fbc6b857dc37639cea8cdac3080c
parentdb3c2ead6ebc3c8558f03b00fbb168f04583f520 (diff)
automatic import of python-cron-descriptor
-rw-r--r--.gitignore1
-rw-r--r--python-cron-descriptor.spec510
-rw-r--r--sources1
3 files changed, 512 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..3bfc09c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cron_descriptor-1.2.35.tar.gz
diff --git a/python-cron-descriptor.spec b/python-cron-descriptor.spec
new file mode 100644
index 0000000..39a4025
--- /dev/null
+++ b/python-cron-descriptor.spec
@@ -0,0 +1,510 @@
+%global _empty_manifest_terminate_build 0
+Name: python-cron-descriptor
+Version: 1.2.35
+Release: 1
+Summary: A Python library that converts cron expressions into human readable strings.
+License: MIT License
+URL: https://github.com/Salamek/cron-descriptor
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/81/5f/8a710eef7070e9fa5e62a911f00af166b63ccfd8ccb62d296ddc333a9c4a/cron_descriptor-1.2.35.tar.gz
+BuildArch: noarch
+
+
+%description
+# Cron Descriptor
+
+[![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)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/salamek)
+
+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 17 languages
+ * Supports Python 2.7 - 3.10
+
+## Installation
+Using PIP
+```bash
+pip install cron-descriptor
+```
+
+## Usage example
+
+### Simple
+```python
+from cron_descriptor import get_description, ExpressionDescriptor
+
+print(get_description("* 2 3 * *"))
+
+#OR
+
+print(str(ExpressionDescriptor("* 2 3 * *")))
+```
+
+### Advanced
+```python
+# Consult Options.py/CasingTypeEnum.py/DescriptionTypeEnum.py for more info
+from cron_descriptor import Options, CasingTypeEnum, DescriptionTypeEnum, ExpressionDescriptor
+
+descriptor = ExpressionDescriptor(
+ expression = "*/10 * * * *",
+ throw_exception_on_parse_error = True,
+ casing_type = CasingTypeEnum.Sentence,
+ use_24hour_time_format = True
+)
+
+# GetDescription uses DescriptionTypeEnum.FULL by default:
+print(descriptor.get_description())
+print("{}".format(descriptor))
+
+# 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
+descriptor = ExpressionDescriptor("*/10 * * * *", options)
+print(descriptor.get_description(DescriptionTypeEnum.FULL))
+```
+
+## Languages Available
+
+|Language| Locale Code | Contributor |
+|--------|-------------|-------------|
+|English |en|[Brady Holt](https://github.com/bradyholt)|
+|Brazilian |pt_PT|[Renato Lima](https://github.com/natenho)|
+|Chinese Simplified | zh_CN |[Star Peng](https://github.com/starpeng)|
+|Spanish |es_ES|[Ivan Santos](https://github.com/ivansg)|
+|Norwegian |nb_NO|[Siarhei Khalipski](https://github.com/KhalipskiSiarhei)|
+|Turkish |tr_TR|[Mustafa SADEDİL](https://github.com/sadedil)|
+|Dutch |nl_NL|[TotalMace](https://github.com/TotalMace)|
+|Russian |ru_RU|[LbISS](https://github.com/LbISS)|
+|French |fr_FR|[Arnaud TAMAILLON](https://github.com/Greybird)|
+|German |de_DE|[Michael Schuler](https://github.com/mschuler)|
+|Ukrainian |uk_UA|[Taras](https://github.com/tbudurovych)|
+|Italian |it_IT|[rinaldihno](https://github.com/rinaldihno)|
+|Czech |cs_CZ|[Adam Schubert](https://github.com/salamek)|
+|Swedish |sv_SE|[Åke Engelbrektson](https://github.com/eson57)|
+|Tamil |ta_IN|[Sankar Hari](https://github.com/sankarhari)|
+|Persian|fa_IR|[M. Yas. Davoodeh](https://github.com/Davoodeh)|
+|Korean|ko_KR|[KyuJoo Han](https://github.com/hanqyu)|
+|Japanese |ja_JP|[Tho Nguyen](https://github.com/tho-asterist)|
+
+<!-- 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)
+ - Golang - [https://github.com/jsuar/go-cron-descriptor](https://github.com/jsuar/go-cron-descriptor)
+
+## Running Unit Tests
+
+```bash
+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:
+```bash
+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:
+```bash
+cd cron_descriptor
+xgettext *.py -o locale/YOUR_LOCALE_CODE.po
+```
+
+Generating *.mo file from *.po file. In root directory run command:
+```bash
+msgfmt -o cron_descriptor/locale/YOUR_LOCALE_CODE.mo cron_descriptor/locale/YOUR_LOCALE_CODE.po
+```
+
+## Developing
+
+All suggestions and PR's are welcomed
+
+Just clone this repository and register pre-commit hook by running:
+
+```bash
+ln -s ../../pre-commit.sh .git/hooks/pre-commit
+```
+
+Then install dev requirements:
+
+```bash
+pip install pep8
+pip install flake8
+pip install pep8-naming
+```
+
+%package -n python3-cron-descriptor
+Summary: A Python library that converts cron expressions into human readable strings.
+Provides: python-cron-descriptor
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-cron-descriptor
+# Cron Descriptor
+
+[![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)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/salamek)
+
+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 17 languages
+ * Supports Python 2.7 - 3.10
+
+## Installation
+Using PIP
+```bash
+pip install cron-descriptor
+```
+
+## Usage example
+
+### Simple
+```python
+from cron_descriptor import get_description, ExpressionDescriptor
+
+print(get_description("* 2 3 * *"))
+
+#OR
+
+print(str(ExpressionDescriptor("* 2 3 * *")))
+```
+
+### Advanced
+```python
+# Consult Options.py/CasingTypeEnum.py/DescriptionTypeEnum.py for more info
+from cron_descriptor import Options, CasingTypeEnum, DescriptionTypeEnum, ExpressionDescriptor
+
+descriptor = ExpressionDescriptor(
+ expression = "*/10 * * * *",
+ throw_exception_on_parse_error = True,
+ casing_type = CasingTypeEnum.Sentence,
+ use_24hour_time_format = True
+)
+
+# GetDescription uses DescriptionTypeEnum.FULL by default:
+print(descriptor.get_description())
+print("{}".format(descriptor))
+
+# 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
+descriptor = ExpressionDescriptor("*/10 * * * *", options)
+print(descriptor.get_description(DescriptionTypeEnum.FULL))
+```
+
+## Languages Available
+
+|Language| Locale Code | Contributor |
+|--------|-------------|-------------|
+|English |en|[Brady Holt](https://github.com/bradyholt)|
+|Brazilian |pt_PT|[Renato Lima](https://github.com/natenho)|
+|Chinese Simplified | zh_CN |[Star Peng](https://github.com/starpeng)|
+|Spanish |es_ES|[Ivan Santos](https://github.com/ivansg)|
+|Norwegian |nb_NO|[Siarhei Khalipski](https://github.com/KhalipskiSiarhei)|
+|Turkish |tr_TR|[Mustafa SADEDİL](https://github.com/sadedil)|
+|Dutch |nl_NL|[TotalMace](https://github.com/TotalMace)|
+|Russian |ru_RU|[LbISS](https://github.com/LbISS)|
+|French |fr_FR|[Arnaud TAMAILLON](https://github.com/Greybird)|
+|German |de_DE|[Michael Schuler](https://github.com/mschuler)|
+|Ukrainian |uk_UA|[Taras](https://github.com/tbudurovych)|
+|Italian |it_IT|[rinaldihno](https://github.com/rinaldihno)|
+|Czech |cs_CZ|[Adam Schubert](https://github.com/salamek)|
+|Swedish |sv_SE|[Åke Engelbrektson](https://github.com/eson57)|
+|Tamil |ta_IN|[Sankar Hari](https://github.com/sankarhari)|
+|Persian|fa_IR|[M. Yas. Davoodeh](https://github.com/Davoodeh)|
+|Korean|ko_KR|[KyuJoo Han](https://github.com/hanqyu)|
+|Japanese |ja_JP|[Tho Nguyen](https://github.com/tho-asterist)|
+
+<!-- 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)
+ - Golang - [https://github.com/jsuar/go-cron-descriptor](https://github.com/jsuar/go-cron-descriptor)
+
+## Running Unit Tests
+
+```bash
+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:
+```bash
+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:
+```bash
+cd cron_descriptor
+xgettext *.py -o locale/YOUR_LOCALE_CODE.po
+```
+
+Generating *.mo file from *.po file. In root directory run command:
+```bash
+msgfmt -o cron_descriptor/locale/YOUR_LOCALE_CODE.mo cron_descriptor/locale/YOUR_LOCALE_CODE.po
+```
+
+## Developing
+
+All suggestions and PR's are welcomed
+
+Just clone this repository and register pre-commit hook by running:
+
+```bash
+ln -s ../../pre-commit.sh .git/hooks/pre-commit
+```
+
+Then install dev requirements:
+
+```bash
+pip install pep8
+pip install flake8
+pip install pep8-naming
+```
+
+%package help
+Summary: Development documents and examples for cron-descriptor
+Provides: python3-cron-descriptor-doc
+%description help
+# Cron Descriptor
+
+[![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)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/salamek)
+
+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 17 languages
+ * Supports Python 2.7 - 3.10
+
+## Installation
+Using PIP
+```bash
+pip install cron-descriptor
+```
+
+## Usage example
+
+### Simple
+```python
+from cron_descriptor import get_description, ExpressionDescriptor
+
+print(get_description("* 2 3 * *"))
+
+#OR
+
+print(str(ExpressionDescriptor("* 2 3 * *")))
+```
+
+### Advanced
+```python
+# Consult Options.py/CasingTypeEnum.py/DescriptionTypeEnum.py for more info
+from cron_descriptor import Options, CasingTypeEnum, DescriptionTypeEnum, ExpressionDescriptor
+
+descriptor = ExpressionDescriptor(
+ expression = "*/10 * * * *",
+ throw_exception_on_parse_error = True,
+ casing_type = CasingTypeEnum.Sentence,
+ use_24hour_time_format = True
+)
+
+# GetDescription uses DescriptionTypeEnum.FULL by default:
+print(descriptor.get_description())
+print("{}".format(descriptor))
+
+# 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
+descriptor = ExpressionDescriptor("*/10 * * * *", options)
+print(descriptor.get_description(DescriptionTypeEnum.FULL))
+```
+
+## Languages Available
+
+|Language| Locale Code | Contributor |
+|--------|-------------|-------------|
+|English |en|[Brady Holt](https://github.com/bradyholt)|
+|Brazilian |pt_PT|[Renato Lima](https://github.com/natenho)|
+|Chinese Simplified | zh_CN |[Star Peng](https://github.com/starpeng)|
+|Spanish |es_ES|[Ivan Santos](https://github.com/ivansg)|
+|Norwegian |nb_NO|[Siarhei Khalipski](https://github.com/KhalipskiSiarhei)|
+|Turkish |tr_TR|[Mustafa SADEDİL](https://github.com/sadedil)|
+|Dutch |nl_NL|[TotalMace](https://github.com/TotalMace)|
+|Russian |ru_RU|[LbISS](https://github.com/LbISS)|
+|French |fr_FR|[Arnaud TAMAILLON](https://github.com/Greybird)|
+|German |de_DE|[Michael Schuler](https://github.com/mschuler)|
+|Ukrainian |uk_UA|[Taras](https://github.com/tbudurovych)|
+|Italian |it_IT|[rinaldihno](https://github.com/rinaldihno)|
+|Czech |cs_CZ|[Adam Schubert](https://github.com/salamek)|
+|Swedish |sv_SE|[Åke Engelbrektson](https://github.com/eson57)|
+|Tamil |ta_IN|[Sankar Hari](https://github.com/sankarhari)|
+|Persian|fa_IR|[M. Yas. Davoodeh](https://github.com/Davoodeh)|
+|Korean|ko_KR|[KyuJoo Han](https://github.com/hanqyu)|
+|Japanese |ja_JP|[Tho Nguyen](https://github.com/tho-asterist)|
+
+<!-- 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)
+ - Golang - [https://github.com/jsuar/go-cron-descriptor](https://github.com/jsuar/go-cron-descriptor)
+
+## Running Unit Tests
+
+```bash
+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:
+```bash
+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:
+```bash
+cd cron_descriptor
+xgettext *.py -o locale/YOUR_LOCALE_CODE.po
+```
+
+Generating *.mo file from *.po file. In root directory run command:
+```bash
+msgfmt -o cron_descriptor/locale/YOUR_LOCALE_CODE.mo cron_descriptor/locale/YOUR_LOCALE_CODE.po
+```
+
+## Developing
+
+All suggestions and PR's are welcomed
+
+Just clone this repository and register pre-commit hook by running:
+
+```bash
+ln -s ../../pre-commit.sh .git/hooks/pre-commit
+```
+
+Then install dev requirements:
+
+```bash
+pip install pep8
+pip install flake8
+pip install pep8-naming
+```
+
+%prep
+%autosetup -n cron-descriptor-1.2.35
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-cron-descriptor -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.35-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..8f2a5e2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+f1240c9b9e8d9c85dd9853ea5347bad0 cron_descriptor-1.2.35.tar.gz