Migrate Feed2tweet from 1.0 to 1.1

Feed2tweet 1.1, your RSS to Twitter bot, had a compatibility-breaking change: the format of the cache file changed because of a Python platform-dependent issue of one of the dependencies.

 

It is mandatory to execute the following steps in order to keep safe the timeline of your Twitter account (and maybe more important the timelines of your followers).

How to migrate Feed2tweet 1.0 to 1.1

We start by commenting the Feed2tweet entry in the system crontab:

# */10 * * * * feed2tweet feed2tweet -c /etc/feed2tweet/feed2tweet.ini

The next step is to update Feed2tweet:

# pip3 install feed2tweet --upgrade

As we may have an issue during the upgrade, we back up the cache file:

$ mkdir feed2tweet-backup
$ cp /var/lib/feed2tweet/feed2tweet.db feed2tweet-backup/

Now we remove the Feed2tweet cache file:

$ rm -f /var/lib/feed2tweet/feed2tweet.db

So far so good, let’s regenerate the cache file by getting all then entries but NOT sending them to Twitter:

$ feed2tweet --populate-cache -c /etc/feed2tweet/feed2tweet.ini

Almost finished. We execute the dry run mode in order to check the result. You should not have any displayed entry, meaning you’re now ready to send the next ones to Twitter:

$ feed2tweet --dry-run -c /etc/feed2tweet/feed2tweet.ini

And of course to finish we uncomment the Feed2tweet line in the /etc/crontab file

*/10 * * * * feed2tweet feed2tweet -c /etc/feed2tweet/feed2tweet.ini

We’re all set! The new RSS entries of your feeds will be automatically posted to Twitter.

More information about Feed2tweet

… and finally

You can help the Feed2tweet Bot by donating anything through Liberaypay (also possible with cryptocurrencies). That’s a big factor motivation 😉

3 thoughts on “Migrate Feed2tweet from 1.0 to 1.1

  1. Hi!

    I’ve found feed2twitter and i’am just playing around with it. I wonder if it may be possible to have linefeeds in a Tweet? Like this:

    [rss]
    tweet={title} \n\n{link}\n\n#aHashtag

    Is this somehow possible?

  2. Hi Carl,

    it’s me again. I’am not very good with git und other things… but i made it the implement the CR+LF Option.

    Maybe you would like to add it?

    i’ve added
    finaltweet = finaltweet.replace(‘[cr]’,’\n’)
    finaltweet = finaltweet.replace(‘[crlf] ‘,’\n\r’)
    in main.py in Line 176++

    Take into account the “space” after the “]”

    With this i can create a
    tweet={title} [crlf] {link} [crlf] #hastag1 #hashtag2

    to get a proper formated Tweet.

    I’ve also exptended the calulation for the max Tweet-size from 140 to 280 Chars for the hashtag feature.

    I’am still struggleing with uri and uri_list. Because i get errors if uri does not exists in the ini. I thought i do not need that wenn i use uri_list=file.txt

    Anyway. Works for me now.

    Thank you very much for your work!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *