%global _empty_manifest_terminate_build 0 Name: python-random-cat Version: 1.0.1 Release: 1 Summary: Modul/Command Line Tool to get cat images License: MIT URL: https://github.com/gravmatt/random-cat Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3d/bb/6d2782f55b6d8c1cd57174440d005699e9f307bf6a6a61aab2d50abe9830/random-cat-1.0.1.tar.gz BuildArch: noarch %description # random-cat random-cat is a amazing modul to get cat images. This Project won't be posible without the great Cat API (http://thecatapi.com). ## Big Thanks to the great Cat API Go and visit [http://thecatapi.com](http://thecatapi.com) ![alt text](http://thecatapi.com/api/images/get?type=gif "See? amazing!") **Python 2 and 3 compatible** ## Installation Install through **pip**. ``` $ pip install random-cat ``` or get from source ``` $ git clone https://github.com/gravmatt/random-cat $ cd random-cat $ python setup.py install ``` ## Usage The cat module has just one function **getCat()** with three optional arguments. ### Arguments **directory** - default is the current directory **filename** - default is a unique id **format** - default is _png_. optional _png_, _jpg_ and _gif_ is available ``` import cat # cat.getCat(directory=None, filename=None, format='png') cat.getCat(directory='/users/tor', filename='cat', format='gif') # /users/tor/cat.gif ``` The function return the image name (absolute path if directory is specified) of the image. ### Command Line You can also request an image on the terminal. ``` $ randomcat [format] [file] # Example: $ randomcat gif /users/tor/cat.gif ``` The two arguments _format_ and _file_ are optional. You can select the formats _png_, _jpg_ or _gif_. The command return the filename/absolute path of the image to the standard output (stdout). ### Licence The MIT License (MIT) %package -n python3-random-cat Summary: Modul/Command Line Tool to get cat images Provides: python-random-cat BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-random-cat # random-cat random-cat is a amazing modul to get cat images. This Project won't be posible without the great Cat API (http://thecatapi.com). ## Big Thanks to the great Cat API Go and visit [http://thecatapi.com](http://thecatapi.com) ![alt text](http://thecatapi.com/api/images/get?type=gif "See? amazing!") **Python 2 and 3 compatible** ## Installation Install through **pip**. ``` $ pip install random-cat ``` or get from source ``` $ git clone https://github.com/gravmatt/random-cat $ cd random-cat $ python setup.py install ``` ## Usage The cat module has just one function **getCat()** with three optional arguments. ### Arguments **directory** - default is the current directory **filename** - default is a unique id **format** - default is _png_. optional _png_, _jpg_ and _gif_ is available ``` import cat # cat.getCat(directory=None, filename=None, format='png') cat.getCat(directory='/users/tor', filename='cat', format='gif') # /users/tor/cat.gif ``` The function return the image name (absolute path if directory is specified) of the image. ### Command Line You can also request an image on the terminal. ``` $ randomcat [format] [file] # Example: $ randomcat gif /users/tor/cat.gif ``` The two arguments _format_ and _file_ are optional. You can select the formats _png_, _jpg_ or _gif_. The command return the filename/absolute path of the image to the standard output (stdout). ### Licence The MIT License (MIT) %package help Summary: Development documents and examples for random-cat Provides: python3-random-cat-doc %description help # random-cat random-cat is a amazing modul to get cat images. This Project won't be posible without the great Cat API (http://thecatapi.com). ## Big Thanks to the great Cat API Go and visit [http://thecatapi.com](http://thecatapi.com) ![alt text](http://thecatapi.com/api/images/get?type=gif "See? amazing!") **Python 2 and 3 compatible** ## Installation Install through **pip**. ``` $ pip install random-cat ``` or get from source ``` $ git clone https://github.com/gravmatt/random-cat $ cd random-cat $ python setup.py install ``` ## Usage The cat module has just one function **getCat()** with three optional arguments. ### Arguments **directory** - default is the current directory **filename** - default is a unique id **format** - default is _png_. optional _png_, _jpg_ and _gif_ is available ``` import cat # cat.getCat(directory=None, filename=None, format='png') cat.getCat(directory='/users/tor', filename='cat', format='gif') # /users/tor/cat.gif ``` The function return the image name (absolute path if directory is specified) of the image. ### Command Line You can also request an image on the terminal. ``` $ randomcat [format] [file] # Example: $ randomcat gif /users/tor/cat.gif ``` The two arguments _format_ and _file_ are optional. You can select the formats _png_, _jpg_ or _gif_. The command return the filename/absolute path of the image to the standard output (stdout). ### Licence The MIT License (MIT) %prep %autosetup -n random-cat-1.0.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-random-cat -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 1.0.1-1 - Package Spec generated