Skip to content

Commit

Permalink
Merge pull request #10 from dbrennand/1.0.0
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
dbrennand authored Jun 4, 2022
2 parents 8644a5b + a40138b commit f80a7c4
Show file tree
Hide file tree
Showing 9 changed files with 973 additions and 647 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM python:3.9-slim
FROM python:3.10-slim

# Set working directory
WORKDIR /usr/src/app

# Create directory and volume to persist the reader database
RUN mkdir -p /usr/src/app/reader
VOLUME /usr/src/app/reader

# Copy all of the projects contents to containers /usr/src/app directory
COPY . .

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 dbrennand
Copyright (c) 2022 dbrennand

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 0 additions & 18 deletions Pipfile

This file was deleted.

358 changes: 0 additions & 358 deletions Pipfile.lock

This file was deleted.

65 changes: 26 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,48 @@
# RSS_Feederbot [Telegram]
# Feederbot

A Telegram bot for reading RSS Feeds.
An Atom, RSS, and JSON feed reading Telegram bot 🤖

Checks on an interval for RSS feed updates.
Feederbot checks on a user configurable interval for feed updates.

## Setup

### Normal

1. Install dependencies from [requirements.txt](requirements.txt) using: `pip install -r requirements.txt`

2. Set the bot token environment variable:

PowerShell: `$Env:BOT_TOKEN = "Insert bot token here."`

Bash: `export BOT_TOKEN="Insert bot token here."`
## Prerequisites

3. Run bot.py.
1. Docker

### Docker
## Supported Commands

> [!NOTE]
> Run the following commands from inside the project directory.
* `/addfeeds <url> ...` - Add feeds.

1. `docker build -t rss_feederbot:0.0.4 .`
* `/removefeeds <url> ...` - Remove feeds.

2. `docker run --rm --name rss_feederbot -e BOT_TOKEN="Insert bot token here." -d -t rss_feederbot:0.0.4`
* `/start <inverval>` - Start reading feeds.

## Usage
* `/changeinterval <interval>` - Change the feed update interval.

Add and remove RSS feeds using the `/managefeed` command:
* `/showfeeds` - Show feeds.

* Add: `/managefeed add https://examplefeedurl.com`
* `/showjob` - Show the datetime of the next feed update job.

* Remove: `/managefeed remove https://examplefeedurl.com`

Begin checking for RSS feed updates using the `/start` command, providing an interval (in seconds) for how often to check for updates:

> [!NOTE]
> The example below is every 30 minutes (Highly recommended).
`/start 1800`

If you decide that you want to change the interval of how often the bot checks for RSS feed updates, you can use the `/changeinterval` command, providing the new interval (in seconds):
## Setup

> [!NOTE]
> The example below is every hour.
1. Build the container image:

`/changeinterval 3600`
```bash
docker build -t feederbot:1.0.0 .
```

To see the RSS feed(s) currently being checked for updates, use the `/showfeed` command.
2. Run the container:

To see when the bot will next check for RSS feed updates, use the `/showjob` command.
```bash
# Using the Docker volume for the reader database
docker run -d -t -e BOT_TOKEN="<Bot Token>" -e USER_ID="<User ID>" --name feederbot feederbot:1.0.0
# Using a bind mount for the reader database
docker run -d -t -e BOT_TOKEN="<Bot Token>" -e USER_ID="<User ID>" -v /path/to/store/db:/usr/src/app/reader --name feederbot feederbot:1.0.0
```

## Authors -- Contributors

* **dbrennand** - *Author* - [dbrennand](https://github.com/dbrennand)
[**dbrennand**](https://github.com/dbrennand) - *Author*

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) for details.
Loading

0 comments on commit f80a7c4

Please sign in to comment.