Tweem 0.1.5, tweet templating and applications filtering !

in #utopian-io7 years ago (edited)

header2.png
Click here to get redirected to the GitHub repository of Tweem.

It's been more than a week since the public release of Tweem. Since then I've been working on several already shared ideas as well as some others that came up while coding. I want to thank @evildido for giving me some good ideas I would have never thought of, so far one of them has been implemented. In case you missed this project's announcement post, Tweem is a bot that helps you sharing posts coming from Steem by automatically tweeting them. Tweem aims to be as configurable as possible, this is why most of the improvements made to the bot are related to its configurability.

Template your tweets !

Previously tweets made by Tweem weren't customizable except for some basic parts, that's why a brand new templating system has been added to this project. This system made the include_title and include_tags settings obsolete, they have therefore been removed. However, a new template property has been added to the config file, this property is explained more in depth in the README file. Keep in mind that this is only a prototype at this point and that it will get changed later to make it easier to read and understand. The future templating system is in the making and will give you more freedom. (commit)

More options for selected accounts !

With the public release of Tweem came an issue I hadn't foreseen. Some users wanted to tweet their posts and resteems but also posts from other users. However, they didn't want to tweet other users' resteems, which was impossible with the way Tweem handled accounts. This problem has been solved by simply splitting the steem_accounts array in two: steem_accounts.posts and steem_accounts.resteems. If you want to only tweet posts from a specific user, you will have to put him in posts. The same logic applies with resteems. Of course, you can put the same user in both lists if you want to tweet his posts and his resteems. (commit)

Filter out the applications you don't want !

Thanks to @evildido for this excellent idea ! Tweem used to give you two options for tweets coming from another application than Steemit. Either the link sent the user to Steemit or it sent him to the application the post came from. This choice was made by the user for each application through the allowed_links setting in the config file. A third option has now been added to this setting (renamed allowed_apps to reflect the change): not tweeting at all. Giving a value of 0 to an application means that you don't want to tweet, 1 means that you want to tweet with a link to the default application and 2 means that you want to tweet with a link to the application the post is coming from. (commit)

Choose another default application !

Some of you may prefer to have links redirecting to Busy for example rather than Steemit, this is now possible thanks to the default_app setting. This setting lets you define which application Tweem should use for posts with an unhandled/unknown application or with an application that got a value of 1 in allowed_apps. You can't put a random value in default_app though, it must be the label of an application that can read any post. Those labels can be found in the "Supported apps" section of the README file. Valid applications for that setting are the ones that have a bold "✓" in the "Viewing" column. (commit)

Avoid duplicates !

With the options added to specified accounts came a problem. When a specified account from the posts array posts something, the bot will tweet, which is totally normal. However, if another account from the resteems array resteems that post, the bot will also tweet, resulting in a duplicate tweet. To avoid such a problem, a twitter_handle property has been added to the config file. You have to put your Twitter handle (without the "@" character) in this property so that the bot can use the Twitter Search API to find posts with the same link coming from your account. If at least one tweet has been found, Tweem won't tweet. This is still somewhat of a prototype due to the Twitter Search API not being that reliable. You may still have duplicate tweets on your profile, it will however always tweet if the post hasn't been tweeted before. A new way of getting rid of duplicates (without using the Twitter Search API) is already being thought of but it will have to come later. (commit 1 - commit 2)

Less crashes, less problems !

The old stream process wasn't that good, it crashed way too often because of errors coming from the nodes used. The problem is that Tweem was using full nodes for every Steem related operation which was not a good idea. Indeed, full nodes tend to crash more often than low memory nodes. Now, low memory nodes are used to stream, which reduces the amount of stream crashes, while posts details are gathered from full nodes. This way if an error comes from a full node, it isn't necessary to start the stream again, Tweem can just send a request to another node. (commit)

The new comers

Everyday I'm looking for new or missed applications on the #steemdev tag so I can add them to the ever-growing list of applications supported by Tweem. Since the last post, 9 applications have been added to this list and one has been removed. You can see the exact changes made to that list in the table below.

±ApplicationLabelDescriptionP️V
+BlockDealsblockdealsA Community Platform for Bargain Hunters and Deal Spotters.
-dManiadmaniaGagnez de l'argent avec des memes, des images et vidéos amusantes.
+HedehedeKnowledge Sharing Dictionary.
+InsteeminsteemDecentralized News by Independent Journalists.
+Memeit.LOLmemeit.lolA creative platform you can use to create your own meme and post it on the Steem Blockchain.
+mTasksmTasksA Fiverr like platform built on top of STEEM Blockchain.
+OnePlaceoneplaceWeb-application based on Steem and Golos blockchains.
+SteemdsteemdA blockchain explorer for the STEEM blockchain.
+SteemDBsteemdbBlock explorer and database for the STEEM blockchain.
+SteemThinksteemthinkYou Ask - We Answer - Share Knowledge.

If you are working on an application that you feel should be in this list, let me know through a comment on this post ! I'll add it as soon as possible.

What's coming next ?

  • More supported applications: Uneeverso, Strimi, SteemGigs, SteemLinked, Coogger et BlockPress.
  • An simple templating system: the current one is way too complicated.
  • A written tutorial to help you run your own instance of Tweem: this tutorial will be precise and aimed at people knowing nothing about JSON and/or deploying an application on Heroku. It should be coming this weekend.
  • A special case processing for Twitter-like posts: Busy's quick posts, Zappl...
  • A better processing of resteems containing a comment: when they will be made available on Steem.
  • Sharing on more websites: Facebook, Reddit...
You can find a live version of this list on the "Projects" page of Tweem.

Contributions

If you want to contribute to this project or talk about an issue it has, feel free to visit its GitHub page. You can also clone it and follow the instructions written there to get it running. My social medias are listed at the end of the README file. If you add me on Steam, tell me the reason why on my wall, otherwise I won't accept your friend request.

Proof of Work Done

https://github.com/RagePeanut/

Sort:  

I saw steemthink.
thank you for your support

No problem ! Congratulations for your platform, Steem definitely needed its own StackOverflow-like platform ! ;D

This is an amazing job @ragepeanut.

Thanks for the contribution!

The way you wrote your contribution made it a pleasure to read, and it's also obvious to me that a lot of work went into this contribution! Keep up the good work!


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thanks a lot for your feedback ! :D

I was a bit worried to be honest because I didn't know if I had to follow exactly the template structure or if I could change it a bit, now I know ! :P

Beautiful work.

Hey @ragepeanut
Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximal vote for the development category on Utopian for being of significant value to the project and the open source community.

We're already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

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

Vote for Utopian Witness!

@ragepeanut I have submitted an issue in your repository. IT is a logo proposal for tweem