TravelFeed Curation Bot
This bot is written for the TravelFeed curation project on the Steem Blockchain. It supports the following features:
Check posts in #travelfeed for our criteria
The bot streams Comment transactions from the Steem blockchain and checks them for new posts in #travelfeed. If a post is found, the bot checks if the author is on a specified whitelist (action: skipping post) or on a blacklist (blacklist is automatically fetched from the blockchain by listing all users muted by @travelfeed). If none of that applies, the post content is processed and the language of the post is detected. If that criteria is fulfilled, a word count is performed to check if the post fulfills the minimum requirement of at least 250 words. If any of the criteria are not fulfilled, a comment is left to notify the author.
Send eligible posts to Discord
Eligible posts are sent to the Discord channel #post-feed. All posts that have received a comment are excluded, but authors have the option to reply to the bot comment with
!tfreview to have their post sent to #post-feed. For all posts sent to #post-feed the number of honourable upvotes and resteems within the past 7 days is fetched and sent along with the word count and location (see below) to give the curator a quick overview.
Posts in #travel that miss the tag #travelfeed are sent to the Discord channel #ad-feed (once per author). Curator can review these posts and initiate a curation routine to give them a small upvote and leave a comment if there is excess voting power (by reaction/bot-command, see below).
Automating curation routines
Common curation routines that were previously executed manually on Steemit can now be called by authorised curators by either commenting on the post in question with their personal account on Steem or by using a bot command in Discord or by adding a reaction in Discord. See the file curator-instructions.md for detailed instructions. All routines are added to a queue to avoid failed transactions due to block limits.
Automated reward calculation
@travelfeed pays out half of the liquid rewards generated by curation posts to the featured authors. So far, we have been doing this manually, now the bot calculates the amounts each author will receive. As soon as this has been tested for some more time, I will implement automated transfers. The reward calculation is done automatically every 6 hours or can be initiated manually for any amount of days by a bot command. The calculation works for posts paid out in SBD and Steem or either of those.
At @travelfeed we publish one curation post a day with a different theme for every week day. Four of these are based on location. In the past, we have been putting each curated post in the right category manually. The new feature extracts the location of a post from the GPS location if a steemitworldmap code snippet was set and puts it in the right category automatically. Sometimes, we don't have enough curated posts for a curation post theme. In these cases, we were so far looking through the posts in the feed manually trying to find a match for our curation theme, now a bot command scans the last 100 posts in #travelfeed for posts matching the curation post theme.
More Discord bot commands
More Discord bot commands are available for common routines such as checking the current voting mana of @travelfeed and checking the amount of upvotes received by an author from @travelfeed within the past 7 days.
The following python libraries are required (use pip to install): janus, pycountry, pycountry_convert, bs4, markdown, langdetect, discord.py, geopy
The posting key of the account needs to be imported into the beem wallet via the CLI:
beempy addkey yourpostingkey
The secret Discord token and the passphrase of the steem-python wallet (not Steem key!) need to be exportet as environment variable:
export UNLOCK='your-passphrase' export TOKEN='your-secret-discord-token'
Start the bot:
Want to use the WEB UI?
Configure a webserver on the same server that your bot runs on and set a password in the configuration file example.config.php and safe it to config.php.
It is recommended to run the bot from a folder not accessible from the web. You can specify the local path to the logfiles in the config.php