diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-manganelo.spec | 173 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 175 insertions, 0 deletions
@@ -0,0 +1 @@ +/manganelo-1.23.tar.gz diff --git a/python-manganelo.spec b/python-manganelo.spec new file mode 100644 index 0000000..eab9471 --- /dev/null +++ b/python-manganelo.spec @@ -0,0 +1,173 @@ +%global _empty_manifest_terminate_build 0 +Name: python-manganelo +Version: 1.23 +Release: 1 +Summary: Unofficial API for the Manganelo/Manganato website. +License: MIT +URL: https://github.com/nixonjoshua98/manganelo +Source0: https://mirrors.aliyun.com/pypi/web/packages/b2/8d/951b110dbf9a47733703816bc082a92236b51720bddb75b82a4e9627fcbc/manganelo-1.23.tar.gz +BuildArch: noarch + +Requires: python3-bs4 +Requires: python3-requests +Requires: python3-reportlab +Requires: python3-pillow +Requires: python3-pydantic + +%description +[](https://pepy.tech/project/manganelo) [](https://pepy.tech/project/manganelo/month) [](https://pepy.tech/project/manganelo/week)
+
+# Unofficial Manganelo (Manganato) API
+
+Installation
+-
+**Python 3.7+ (latest version requires Python 3.9+)**
+```cmd
+pip install manganelo
+```
+
+Examples
+-
+```python
+import manganelo
+
+home_page = manganelo.get_home_page()
+
+results = manganelo.get_search_results("Naruto")
+
+for r in results:
+ print(r.title, r.views)
+
+ chapters = r.chapter_list
+
+ icon_path = r.download_icon("./icon.png")
+
+ for c in chapters:
+ print(f"#{c.chapter} | {c.title}")
+
+ chapter_path = c.download(f"./Chapter {c.chapter}.pdf")
+```
+ + +%package -n python3-manganelo +Summary: Unofficial API for the Manganelo/Manganato website. +Provides: python-manganelo +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-manganelo +[](https://pepy.tech/project/manganelo) [](https://pepy.tech/project/manganelo/month) [](https://pepy.tech/project/manganelo/week)
+
+# Unofficial Manganelo (Manganato) API
+
+Installation
+-
+**Python 3.7+ (latest version requires Python 3.9+)**
+```cmd
+pip install manganelo
+```
+
+Examples
+-
+```python
+import manganelo
+
+home_page = manganelo.get_home_page()
+
+results = manganelo.get_search_results("Naruto")
+
+for r in results:
+ print(r.title, r.views)
+
+ chapters = r.chapter_list
+
+ icon_path = r.download_icon("./icon.png")
+
+ for c in chapters:
+ print(f"#{c.chapter} | {c.title}")
+
+ chapter_path = c.download(f"./Chapter {c.chapter}.pdf")
+```
+ + +%package help +Summary: Development documents and examples for manganelo +Provides: python3-manganelo-doc +%description help +[](https://pepy.tech/project/manganelo) [](https://pepy.tech/project/manganelo/month) [](https://pepy.tech/project/manganelo/week)
+
+# Unofficial Manganelo (Manganato) API
+
+Installation
+-
+**Python 3.7+ (latest version requires Python 3.9+)**
+```cmd
+pip install manganelo
+```
+
+Examples
+-
+```python
+import manganelo
+
+home_page = manganelo.get_home_page()
+
+results = manganelo.get_search_results("Naruto")
+
+for r in results:
+ print(r.title, r.views)
+
+ chapters = r.chapter_list
+
+ icon_path = r.download_icon("./icon.png")
+
+ for c in chapters:
+ print(f"#{c.chapter} | {c.title}")
+
+ chapter_path = c.download(f"./Chapter {c.chapter}.pdf")
+```
+ + +%prep +%autosetup -n manganelo-1.23 + +%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-manganelo -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.23-1 +- Package Spec generated @@ -0,0 +1 @@ +95ce6202d174cfb62a52fb0cc77e4c6d manganelo-1.23.tar.gz |