summaryrefslogtreecommitdiff
path: root/python-rarbgapi.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-rarbgapi.spec')
-rw-r--r--python-rarbgapi.spec340
1 files changed, 340 insertions, 0 deletions
diff --git a/python-rarbgapi.spec b/python-rarbgapi.spec
new file mode 100644
index 0000000..9076429
--- /dev/null
+++ b/python-rarbgapi.spec
@@ -0,0 +1,340 @@
+%global _empty_manifest_terminate_build 0
+Name: python-RarbgAPI
+Version: 0.5.0
+Release: 1
+Summary: A python3 wrapper for RARBG.to
+License: BSD
+URL: https://github.com/verybada/rarbgapi/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1a/da/8cae3a6e33807fdbc88624bc39bd1e379ce21b2f599f3778f6cdf19ced93/RarbgAPI-0.5.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-flake8
+Requires: python3-pycodestyle
+Requires: python3-pylint
+Requires: python3-pytest
+Requires: python3-pytest-cov
+Requires: python3-pytest-httpserver
+
+%description
+# rarbgapi
+
+This is a python3 wrapper for RARBG.to.
+
+The api object will automatically fetch/refresh the token and take care rate control (1 request/2 seconds)
+
+## Install
+```
+pip install rarbgapi
+```
+
+## Quickstart
+
+List new torrents
+
+``` python
+>>> import rarbgapi
+>>> client = rarbgapi.RarbgAPI()
+>>> for torrent in client.list():
+... print(torrent)
+...
+```
+
+The download link can be found in
+``` python
+>>> torrent.download
+```
+
+Get more torrents, the limit option supports 25, 50, 100 only.
+``` python
+>>> client.list(limit=100):
+```
+
+Search torrents with specific keyword or imdb, tvdb and themoviedb index via `search_imdb`, `search_tvdb` and `search_themoviedb`
+``` python
+>>> client.search(search_string="walking dead")
+```
+
+or specific category
+``` python
+>>> client.search(search_string="walking dead", categories=[rarbgapi.RarbgAPI.CATEGORY_TV_EPISODES, rarbgapi.RarbgAPI.CATEGORY_TV_EPISODES_UHD])
+```
+
+## options
+Here are options to configure rarbgapi client
+
+
+| Name | Description |
+| -------- | -------- |
+| retries | Retry how many times once error happen |
+
+``` python
+>>> import rarbgapi
+>>> options = {'retries': 10}
+>>> client = rarbgapi.RarbgAPI(options)
+```
+
+
+### Supported categories
+```
+CATEGORY_ADULT
+CATEGORY_MOVIE_XVID
+CATEGORY_MOVIE_XVID_720P
+CATEGORY_MOVIE_H264
+CATEGORY_MOVIE_H264_1080P
+CATEGORY_MOVIE_H264_720P
+CATEGORY_MOVIE_H264_3D
+CATEGORY_MOVIE_H264_4K
+CATEGORY_MOVIE_H265_4K
+CATEGORY_MOVIE_H265_4K_HDR
+CATEGORY_MOVIE_FULL_BD
+CATEGORY_MOVIE_BD_REMUX
+CATEGORY_TV_EPISODES
+CATEGORY_TV_EPISODES_HD
+CATEGORY_TV_EPISODES_UHD
+CATEGORY_MUSIC_MP3
+CATEGORY_MUSIC_FLAC
+CATEGORY_GAMES_PC_ISO
+CATEGORY_GAMES_PC_RIP
+CATEGORY_GAMES_PS3
+CATEGORY_GAMES_PS4
+CATEGORY_GAMES_XBOX
+CATEGORY_SOFTWARE
+CATEGORY_EBOOK
+```
+
+
+
+
+%package -n python3-RarbgAPI
+Summary: A python3 wrapper for RARBG.to
+Provides: python-RarbgAPI
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-RarbgAPI
+# rarbgapi
+
+This is a python3 wrapper for RARBG.to.
+
+The api object will automatically fetch/refresh the token and take care rate control (1 request/2 seconds)
+
+## Install
+```
+pip install rarbgapi
+```
+
+## Quickstart
+
+List new torrents
+
+``` python
+>>> import rarbgapi
+>>> client = rarbgapi.RarbgAPI()
+>>> for torrent in client.list():
+... print(torrent)
+...
+```
+
+The download link can be found in
+``` python
+>>> torrent.download
+```
+
+Get more torrents, the limit option supports 25, 50, 100 only.
+``` python
+>>> client.list(limit=100):
+```
+
+Search torrents with specific keyword or imdb, tvdb and themoviedb index via `search_imdb`, `search_tvdb` and `search_themoviedb`
+``` python
+>>> client.search(search_string="walking dead")
+```
+
+or specific category
+``` python
+>>> client.search(search_string="walking dead", categories=[rarbgapi.RarbgAPI.CATEGORY_TV_EPISODES, rarbgapi.RarbgAPI.CATEGORY_TV_EPISODES_UHD])
+```
+
+## options
+Here are options to configure rarbgapi client
+
+
+| Name | Description |
+| -------- | -------- |
+| retries | Retry how many times once error happen |
+
+``` python
+>>> import rarbgapi
+>>> options = {'retries': 10}
+>>> client = rarbgapi.RarbgAPI(options)
+```
+
+
+### Supported categories
+```
+CATEGORY_ADULT
+CATEGORY_MOVIE_XVID
+CATEGORY_MOVIE_XVID_720P
+CATEGORY_MOVIE_H264
+CATEGORY_MOVIE_H264_1080P
+CATEGORY_MOVIE_H264_720P
+CATEGORY_MOVIE_H264_3D
+CATEGORY_MOVIE_H264_4K
+CATEGORY_MOVIE_H265_4K
+CATEGORY_MOVIE_H265_4K_HDR
+CATEGORY_MOVIE_FULL_BD
+CATEGORY_MOVIE_BD_REMUX
+CATEGORY_TV_EPISODES
+CATEGORY_TV_EPISODES_HD
+CATEGORY_TV_EPISODES_UHD
+CATEGORY_MUSIC_MP3
+CATEGORY_MUSIC_FLAC
+CATEGORY_GAMES_PC_ISO
+CATEGORY_GAMES_PC_RIP
+CATEGORY_GAMES_PS3
+CATEGORY_GAMES_PS4
+CATEGORY_GAMES_XBOX
+CATEGORY_SOFTWARE
+CATEGORY_EBOOK
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for RarbgAPI
+Provides: python3-RarbgAPI-doc
+%description help
+# rarbgapi
+
+This is a python3 wrapper for RARBG.to.
+
+The api object will automatically fetch/refresh the token and take care rate control (1 request/2 seconds)
+
+## Install
+```
+pip install rarbgapi
+```
+
+## Quickstart
+
+List new torrents
+
+``` python
+>>> import rarbgapi
+>>> client = rarbgapi.RarbgAPI()
+>>> for torrent in client.list():
+... print(torrent)
+...
+```
+
+The download link can be found in
+``` python
+>>> torrent.download
+```
+
+Get more torrents, the limit option supports 25, 50, 100 only.
+``` python
+>>> client.list(limit=100):
+```
+
+Search torrents with specific keyword or imdb, tvdb and themoviedb index via `search_imdb`, `search_tvdb` and `search_themoviedb`
+``` python
+>>> client.search(search_string="walking dead")
+```
+
+or specific category
+``` python
+>>> client.search(search_string="walking dead", categories=[rarbgapi.RarbgAPI.CATEGORY_TV_EPISODES, rarbgapi.RarbgAPI.CATEGORY_TV_EPISODES_UHD])
+```
+
+## options
+Here are options to configure rarbgapi client
+
+
+| Name | Description |
+| -------- | -------- |
+| retries | Retry how many times once error happen |
+
+``` python
+>>> import rarbgapi
+>>> options = {'retries': 10}
+>>> client = rarbgapi.RarbgAPI(options)
+```
+
+
+### Supported categories
+```
+CATEGORY_ADULT
+CATEGORY_MOVIE_XVID
+CATEGORY_MOVIE_XVID_720P
+CATEGORY_MOVIE_H264
+CATEGORY_MOVIE_H264_1080P
+CATEGORY_MOVIE_H264_720P
+CATEGORY_MOVIE_H264_3D
+CATEGORY_MOVIE_H264_4K
+CATEGORY_MOVIE_H265_4K
+CATEGORY_MOVIE_H265_4K_HDR
+CATEGORY_MOVIE_FULL_BD
+CATEGORY_MOVIE_BD_REMUX
+CATEGORY_TV_EPISODES
+CATEGORY_TV_EPISODES_HD
+CATEGORY_TV_EPISODES_UHD
+CATEGORY_MUSIC_MP3
+CATEGORY_MUSIC_FLAC
+CATEGORY_GAMES_PC_ISO
+CATEGORY_GAMES_PC_RIP
+CATEGORY_GAMES_PS3
+CATEGORY_GAMES_PS4
+CATEGORY_GAMES_XBOX
+CATEGORY_SOFTWARE
+CATEGORY_EBOOK
+```
+
+
+
+
+%prep
+%autosetup -n RarbgAPI-0.5.0
+
+%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-RarbgAPI -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.0-1
+- Package Spec generated