From 1b15d047442f3fb59139fd376c972e7469132cdf Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 11 Apr 2023 21:33:50 +0000 Subject: automatic import of python-hentai --- .gitignore | 1 + python-hentai.spec | 608 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 610 insertions(+) create mode 100644 python-hentai.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..0185299 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/hentai-3.2.10.tar.gz diff --git a/python-hentai.spec b/python-hentai.spec new file mode 100644 index 0000000..4891ec5 --- /dev/null +++ b/python-hentai.spec @@ -0,0 +1,608 @@ +%global _empty_manifest_terminate_build 0 +Name: python-hentai +Version: 3.2.10 +Release: 1 +Summary: Implements a wrapper class around nhentai's RESTful API. +License: General Public License V3 +URL: https://www.hentai-chan.dev/projects/hentai +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/cf/84/29e5740449d37e50581aed5e92f0e3315d6d4924aa6c85cfcecc125a1e2c/hentai-3.2.10.tar.gz +BuildArch: noarch + +Requires: python3-tqdm +Requires: python3-requests + +%description +

+ + + +

+ +

+ “De gustibus non est disputandum.” +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +# Python Hentai API Wrapper + +English | [简体中文](https://github.com/hentai-chan/hentai/blob/master/README.zh.md) + +This python package implements a wrapper class around nhentai's RESTful API. +Please be aware that this is not an official API, technical questions about +nhentai.net should be redirected to +[support@nhentai.com](mailto:support@nhentai.com). +Further note that the content of this module is generally considered NSFW. Finally, +I would like to comment at this point that you should under no circumstances use +this module to make an unreasonable amount of requests in a short period of time. + +## Installation + +Get the most recent stable release from PyPI: + +```bash +pip install hentai --only-binary all +``` + +
+Dev Notes for Contributors + +Alternatively, if you're looking to make a +[contribution](https://github.com/hentai-chan/hentai/blob/dev-hentai/CONTRIBUTING.md) +fork this repository and run + +```bash +python -m venv venv/ +source venv/bin/activate # For Windows: .\venv\Scripts\activate +python -m pip install --upgrade pip +pip install -r requirements/dev.txt +# additionally install the following dependencies +pip install flake8 pytest wheel +# run all unit tests +pytest --verbose -s +# create wheel +python setup.py bdist_wheel --universal +``` + +Make sure to checkout `rec-hentai` so that your work is up-to-date with the next +release candidate. Don't implement any features that are incompatible with +version 3.7+ of python. + +
+ +## Documentation + +You can find the [documentation](https://www.hentai-chan.dev/projects/hentai) +online, or use the [wiki](https://github.com/hentai-chan/hentai/wiki) +to learn more about this module. + +## Basic Usage + +`Hentai` makes it very easy to browse through nhentai.net. It implements a flat +namespace for easy access of all their endpoints: + +```python +from hentai import Hentai, Format + +doujin = Hentai(177013) + +# True +Hentai.exists(doujin.id) + +# METAMORPHOSIS +print(doujin.title(Format.Pretty)) + +# [Tag(id=3981, type='artist', name='shindol', url='https://nhentai.net/artist/shindol/', count=279)] +print(doujin.artist) + +# ['dark skin', 'group', ... ] +print([tag.name for tag in doujin.tag]) + +# 2016-10-18 12:28:49+00:00 +print(doujin.upload_date) + +# ['https://i.nhentai.net/galleries/987560/1.jpg', ... ] +print(doujin.image_urls) + +# get the source +doujin.download(progressbar=True) +``` + +Apart from that, `hentai.Utils` also provides a handful of miscellaneous helper +methods: + +```python +from hentai import Utils, Sort, Option, Tag +from pathlib import Path + +print(Utils.get_random_id()) + +# recommend me something good! +print(Utils.get_random_hentai()) + +# advanced search with queries +for doujin in Utils.search_by_query('tag:loli', sort=Sort.PopularWeek): + print(doujin.title(Format.Pretty)) + +# print all character names from all doujins +for character in Tag.list(Option.Character): + print(character.name) + +# store custom meta data as JSON file to disk +popular_loli = Utils.search_by_query('tag:loli', sort=Sort.PopularWeek) +custom = [Option.ID, Option.Title, Option.Epos] +Utils.export(popular_loli, filename=Path('popular_loli.json'), options=custom) +``` + +See also [https://nhentai.net/info/](https://nhentai.net/info/) for more information +on search queries. + +## Command Line Interface + +Starting with version 3.2.4, this module also provides a rudimentary CLI for downloading +doujins within the terminal: + +```cli +# get help +hentai --help + +# download this doujin to the CWD +hentai download --id 177013 + +# check the module version +hentai --version +``` + +## Get In Touch + +You can reach me at [dev.hentai-chan@outlook.com](mailto:dev.hentai-chan@outlook.com) +for private questions and inquires that don't belong to the issue tab. + + + + +%package -n python3-hentai +Summary: Implements a wrapper class around nhentai's RESTful API. +Provides: python-hentai +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-hentai +

