TravelFeed Curation Post Helper

in #utopian-io5 years ago

A few months ago, we at the @travelfeed curation team were forced to temporarily stop publishing daily curation posts. While the template was always the same and the posts were already ranked in the curation process, creating a post every day took more time than our small team can afford while working on our dApp. This is why I wrote this script that generates TravelFeed curation posts automatically from our Hivemind. Since the ranking of the posts is still done manually by our team, this saves a ton of time without impacting the quality.

Screenshot 20190428 at 23.20.48.png

A screenshot of an automatically generated curation-post. The screenshot is from the upcoming Beta of our dApp!

Repository

https://github.com/travelfeed-io/travelfeed-curationposter

Project description

This script is executed every day from Monday to Saturday (the Sunday weekly round-up is published manually) as a cronjob. The current day (UTC) is determined, then posts from the past 7 days for the appropriate daily topic are queried from Hivemind.

For most round-ups, a list of country-codes is queried:

hive_posts_cache.columns.country_code.in_(country_codes)

For the Wednesday- and Saturday round-up, a tag (#foodoftheworld or #traveladvice) is queried:

hive_posts_cache.columns.post_id.in_(db.select([hive_post_tags.columns.post_id]).where(hive_post_tags.columns.tag == tag))

Apart from these, posts are selected only if they meet certain criteria. They have to be valid travelfeed posts (250 words and tagged with #travelfeed) and can't be comments. Posts without a @travelfeed upvote of at least 30% are not eligible, neither are posts by @travelfeed.

where(db.and_(hive_posts_cache.columns.is_travelfeed == True, hive_posts_cache.columns.author != "travelfeed", hive_posts_cache.columns.depth == 0, hive_posts_cache.columns.curation_score >= 3000))

The posts are sorted primarily by the curation score given by our curation team (=upvote by @travelfeed), secondarily by the TravelFeed miles score given by the community and curation trails (total vote percentages):

order_by(hive_posts_cache.columns.curation_score.desc(), hive_posts_cache.columns.total_votes.desc())

Each curation post features up to three eligible posts, the featured authors are set as 13% beneficiary each. The retrieved posts are processed to retrieve a sanitised excerpt and are then combined with several template snippets to the final post which is then posted to Steem with beem.

The text templates and criteria can be specified in the curation file post_templates.example.json, an example configuration can be found in the repository.

GitHub Account

https://github.com/tiotdev

Sort:  
  • This article feels more like a blog post. Include explanation of coding choices for a development post.
  • An invitation for others to contribute would be nice.
  • There are no comments in the code.
  • Days of the week should always be capitalised. It does seem here that it will be part of the title of the article but feels unfinished as the title would look like this: monday title - Weekly Round-Up #62
  • Dead code should be taken out.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thanks for the review! A few questions:

  • monday title is not the actual title but an example from the sample configuration file. We use our own configuration (see below) in production which does not belong in the repository, but I thought it would be better to provide an example configuration instead of having contributors figure out by themselves which structure the configuration file should be in. Should I leave out example configurations in future contributions?
    Screenshot 20190429 at 14.24.18.png
  • What does "coding choices" mean for a simple script like this? Should I explain why I chose beem over steempy or sqlalchemy over some lesser used alternative?
  • How detailed would you expect comments to be? In a relatively simple script like this using clearly understandable names, I personally find that more comments than necessary don't improve the ease of understanding the code.

Thank you for your review, @helo! Keep up the good work!

Great work JPP ...

Hi @jpphotography!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 4.759 which ranks you at #1597 across all Steem accounts.
Your rank has improved 4 places in the last three days (old rank 1601).

In our last Algorithmic Curation Round, consisting of 169 contributions, your post is ranked at #47.

Evaluation of your UA score:
  • Some people are already following you, keep going!
  • The readers appreciate your great work!
  • You have already shown user engagement, try to improve it further.

Feel free to join our @steem-ua Discord server

Hello, as a member of @steemdunk you have received a free courtesy boost! Steemdunk is an automated curation platform that is easy to use and built for the community. Join us at https://steemdunk.xyz

Upvote this comment to support the bot and increase your future rewards!

Hey, @jpphotography!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Hi @jpphotography,

Your post has been removed from TravelFeed.io after manual review by our team for the following reason: dev post

Since it violates our policies, your post has been hidden from searches on TravelFeed.io, but will remain visible when accessed directly.

To learn more about our policies, you may check them out here. Please contact us through our Discord if you wish to appeal.

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.029
BTC 57849.42
ETH 3122.29
USDT 1.00
SBD 2.43