This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Renovate Bot e95e3327a1
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Update python:3.11.2-slim Docker digest to 5e15309
2023-03-01 11:00:48 +00:00
.gitignore added initial config 2019-11-08 23:56:45 +01:00
.woodpecker.yml migrated .drone.yml to .woodpecker.yml 2021-11-03 23:18:29 +01:00
cron used python slim base 2019-11-09 00:31:09 +01:00
Dockerfile Update python:3.11.2-slim Docker digest to 5e15309 2023-03-01 11:00:48 +00:00
LICENSE added LICENSE 2020-02-29 14:19:07 +01:00
README.md updated README.md (closes #1) 2020-06-29 23:08:18 +02:00
renovate.json Update 'renovate.json' 2022-08-27 20:26:19 +00:00

feed2toot-docker

Build Status License Docker Pulls

A Docker image for feed2toot.

Usage

Create a feed2toot directory and your custom feed2toot.ini with the feed2toot config in this directory. You can use the path /feed2toot in that file, as the directory will be mounted to that path.

Example:

[mastodon]
instance_url=<mastodon-url>
; Here you need the two files created by register_feed2toot_app
user_credentials=/feed2toot/feed2toot_usercred.txt
client_credentials=/feed2toot/feed2toot_clientcred.txt
; Default visibility is public, but you can override it:
; toot_visibility=unlisted

[cache]
cachefile=/feed2toot/feed2toot.db
cache_limit=10000

[lock]
lock_file=/feed2toot/feed2toot.lock
lock_timeout=300

[rss]
uri=<rss-url>
; uri_list=/feed2toot/rsslist.txt
toot={title} {summary:400}

[hashtaglist]
; several_words_hashtags_list=/feed2toot/hashtags.txt

[feedparser]
accept_bozo_exceptions=true

[media]
; custom=/feed2toot/media/logo.png

To create the authorization for feed2toot you can also use this image:

docker run --rm -it -v /your/path/feed2toot:/feed2toot samuelph/feed2toot register_feed2toot_app

Finally copy the cron file in the feed2toot directory and run the docker image:

docker run -d -v /your/path/feed2toot:/feed2toot samuelph/feed2toot

Optionally you can adjust the cron job to fit your needs by editing the cron file. Per default the cron job runs every minute.

To run the image with Docker Compose you can just use this:

services:
  feed2toot:
    image: samuelph/feed2toot
    restart: always
    volumes:
      - /your/path/feed2toot:/feed2toot

Usage with multiple feeds

You can also use a single container to handle multiple feeds. Therefore you should create a folder for each feed in the feed2toot folder from above. Don't forget to update the paths in the *.ini files. Finally you can add a cronjob for each feed in the cron file:

*/3 * * * * /usr/local/bin/feed2toot -c /feed2toot/feed1/feed2toot.ini > /proc/1/fd/1 2>/proc/1/fd/2
*/7 * * * * /usr/local/bin/feed2toot -c /feed2toot/feed2/feed2toot.ini > /proc/1/fd/1 2>/proc/1/fd/2

Now you can run the image like before.

License

GNU GPLv3 Image

feed2toot-docker is Free Software: It is licensed under GNU GPL v3 (See LICENSE for more information).