+ + + +

+ +

+ “De gustibus non est disputandum.” +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +# Python Hentai API Wrapper + +English | [简体中文](https://github.com/hentai-chan/hentai/blob/master/README.zh.md) + +This python package implements a wrapper class around nhentai's RESTful API. +Please be aware that this is not an official API, technical questions about +nhentai.net should be redirected to +[support@nhentai.com](mailto:support@nhentai.com). +Further note that the content of this module is generally considered NSFW. Finally, +I would like to comment at this point that you should under no circumstances use +this module to make an unreasonable amount of requests in a short period of time. + +## Installation + +Get the most recent stable release from PyPI: + +```bash +pip install hentai --only-binary all +``` + +
+Dev Notes for Contributors + +Alternatively, if you're looking to make a +[contribution](https://github.com/hentai-chan/hentai/blob/dev-hentai/CONTRIBUTING.md) +fork this repository and run + +```bash +python -m venv venv/ +source venv/bin/activate # For Windows: .\venv\Scripts\activate +python -m pip install --upgrade pip +pip install -r requirements/dev.txt +# additionally install the following dependencies +pip install flake8 pytest wheel +# run all unit tests +pytest --verbose -s +# create wheel +python setup.py bdist_wheel --universal +``` + +Make sure to checkout `rec-hentai` so that your work is up-to-date with the next +release candidate. Don't implement any features that are incompatible with +version 3.7+ of python. + +
+ +## Documentation + +You can find the [documentation](https://www.hentai-chan.dev/projects/hentai) +online, or use the [wiki](https://github.com/hentai-chan/hentai/wiki) +to learn more about this module. + +## Basic Usage + +`Hentai` makes it very easy to browse through nhentai.net. It implements a flat +namespace for easy access of all their endpoints: + +```python +from hentai import Hentai, Format + +doujin = Hentai(177013) + +# True +Hentai.exists(doujin.id) + +# METAMORPHOSIS +print(doujin.title(Format.Pretty)) + +# [Tag(id=3981, type='artist', name='shindol', url='https://nhentai.net/artist/shindol/', count=279)] +print(doujin.artist) + +# ['dark skin', 'group', ... ] +print([tag.name for tag in doujin.tag]) + +# 2016-10-18 12:28:49+00:00 +print(doujin.upload_date) + +# ['https://i.nhentai.net/galleries/987560/1.jpg', ... ] +print(doujin.image_urls) + +# get the source +doujin.download(progressbar=True) +``` + +Apart from that, `hentai.Utils` also provides a handful of miscellaneous helper +methods: + +```python +from hentai import Utils, Sort, Option, Tag +from pathlib import Path + +print(Utils.get_random_id()) + +# recommend me something good! +print(Utils.get_random_hentai()) + +# advanced search with queries +for doujin in Utils.search_by_query('tag:loli', sort=Sort.PopularWeek): + print(doujin.title(Format.Pretty)) + +# print all character names from all doujins +for character in Tag.list(Option.Character): + print(character.name) + +# store custom meta data as JSON file to disk +popular_loli = Utils.search_by_query('tag:loli', sort=Sort.PopularWeek) +custom = [Option.ID, Option.Title, Option.Epos] +Utils.export(popular_loli, filename=Path('popular_loli.json'), options=custom) +``` + +See also [https://nhentai.net/info/](https://nhentai.net/info/) for more information +on search queries. + +## Command Line Interface + +Starting with version 3.2.4, this module also provides a rudimentary CLI for downloading +doujins within the terminal: + +```cli +# get help +hentai --help + +# download this doujin to the CWD +hentai download --id 177013 + +# check the module version +hentai --version +``` + +## Get In Touch + +You can reach me at [dev.hentai-chan@outlook.com](mailto:dev.hentai-chan@outlook.com) +for private questions and inquires that don't belong to the issue tab. + + + + +%package help +Summary: Development documents and examples for hentai +Provides: python3-hentai-doc +%description help +

