Skip to content

Commit

Permalink
port to deltabot-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Mar 5, 2024
1 parent f8d97b4 commit 58a7e93
Show file tree
Hide file tree
Showing 21 changed files with 512 additions and 594 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.9]
python-version: ['3.8', '3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -24,9 +24,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install '.[dev]'
- name: Check code with isort
run: |
isort --check .
- name: Check code with black
run: |
black --check .
Expand All @@ -35,7 +32,7 @@ jobs:
pylama
- name: Test with pytest
run: |
pytest
#pytest
deploy:
needs: test
Expand All @@ -57,10 +54,3 @@ jobs:
build: true
# only upload if a tag is pushed (otherwise just build & check)
upload: ${{ github.event_name == 'push' && steps.check-tag.outputs.match == 'true' }}
- name: Create GitHub release
if: ${{ github.event_name == 'push' && steps.check-tag.outputs.match == 'true' }}
uses: Roang-zero1/github-create-release-action@master
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

2 changes: 0 additions & 2 deletions .mypy.ini

This file was deleted.

7 changes: 0 additions & 7 deletions CHANGELOG.rst

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Feeds

[![Latest Release](https://img.shields.io/pypi/v/feedsbot.svg)](https://pypi.org/project/feedsbot)
[![CI](https://github.com/deltachat-bot/feedsbot/actions/workflows/python-ci.yml/badge.svg)](https://github.com/deltachat-bot/feedsbot/actions/workflows/python-ci.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Delta Chat bot that allows to subscribe to RSS/Atom feeds.

## Install

```sh
pip install feedsbot
```

Configure the bot:

```sh
feedsbot init bot@example.com PASSWORD
```

Start the bot:

```sh
feedsbot serve
```

Run `feedsbot --help` to see all available options.

## User Guide

To subscribe an existing group to some feed:

1. Add the bot to the group.
2. Send `/sub https://delta.chat/feed.xml` (replace the URL with the desired feed)

To subscribe to a feed and let the bot create a dedicated group for you with the feed image as group avatar, etc., just send the command `/sub https://delta.chat/feed.xml` (replacing the URL for the desired feed) to the bot in private/direct (1:1) chat.

To unsubscribe the group from all feeds, just remove the bot from the group, or to unsubscribe from a particular feed (replace feed URL as appropriate):

`/unsub https://delta.chat/feed.xml`

To see all feeds a group is subscribed to, just send `/list` inside the desired group.
51 changes: 0 additions & 51 deletions README.rst

This file was deleted.

11 changes: 11 additions & 0 deletions feedsbot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Feeds bot."""

from .hooks import cli


def main() -> None:
"""Run the application."""
try:
cli.start()
except KeyboardInterrupt:
pass
Loading

0 comments on commit 58a7e93

Please sign in to comment.