summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 15:14:54 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 15:14:54 +0000
commitaf84b1b084a159317123deeba24e93aa86d0f514 (patch)
tree196bca9c597503cc44900ec325a96e799396af97
parent36dd9ba7286da4a91351db82c38aebd1262f60b2 (diff)
automatic import of python-telegraph
-rw-r--r--.gitignore1
-rw-r--r--python-telegraph.spec215
-rw-r--r--sources1
3 files changed, 217 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..56c3ecd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/telegraph-2.2.0.tar.gz
diff --git a/python-telegraph.spec b/python-telegraph.spec
new file mode 100644
index 0000000..adc8192
--- /dev/null
+++ b/python-telegraph.spec
@@ -0,0 +1,215 @@
+%global _empty_manifest_terminate_build 0
+Name: python-telegraph
+Version: 2.2.0
+Release: 1
+Summary: Telegraph API wrapper
+License: MIT
+URL: https://github.com/python273/telegraph
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/49/81/1c9f99004e23555fb21b80a2ef6ddbecb3a7a4eefbc4aac75ffb5a9ccf71/telegraph-2.2.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-httpx
+
+%description
+# Telegraph
+[![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph)
+![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg)
+![License](https://img.shields.io/github/license/python273/telegraph.svg)
+
+Python Telegraph API wrapper
+
+- [Documentation](https://python-telegraph.readthedocs.io/en/latest/)
+
+```bash
+$ python3 -m pip install telegraph
+# with asyncio support
+$ python3 -m pip install 'telegraph[aio]'
+```
+
+## Example
+```python
+from telegraph import Telegraph
+
+telegraph = Telegraph()
+telegraph.create_account(short_name='1337')
+
+response = telegraph.create_page(
+ 'Hey',
+ html_content='<p>Hello, world!</p>'
+)
+print(response['url'])
+```
+
+## Async Example
+```python
+import asyncio
+from telegraph.aio import Telegraph
+
+async def main():
+ telegraph = Telegraph()
+ print(await telegraph.create_account(short_name='1337'))
+
+ response = await telegraph.create_page(
+ 'Hey',
+ html_content='<p>Hello, world!</p>',
+ )
+ print(response['url'])
+
+
+asyncio.run(main())
+```
+
+
+%package -n python3-telegraph
+Summary: Telegraph API wrapper
+Provides: python-telegraph
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-telegraph
+# Telegraph
+[![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph)
+![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg)
+![License](https://img.shields.io/github/license/python273/telegraph.svg)
+
+Python Telegraph API wrapper
+
+- [Documentation](https://python-telegraph.readthedocs.io/en/latest/)
+
+```bash
+$ python3 -m pip install telegraph
+# with asyncio support
+$ python3 -m pip install 'telegraph[aio]'
+```
+
+## Example
+```python
+from telegraph import Telegraph
+
+telegraph = Telegraph()
+telegraph.create_account(short_name='1337')
+
+response = telegraph.create_page(
+ 'Hey',
+ html_content='<p>Hello, world!</p>'
+)
+print(response['url'])
+```
+
+## Async Example
+```python
+import asyncio
+from telegraph.aio import Telegraph
+
+async def main():
+ telegraph = Telegraph()
+ print(await telegraph.create_account(short_name='1337'))
+
+ response = await telegraph.create_page(
+ 'Hey',
+ html_content='<p>Hello, world!</p>',
+ )
+ print(response['url'])
+
+
+asyncio.run(main())
+```
+
+
+%package help
+Summary: Development documents and examples for telegraph
+Provides: python3-telegraph-doc
+%description help
+# Telegraph
+[![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph)
+![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg)
+![License](https://img.shields.io/github/license/python273/telegraph.svg)
+
+Python Telegraph API wrapper
+
+- [Documentation](https://python-telegraph.readthedocs.io/en/latest/)
+
+```bash
+$ python3 -m pip install telegraph
+# with asyncio support
+$ python3 -m pip install 'telegraph[aio]'
+```
+
+## Example
+```python
+from telegraph import Telegraph
+
+telegraph = Telegraph()
+telegraph.create_account(short_name='1337')
+
+response = telegraph.create_page(
+ 'Hey',
+ html_content='<p>Hello, world!</p>'
+)
+print(response['url'])
+```
+
+## Async Example
+```python
+import asyncio
+from telegraph.aio import Telegraph
+
+async def main():
+ telegraph = Telegraph()
+ print(await telegraph.create_account(short_name='1337'))
+
+ response = await telegraph.create_page(
+ 'Hey',
+ html_content='<p>Hello, world!</p>',
+ )
+ print(response['url'])
+
+
+asyncio.run(main())
+```
+
+
+%prep
+%autosetup -n telegraph-2.2.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-telegraph -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.2.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..ed396ef
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8122865dbf2e2b3eefef300f2b434eff telegraph-2.2.0.tar.gz