+ + + +

+ +

+ “De gustibus non est disputandum.” +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +# Python Hentai API Wrapper + +English | [简体中文](https://github.com/hentai-chan/hentai/blob/master/README.zh.md) + +This python package implements a wrapper class around nhentai's RESTful API. +Please be aware that this is not an official API, technical questions about +nhentai.net should be redirected to +[support@nhentai.com](mailto:support@nhentai.com). +Further note that the content of this module is generally considered NSFW. Finally, +I would like to comment at this point that you should under no circumstances use +this module to make an unreasonable amount of requests in a short period of time. + +## Installation + +Get the most recent stable release from PyPI: + +```bash +pip install hentai --only-binary all +``` + +
+Dev Notes for Contributors + +Alternatively, if you're looking to make a +[contribution](https://github.com/hentai-chan/hentai/blob/dev-hentai/CONTRIBUTING.md) +fork this repository and run + +```bash +python -m venv venv/ +source venv/bin/activate # For Windows: .\venv\Scripts\activate +python -m pip install --upgrade pip +pip install -r requirements/dev.txt +# additionally install the following dependencies +pip install flake8 pytest wheel +# run all unit tests +pytest --verbose -s +# create wheel +python setup.py bdist_wheel --universal +``` + +Make sure to checkout `rec-hentai` so that your work is up-to-date with the next +release candidate. Don't implement any features that are incompatible with +version 3.7+ of python. + +
+ +## Documentation + +You can find the [documentation](https://www.hentai-chan.dev/projects/hentai) +online, or use the [wiki](https://github.com/hentai-chan/hentai/wiki) +to learn more about this module. + +## Basic Usage + +`Hentai` makes it very easy to browse through nhentai.net. It implements a flat +namespace for easy access of all their endpoints: + +```python +from hentai import Hentai, Format + +doujin = Hentai(177013) + +# True +Hentai.exists(doujin.id) + +# METAMORPHOSIS +print(doujin.title(Format.Pretty)) + +# [Tag(id=3981, type='artist', name='shindol', url='https://nhentai.net/artist/shindol/', count=279)] +print(doujin.artist) + +# ['dark skin', 'group', ... ] +print([tag.name for tag in doujin.tag]) + +# 2016-10-18 12:28:49+00:00 +print(doujin.upload_date) + +# ['https://i.nhentai.net/galleries/987560/1.jpg', ... ] +print(doujin.image_urls) + +# get the source +doujin.download(progressbar=True) +``` + +Apart from that, `hentai.Utils` also provides a handful of miscellaneous helper +methods: + +```python +from hentai import Utils, Sort, Option, Tag +from pathlib import Path + +print(Utils.get_random_id()) + +# recommend me something good! +print(Utils.get_random_hentai()) + +# advanced search with queries +for doujin in Utils.search_by_query('tag:loli', sort=Sort.PopularWeek): + print(doujin.title(Format.Pretty)) + +# print all character names from all doujins +for character in Tag.list(Option.Character): + print(character.name) + +# store custom meta data as JSON file to disk +popular_loli = Utils.search_by_query('tag:loli', sort=Sort.PopularWeek) +custom = [Option.ID, Option.Title, Option.Epos] +Utils.export(popular_loli, filename=Path('popular_loli.json'), options=custom) +``` + +See also [https://nhentai.net/info/](https://nhentai.net/info/) for more information +on search queries. + +## Command Line Interface + +Starting with version 3.2.4, this module also provides a rudimentary CLI for downloading +doujins within the terminal: + +```cli +# get help +hentai --help + +# download this doujin to the CWD +hentai download --id 177013 + +# check the module version +hentai --version +``` + +## Get In Touch + +You can reach me at [dev.hentai-chan@outlook.com](mailto:dev.hentai-chan@outlook.com) +for private questions and inquires that don't belong to the issue tab. + + + + +%prep +%autosetup -n hentai-3.2.10 + +%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-hentai -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot - 3.2.10-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..2f1ad0a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +de240c4a6eaa60de1ead688906c3e6bd hentai-3.2.10.tar.gz -- cgit v1.2.3