summaryrefslogtreecommitdiff
path: root/python-randfacts.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-randfacts.spec')
-rw-r--r--python-randfacts.spec354
1 files changed, 354 insertions, 0 deletions
diff --git a/python-randfacts.spec b/python-randfacts.spec
new file mode 100644
index 0000000..b13fbb9
--- /dev/null
+++ b/python-randfacts.spec
@@ -0,0 +1,354 @@
+%global _empty_manifest_terminate_build 0
+Name: python-randfacts
+Version: 0.20.1
+Release: 1
+Summary: Package to generate random facts
+License: MIT License
+URL: https://github.com/TabulateJarl8/randfacts
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/58/3e/c2d84de058ebd855fcbe2392eea0d7cbd1ed526792e5dbd2e5055450a16f/randfacts-0.20.1.tar.gz
+BuildArch: noarch
+
+
+%description
+<p align="center">
+<img src="https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg" />
+</p>
+<p align="center">
+ <a href="https://badge.fury.io/py/randfacts"><img alt="PyPI" src="https://img.shields.io/pypi/v/randfacts" /></a>
+ <a href="https://aur.archlinux.org/packages/python-randfacts/"><img alt="AUR version" src="https://img.shields.io/aur/version/python-randfacts"></a>
+ <a href="https://pepy.tech/project/randfacts"><img alt="Downloads" src="https://pepy.tech/badge/randfacts" /></a>
+ <a href="https://pypi.python.org/pypi/randfacts/"><img alt="PyPI license" src="https://img.shields.io/pypi/l/randfacts.svg" /></a>
+ <a href="https://GitHub.com/TabulateJarl8/randfacts/graphs/commit-activity"><img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /></a>
+ <a href="https://GitHub.com/TabulateJarl8/randfacts/issues/"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/TabulateJarl8/randfacts.svg" /></a>
+ <a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
+ <a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
+ <a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
+</p>
+
+Randfacts is a Python module that generates random facts. You can use `randfacts.get_fact()` to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.
+
+# Installation
+
+randfacts can either be installed via pip or via the AUR, whichever way you prefer.
+
+### Installation via pip:
+
+```sh
+$ pip3 install randfacts
+```
+
+### Installation via AUR:
+
+Via your AUR helper, like paru:
+```sh
+$ paru -S python-randfacts
+```
+
+Or manually
+```sh
+$ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts
+$ makepkg -si
+```
+
+# Usage and examples
+
+```python
+import randfacts
+x = randfacts.get_fact()
+print(x)
+```
+The above example will print a random fact like:
+`Penguins can't taste sweet or savory flavors, only sour and salty ones`
+
+This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.
+```python
+from randfacts import get_fact
+print(get_fact(False))
+# or
+print(get_fact(filter_enabled=False))
+```
+
+`get_fact` also has a parameter that will make the function only return unsafe facts. This argument takes precedence over the `filter_enabled` argument. For example:
+
+```py
+print(get_fact(only_unsafe=True))
+```
+
+If you want to access the list of facts directly, you can just import the `safe_facts`, `unsafe_facts`, or `all_facts` lists from the randfacts module.
+
+
+## Command line usage
+
+randfacts can be executed via the command line with the following commands:
+
+Normal execution; only SFW (safe for work) facts
+
+```sh
+$ python3 -m randfacts
+```
+
+The unsafe argument can be supplied to provide only NSFW (not safe for work) facts
+
+```sh
+$ python3 -m randfacts --unsafe
+```
+
+The mixed argument can be provided to provide both SFW and NSFW facts.
+
+```sh
+$ python3 -m randfacts --mixed
+```
+
+More help.
+
+```sh
+$ python3 -m randfacts --help
+```
+
+
+%package -n python3-randfacts
+Summary: Package to generate random facts
+Provides: python-randfacts
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-randfacts
+<p align="center">
+<img src="https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg" />
+</p>
+<p align="center">
+ <a href="https://badge.fury.io/py/randfacts"><img alt="PyPI" src="https://img.shields.io/pypi/v/randfacts" /></a>
+ <a href="https://aur.archlinux.org/packages/python-randfacts/"><img alt="AUR version" src="https://img.shields.io/aur/version/python-randfacts"></a>
+ <a href="https://pepy.tech/project/randfacts"><img alt="Downloads" src="https://pepy.tech/badge/randfacts" /></a>
+ <a href="https://pypi.python.org/pypi/randfacts/"><img alt="PyPI license" src="https://img.shields.io/pypi/l/randfacts.svg" /></a>
+ <a href="https://GitHub.com/TabulateJarl8/randfacts/graphs/commit-activity"><img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /></a>
+ <a href="https://GitHub.com/TabulateJarl8/randfacts/issues/"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/TabulateJarl8/randfacts.svg" /></a>
+ <a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
+ <a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
+ <a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
+</p>
+
+Randfacts is a Python module that generates random facts. You can use `randfacts.get_fact()` to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.
+
+# Installation
+
+randfacts can either be installed via pip or via the AUR, whichever way you prefer.
+
+### Installation via pip:
+
+```sh
+$ pip3 install randfacts
+```
+
+### Installation via AUR:
+
+Via your AUR helper, like paru:
+```sh
+$ paru -S python-randfacts
+```
+
+Or manually
+```sh
+$ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts
+$ makepkg -si
+```
+
+# Usage and examples
+
+```python
+import randfacts
+x = randfacts.get_fact()
+print(x)
+```
+The above example will print a random fact like:
+`Penguins can't taste sweet or savory flavors, only sour and salty ones`
+
+This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.
+```python
+from randfacts import get_fact
+print(get_fact(False))
+# or
+print(get_fact(filter_enabled=False))
+```
+
+`get_fact` also has a parameter that will make the function only return unsafe facts. This argument takes precedence over the `filter_enabled` argument. For example:
+
+```py
+print(get_fact(only_unsafe=True))
+```
+
+If you want to access the list of facts directly, you can just import the `safe_facts`, `unsafe_facts`, or `all_facts` lists from the randfacts module.
+
+
+## Command line usage
+
+randfacts can be executed via the command line with the following commands:
+
+Normal execution; only SFW (safe for work) facts
+
+```sh
+$ python3 -m randfacts
+```
+
+The unsafe argument can be supplied to provide only NSFW (not safe for work) facts
+
+```sh
+$ python3 -m randfacts --unsafe
+```
+
+The mixed argument can be provided to provide both SFW and NSFW facts.
+
+```sh
+$ python3 -m randfacts --mixed
+```
+
+More help.
+
+```sh
+$ python3 -m randfacts --help
+```
+
+
+%package help
+Summary: Development documents and examples for randfacts
+Provides: python3-randfacts-doc
+%description help
+<p align="center">
+<img src="https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg" />
+</p>
+<p align="center">
+ <a href="https://badge.fury.io/py/randfacts"><img alt="PyPI" src="https://img.shields.io/pypi/v/randfacts" /></a>
+ <a href="https://aur.archlinux.org/packages/python-randfacts/"><img alt="AUR version" src="https://img.shields.io/aur/version/python-randfacts"></a>
+ <a href="https://pepy.tech/project/randfacts"><img alt="Downloads" src="https://pepy.tech/badge/randfacts" /></a>
+ <a href="https://pypi.python.org/pypi/randfacts/"><img alt="PyPI license" src="https://img.shields.io/pypi/l/randfacts.svg" /></a>
+ <a href="https://GitHub.com/TabulateJarl8/randfacts/graphs/commit-activity"><img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /></a>
+ <a href="https://GitHub.com/TabulateJarl8/randfacts/issues/"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/TabulateJarl8/randfacts.svg" /></a>
+ <a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
+ <a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
+ <a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
+</p>
+
+Randfacts is a Python module that generates random facts. You can use `randfacts.get_fact()` to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.
+
+# Installation
+
+randfacts can either be installed via pip or via the AUR, whichever way you prefer.
+
+### Installation via pip:
+
+```sh
+$ pip3 install randfacts
+```
+
+### Installation via AUR:
+
+Via your AUR helper, like paru:
+```sh
+$ paru -S python-randfacts
+```
+
+Or manually
+```sh
+$ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts
+$ makepkg -si
+```
+
+# Usage and examples
+
+```python
+import randfacts
+x = randfacts.get_fact()
+print(x)
+```
+The above example will print a random fact like:
+`Penguins can't taste sweet or savory flavors, only sour and salty ones`
+
+This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.
+```python
+from randfacts import get_fact
+print(get_fact(False))
+# or
+print(get_fact(filter_enabled=False))
+```
+
+`get_fact` also has a parameter that will make the function only return unsafe facts. This argument takes precedence over the `filter_enabled` argument. For example:
+
+```py
+print(get_fact(only_unsafe=True))
+```
+
+If you want to access the list of facts directly, you can just import the `safe_facts`, `unsafe_facts`, or `all_facts` lists from the randfacts module.
+
+
+## Command line usage
+
+randfacts can be executed via the command line with the following commands:
+
+Normal execution; only SFW (safe for work) facts
+
+```sh
+$ python3 -m randfacts
+```
+
+The unsafe argument can be supplied to provide only NSFW (not safe for work) facts
+
+```sh
+$ python3 -m randfacts --unsafe
+```
+
+The mixed argument can be provided to provide both SFW and NSFW facts.
+
+```sh
+$ python3 -m randfacts --mixed
+```
+
+More help.
+
+```sh
+$ python3 -m randfacts --help
+```
+
+
+%prep
+%autosetup -n randfacts-0.20.1
+
+%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-randfacts -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.20.1-1
+- Package Spec generated