Skip to content

Commit

Permalink
Added dockerization and refactored core code
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasSchatz committed Mar 7, 2023
1 parent 8a309ae commit 0fba7e8
Show file tree
Hide file tree
Showing 12 changed files with 309 additions and 357 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.env.sample
.git
.gitignore
.vscode
venv
CHANGELOG.md
LICENSE
README.md
6 changes: 6 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
client_id=""
client_secret=""
user_agent=""
username=""
password=""
subreddit=""
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.ini
.DS_Store
.env
processed_comments_*.txt
processed_submissions_*.txt
venv
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.linting.enabled": false,
"python.linting.flake8Enabled": true
}
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2023-03-07

### Added

- Configuration through `.env` files
- Dockerization
- `requirements.txt` and `.vscode/settings.json` for smoother development

### Changed

- Refactoring to use an abstract base class
- Code formatting according to black-standards

### Removed

- Setup using `.ini`-files
- Ability to run the bot as a service, using docker instead

## [0.4.0] - 2018-09-19

### Changed

- The bot will no longer respond to Bild Plus links. A Bild Plus link is any URL
where the path starts with `/bild-plus/`.
- The bot will no longer respond to Internet Archive links. These links usually
Expand All @@ -15,30 +35,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
are found immediately following a slash (/).

## [0.3.0] - 2018-03-29

### Added

- The bot now also handles submissions.
- Added an option `--prosfile` to control where the bot stores the IDs of
processed submissions. The default is `processed_submissions_SUBREDDIT.txt` in
the bot's working directory. The submissions file will be kept to a maximum
of 500 processed submissions.

## [0.2.0] - 2017-10-31

### Added

- Added an option `--procfile` to control where the bot stores the IDs of
processed comments. The default is `processed_comments_SUBREDDIT.txt` in the
bot's working directory.
- Added an option `--sleeptime` to control how long the bot will go to sleep
in case there is an API exception (default: 15 minutes).

### Changed

- The bot will now keep a maximum of 600 processed comments in storage. When
more than 600 processed comment IDs are stored, the procfile is pruned down
to 500 comments.
- The bot will now log a message when it is quit via keyboard interrupt (Ctrl-C).

## [0.1.1] - 2017-10-28

- Fixed a bug where the bot would spontaneously halt due to a RequestException.
This exception is now handled.

## [0.1.0] - 2017-10-27

This is the initial release.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.8-slim-buster

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

CMD [ "python3", "MaxGoldtBot.py"]
6 changes: 0 additions & 6 deletions MaxGoldtBot.ini.sample

This file was deleted.

Loading

0 comments on commit 0fba7e8

Please sign in to comment.