summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 04:17:27 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 04:17:27 +0000
commitec8f93db0f69e05be1a9c7d12efda6103345842c (patch)
treed8d283115b1e3a8e59dc66e91e7b3e01d0360dc4
parentb2c712b53e2f01659c4d80b48e5f2f946bde5c06 (diff)
automatic import of python-amino-ed
-rw-r--r--.gitignore1
-rw-r--r--python-amino-ed.spec189
-rw-r--r--sources1
3 files changed, 191 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..3bc0d0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Amino.ed-2.8.4.13.tar.gz
diff --git a/python-amino-ed.spec b/python-amino-ed.spec
new file mode 100644
index 0000000..41325ad
--- /dev/null
+++ b/python-amino-ed.spec
@@ -0,0 +1,189 @@
+%global _empty_manifest_terminate_build 0
+Name: python-Amino.ed
+Version: 2.8.4.13
+Release: 1
+Summary: A library to create Amino bots.
+License: MIT
+URL: https://github.com/Alert-Aigul/Amino.ed
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/df/eb/cb6bda0aa054ad26329fb462ad20b13224c7c83d09e5b2cd91604ae4ee08/Amino.ed-2.8.4.13.tar.gz
+BuildArch: noarch
+
+
+%description
+# Installing
+```
+pip install amino.ed
+```
+
+# Example
+```py
+import aminoed
+
+@aminoed.run_with_client()
+async def main(client: aminoed.Client):
+ await client.login("email", "password")
+
+```
+
+# Chat-bot example
+```py
+from aminoed import *
+
+bot = Client(prefix="!")
+
+@bot.execute() # Runs in the background, after bot.start()
+async def on_start():
+ print(f"Bot {bot.auth.user.nickname} working.")
+
+@bot.command() # Comand name - function name
+async def help(event: Event):
+ await event.send_message("[c]Comands\n" \
+ "?chatmembers - members count.")
+
+@bot.command("chatmembers", "?") # Custom command and prefix
+async def chatmembers(event: Event):
+ chat = await event.client.get_chat_thread(event.threadId)
+ await event.send_message(f"Chat members count: {chat.membersCount}.")
+
+bot.start("email", "password")
+
+
+```
+
+
+%package -n python3-Amino.ed
+Summary: A library to create Amino bots.
+Provides: python-Amino.ed
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-Amino.ed
+# Installing
+```
+pip install amino.ed
+```
+
+# Example
+```py
+import aminoed
+
+@aminoed.run_with_client()
+async def main(client: aminoed.Client):
+ await client.login("email", "password")
+
+```
+
+# Chat-bot example
+```py
+from aminoed import *
+
+bot = Client(prefix="!")
+
+@bot.execute() # Runs in the background, after bot.start()
+async def on_start():
+ print(f"Bot {bot.auth.user.nickname} working.")
+
+@bot.command() # Comand name - function name
+async def help(event: Event):
+ await event.send_message("[c]Comands\n" \
+ "?chatmembers - members count.")
+
+@bot.command("chatmembers", "?") # Custom command and prefix
+async def chatmembers(event: Event):
+ chat = await event.client.get_chat_thread(event.threadId)
+ await event.send_message(f"Chat members count: {chat.membersCount}.")
+
+bot.start("email", "password")
+
+
+```
+
+
+%package help
+Summary: Development documents and examples for Amino.ed
+Provides: python3-Amino.ed-doc
+%description help
+# Installing
+```
+pip install amino.ed
+```
+
+# Example
+```py
+import aminoed
+
+@aminoed.run_with_client()
+async def main(client: aminoed.Client):
+ await client.login("email", "password")
+
+```
+
+# Chat-bot example
+```py
+from aminoed import *
+
+bot = Client(prefix="!")
+
+@bot.execute() # Runs in the background, after bot.start()
+async def on_start():
+ print(f"Bot {bot.auth.user.nickname} working.")
+
+@bot.command() # Comand name - function name
+async def help(event: Event):
+ await event.send_message("[c]Comands\n" \
+ "?chatmembers - members count.")
+
+@bot.command("chatmembers", "?") # Custom command and prefix
+async def chatmembers(event: Event):
+ chat = await event.client.get_chat_thread(event.threadId)
+ await event.send_message(f"Chat members count: {chat.membersCount}.")
+
+bot.start("email", "password")
+
+
+```
+
+
+%prep
+%autosetup -n Amino.ed-2.8.4.13
+
+%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-Amino.ed -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 2.8.4.13-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..4aaef8d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+707f1d840ff224bf95f15d506e8e6e1b Amino.ed-2.8.4.13.tar.gz