feedforbot-3.3.0
توضیحات
Forward links from RSS/Atom feeds to messengers
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | feedforbot-3.3.0 |
| نام | feedforbot |
| نسخه کتابخانه | 3.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Aleksandr Shpak |
| ایمیل نویسنده | shpaker@gmail.com |
| آدرس صفحه اصلی | https://github.com/shpaker/feedforbot |
| آدرس اینترنتی | https://pypi.org/project/feedforbot/ |
| مجوز | - |
FeedForBot
==========
[](https://pypi.python.org/pypi/feedforbot)
[](https://pypi.python.org/pypi/feedforbot)
[](https://hub.docker.com/r/shpaker/feedforbot)
[](href="https://github.com/psf/black)
Forward links from RSS/Atom feeds to messengers
Installation
------------
```commandline
pip install feedforbot -U
```
Usage
-----
### From code
```python
import asyncio
from feedforbot import Scheduler, TelegramBotTransport, RSSListener
def main():
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
scheduler = Scheduler(
'* * * * *',
listener=RSSListener('https://www.debian.org/News/news'),
transport=TelegramBotTransport(
token='123456789:AAAAAAAAAA-BBBB-CCCCCCCCCCCC-DDDDDD',
to='@channel',
)
)
scheduler.run()
loop.run_forever()
if __name__ == '__main__':
main()
```
### CLI
#### Save to file `config.yml` data
```yaml
cache:
type: 'files'
schedulers:
- listener:
type: 'rss'
params:
url: 'https://www.debian.org/News/news'
transport:
type: 'telegram_bot'
params:
token: '123456789:AAAAAAAAAA-BBBB-CCCCCCCCCCCC-DDDDDD'
to: '@channel'
```
#### Start script
```commandline
feedforbot --verbose config.yml
```
### Docker
#### Docker Hub
```commandline
docker run shpaker/feedforbot --help
```
#### GHCR
```commandline
docker run ghcr.io/shpaker/feedforbot --help
```
نیازمندی
| مقدار | نام |
|---|---|
| >=0.23.1,<0.24.0 | httpx |
| >=6.0.10,<7.0.0 | feedparser |
| >=1.10.2,<2.0.0 | pydantic |
| >=8.1.3,<9.0.0 | click |
| >=1.8,<2.0 | aiocron |
| >=4.11.1,<5.0.0 | beautifulsoup4 |
| >=22.1.0,<23.0.0 | aiofiles |
| >=6.0,<7.0 | pyyaml |
| >=3.1.2,<4.0.0 | jinja2 |
| >=3.8.2,<4.0.0 | orjson |
| >=1.11.1,<2.0.0 | sentry-sdk |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<4.0 | Python |
نحوه نصب
نصب پکیج whl feedforbot-3.3.0:
pip install feedforbot-3.3.0.whl
نصب پکیج tar.gz feedforbot-3.3.0:
pip install feedforbot-3.3.0.tar.gz