diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 06:49:08 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 06:49:08 +0000 |
commit | 91d0de743c1b8253d88b47f2a51f5cc8aa916c10 (patch) | |
tree | 06b9d0a31ff13c23eea93f6af71210bac0438c47 | |
parent | e2498dac90324eb0650e7d70e43d0b8a08d865f7 (diff) |
automatic import of python-statcord.py-betaopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-statcord-py-beta.spec | 296 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 298 insertions, 0 deletions
@@ -0,0 +1 @@ +/statcord.py-beta-3.1.1.tar.gz diff --git a/python-statcord-py-beta.spec b/python-statcord-py-beta.spec new file mode 100644 index 0000000..1496fc7 --- /dev/null +++ b/python-statcord-py-beta.spec @@ -0,0 +1,296 @@ +%global _empty_manifest_terminate_build 0 +Name: python-statcord.py-beta +Version: 3.1.1 +Release: 1 +Summary: A simple API wrapper for statcord.com to connect your bot and get your bot stats. +License: MIT License +URL: https://github.com/labdiscord/statcord.py/ +Source0: https://mirrors.aliyun.com/pypi/web/packages/21/c3/2c73aa6e9b3b5aea17d923e44ce2380cfaa340a8897549c2f6031bf21c43/statcord.py-beta-3.1.1.tar.gz +BuildArch: noarch + +Requires: python3-aiohttp +Requires: python3-psutil + +%description +<!-- Content --> +## Installation +Install via pip (recommended) +```Shell +python3 -m pip install statcord.py +``` +## Features +* AUTOMATIC server & user counts updating. +* AUTOMATIC commands & active users updating. +* AUTOMATIC resource usage posting. +* AUTOMATIC custom function usage. +* Support provided via [discord](https://statcord.com/discord) +## Posting Server & User Counts, Active Users and Popular Commands. +### Example Cogs System +```Python +from discord.ext import commands +import statcord +class StatcordPost(commands.Cog): + def __init__(self, bot): + self.bot = bot + self.key = "statcord.com-ADDYOURKEYHERE" + self.api = statcord.Client(self.bot,self.key,custom1=self.custom1,custom2=self.custom2) + self.api.start_loop() + @commands.Cog.listener() + async def on_command(self,ctx): + self.api.command_run(ctx) + async def custom1(self): + # Do Things Here + return "10" # Return a string. + async def custom2(self): + # Do Things Here + return "10" # Return a string. +def setup(bot): + bot.add_cog(StatcordPost(bot)) +``` +### Example non-cogs system. +```Python +import discord +from discord.ext import commands +import statcord +bot = commands.Bot(command_prefix='!') +async def custom1(self): + # Do Things Here + return "10" # Return a string. +async def custom2(self): + # Do Things Here + return "10" # Return a string. +key = "statcord.com-ADDYOURKEYHERE" +api = statcord.Client(bot,key,custom1=custom1,custom2=custom2) +api.start_loop() +@bot.event +async def on_command(ctx): + api.command_run(ctx) +bot.run(TOKEN) +``` +### Configuration +To turn Memory tracking off, `statcord.Client(bot,key,mem = False)` +To turn CPU tracking off, `statcord.Client(bot,key,cpu = False)` +To activate a custom graph, `statcord.Client(bot,key,custom1 = function)` +## Contributing +Contributions are always welcome!\ +Take a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project. +When you are ready, simply create a pull request for your contribution and we will review it whenever we can! +### Donating +You can also help me and the project out by sponsoring me through a [donation on PayPal](http://paypal.me/labdiscord). +<!-- Discussion & Support --> +## Discussion, Support and Issues +Need support with this project, have found an issue or want to chat with others about contributing to the project? +> Please check the project's issues page first for support & bugs! +Not found what you need here? +* If you have an issue, please create a GitHub issue here to report it, include as much detail as you can. +* _Alternatively,_ You can join our Discord server to discuss any issue or to get support for the project.: +<a href="http://statcord.com/discord" target="_blank"> + <img src="https://discordapp.com/api/guilds/608711879858192479/embed.png" alt="Discord" height="30"> +</a> + +%package -n python3-statcord.py-beta +Summary: A simple API wrapper for statcord.com to connect your bot and get your bot stats. +Provides: python-statcord.py-beta +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-statcord.py-beta +<!-- Content --> +## Installation +Install via pip (recommended) +```Shell +python3 -m pip install statcord.py +``` +## Features +* AUTOMATIC server & user counts updating. +* AUTOMATIC commands & active users updating. +* AUTOMATIC resource usage posting. +* AUTOMATIC custom function usage. +* Support provided via [discord](https://statcord.com/discord) +## Posting Server & User Counts, Active Users and Popular Commands. +### Example Cogs System +```Python +from discord.ext import commands +import statcord +class StatcordPost(commands.Cog): + def __init__(self, bot): + self.bot = bot + self.key = "statcord.com-ADDYOURKEYHERE" + self.api = statcord.Client(self.bot,self.key,custom1=self.custom1,custom2=self.custom2) + self.api.start_loop() + @commands.Cog.listener() + async def on_command(self,ctx): + self.api.command_run(ctx) + async def custom1(self): + # Do Things Here + return "10" # Return a string. + async def custom2(self): + # Do Things Here + return "10" # Return a string. +def setup(bot): + bot.add_cog(StatcordPost(bot)) +``` +### Example non-cogs system. +```Python +import discord +from discord.ext import commands +import statcord +bot = commands.Bot(command_prefix='!') +async def custom1(self): + # Do Things Here + return "10" # Return a string. +async def custom2(self): + # Do Things Here + return "10" # Return a string. +key = "statcord.com-ADDYOURKEYHERE" +api = statcord.Client(bot,key,custom1=custom1,custom2=custom2) +api.start_loop() +@bot.event +async def on_command(ctx): + api.command_run(ctx) +bot.run(TOKEN) +``` +### Configuration +To turn Memory tracking off, `statcord.Client(bot,key,mem = False)` +To turn CPU tracking off, `statcord.Client(bot,key,cpu = False)` +To activate a custom graph, `statcord.Client(bot,key,custom1 = function)` +## Contributing +Contributions are always welcome!\ +Take a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project. +When you are ready, simply create a pull request for your contribution and we will review it whenever we can! +### Donating +You can also help me and the project out by sponsoring me through a [donation on PayPal](http://paypal.me/labdiscord). +<!-- Discussion & Support --> +## Discussion, Support and Issues +Need support with this project, have found an issue or want to chat with others about contributing to the project? +> Please check the project's issues page first for support & bugs! +Not found what you need here? +* If you have an issue, please create a GitHub issue here to report it, include as much detail as you can. +* _Alternatively,_ You can join our Discord server to discuss any issue or to get support for the project.: +<a href="http://statcord.com/discord" target="_blank"> + <img src="https://discordapp.com/api/guilds/608711879858192479/embed.png" alt="Discord" height="30"> +</a> + +%package help +Summary: Development documents and examples for statcord.py-beta +Provides: python3-statcord.py-beta-doc +%description help +<!-- Content --> +## Installation +Install via pip (recommended) +```Shell +python3 -m pip install statcord.py +``` +## Features +* AUTOMATIC server & user counts updating. +* AUTOMATIC commands & active users updating. +* AUTOMATIC resource usage posting. +* AUTOMATIC custom function usage. +* Support provided via [discord](https://statcord.com/discord) +## Posting Server & User Counts, Active Users and Popular Commands. +### Example Cogs System +```Python +from discord.ext import commands +import statcord +class StatcordPost(commands.Cog): + def __init__(self, bot): + self.bot = bot + self.key = "statcord.com-ADDYOURKEYHERE" + self.api = statcord.Client(self.bot,self.key,custom1=self.custom1,custom2=self.custom2) + self.api.start_loop() + @commands.Cog.listener() + async def on_command(self,ctx): + self.api.command_run(ctx) + async def custom1(self): + # Do Things Here + return "10" # Return a string. + async def custom2(self): + # Do Things Here + return "10" # Return a string. +def setup(bot): + bot.add_cog(StatcordPost(bot)) +``` +### Example non-cogs system. +```Python +import discord +from discord.ext import commands +import statcord +bot = commands.Bot(command_prefix='!') +async def custom1(self): + # Do Things Here + return "10" # Return a string. +async def custom2(self): + # Do Things Here + return "10" # Return a string. +key = "statcord.com-ADDYOURKEYHERE" +api = statcord.Client(bot,key,custom1=custom1,custom2=custom2) +api.start_loop() +@bot.event +async def on_command(ctx): + api.command_run(ctx) +bot.run(TOKEN) +``` +### Configuration +To turn Memory tracking off, `statcord.Client(bot,key,mem = False)` +To turn CPU tracking off, `statcord.Client(bot,key,cpu = False)` +To activate a custom graph, `statcord.Client(bot,key,custom1 = function)` +## Contributing +Contributions are always welcome!\ +Take a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project. +When you are ready, simply create a pull request for your contribution and we will review it whenever we can! +### Donating +You can also help me and the project out by sponsoring me through a [donation on PayPal](http://paypal.me/labdiscord). +<!-- Discussion & Support --> +## Discussion, Support and Issues +Need support with this project, have found an issue or want to chat with others about contributing to the project? +> Please check the project's issues page first for support & bugs! +Not found what you need here? +* If you have an issue, please create a GitHub issue here to report it, include as much detail as you can. +* _Alternatively,_ You can join our Discord server to discuss any issue or to get support for the project.: +<a href="http://statcord.com/discord" target="_blank"> + <img src="https://discordapp.com/api/guilds/608711879858192479/embed.png" alt="Discord" height="30"> +</a> + +%prep +%autosetup -n statcord.py-beta-3.1.1 + +%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-statcord.py-beta -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 3.1.1-1 +- Package Spec generated @@ -0,0 +1 @@ +adcd3a832ccb0ce5d40757d95b0eeda2 statcord.py-beta-3.1.1.tar.gz |