<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/rss.xsl" type="text/xsl" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Feed2toot | Bacardi55&#39;s Web Cave</title>
    <link>https://bacardi55.io/tags/feed2toot/</link>
    <description>Recent content in Feed2toot on Bacardi55&#39;s Web Cave</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>bac@rdi55.pl (bacardi55)</managingEditor>
    <webMaster>bac@rdi55.pl (bacardi55)</webMaster>
    <copyright>2010-2025 bacardi55</copyright>
    <lastBuildDate>Sat, 22 Apr 2017 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://bacardi55.io/tags/feed2toot/index.xml" rel="self" type="application/rss+xml" />
    <item>
      
      <title>Running feed2toot in a docker container</title><link>https://bacardi55.io/2017/04/22/running-feed2toot-in-a-docker-container/</link><pubDate>Sat, 22 Apr 2017 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2017/04/22/running-feed2toot-in-a-docker-container/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Today, a very quick blog post on a how to install &lt;a href=&#34;https://gitlab.com/chaica/feed2toot&#34;&gt;feed2toot&lt;/a&gt; in a docker&#xA;container. Feed2toot is a python application that will send toot on&#xA;Mastodon for each item of an RSS feed.&lt;/p&gt;&#xA;&lt;p&gt;If you want to install Mastodon, I suggest you read here:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Docker-Guide.md&#34;&gt;Offical documentation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://hackernoon.com/deploying-mastodon-on-digital-ocean-f54b94c7f5b8&#34;&gt;Intall guide for Digital ocean&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://psychedeli.cat/mastodon/&#34;&gt;French intall guide on Debian&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;if you want to install &lt;a href=&#34;https://gitlab.com/chaica/feed2toot&#34;&gt;feed2toot&lt;/a&gt; in a container to be&#xA;able to create toot from an RSS feed, then keep reading :).&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-the-docker-image&#34;&gt;Create the docker image&lt;/h2&gt;&#xA;&lt;h3 id=&#34;get-the-files&#34;&gt;Get the files&lt;/h3&gt;&#xA;&lt;p&gt;You can start with my repo as a base:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    git clone https://git.bacardi55.org/bacardi55/docker-feed2toot.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;build-the-container-image&#34;&gt;Build the container image&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    cd docker-feed2toot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    docker build -t b55/feed2toot .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;You can change the tag name :)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;configure-feed2toot&#34;&gt;Configure feed2toot&lt;/h2&gt;&#xA;&lt;p&gt;Edit the &lt;code&gt;conf/feed2toot.ini&lt;/code&gt;, &lt;code&gt;conf/rsslinks.txt&lt;/code&gt; and&#xA;&lt;code&gt;conf/hashtags.txt&lt;/code&gt; files as describe in the [[][official&#xA;documentation]]&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The current release needs a hashtags file, even empty! It will become&#xA;optional in the next release&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;run&#34;&gt;Run&lt;/h2&gt;&#xA;&lt;h3 id=&#34;get-your-credential-first&#34;&gt;Get your credential first&lt;/h3&gt;&#xA;&lt;p&gt;Then, register your application with your mastodon account:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    docker run --rm -v &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;pwd&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;/conf:/etc/feed2toot -it b55/feed2toot register_feed2toot_app&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It will ask your password (but won&amp;rsquo;t save it) to generate token files.&lt;/p&gt;&#xA;&lt;h3 id=&#34;test-the-first-run&#34;&gt;Test the first run&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    docker run --rm -v &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;pwd&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;/conf:/etc/feed2toot b55/feed2toot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Go to your user mastodon page, you should see the toot generated :)&lt;/p&gt;&#xA;&lt;h3 id=&#34;automate&#34;&gt;Automate&lt;/h3&gt;&#xA;&lt;p&gt;To avoid launching the app manually, let&amp;rsquo;s put a simple task in our&#xA;crontab:&lt;/p&gt;&#xA;&lt;p&gt;Open the crontab file: &lt;code&gt;crontab -e&lt;/code&gt; and insert this line:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    @hourly docker run --rm -v /path/to/conf:/etc/feed2toot b55/feed2toot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And you should be good to go!&lt;/p&gt;&#xA;</description></item>
  </channel>
</rss>
