Auto-Responder for (inappropriate) Cheetah Comments
utopian-io·@mkt·
0.000 HBDAuto-Responder for (inappropriate) Cheetah Comments
<center>  </center> #### Repository https://github.com/mktcode/cheetah-cmon *This post is more fun than a serious development contribution but hey... maybe someone is in a similar situation and wants to use it.* The situation is the following: @the-magic-frog (as well as @der-zauberfrosch and @grenouille) publishes a post everyday, containing a story that evolves with every post. So the posts are more or less identical, except that everyday a new short part is added. That's simply how the project it works. You can also read the story on the website. I won't explain the whole project here now. To learn more about it go to [the-magic-frog.com](https://the-magic-frog.com). **The reason for this contribution is that @cheetah often times comments on posts that are not at all plagiarism, which starts to become a little bit annoying now, in my case.** So at a certain point of progress @cheetah considers each post to be copied from the website or an earlier post. Examples:   I commented multiple times and asked to whitelist those accounts. Unfortunately there hasn't been any reaction so far. So I automated this task with this little auto-responder.  # The Code At first the code was specific for The Magic Frog project. This is now the master branch. https://github.com/mktcode/cheetah-cmon/blob/master/index.js It handles all the frog accounts in one script but I thought that maybe someone else can need this little helper too, so I opened a new branch with a general purpose version. https://github.com/mktcode/cheetah-cmon/blob/general-purpose/index.js The script looks for the latest post of a given account and then looks for a comment from @cheetah. If there is one and the given account has not yet replied to that comment, the script does that, based an a template that you must provide. ## How to use Node.js must be installed an then do the following: ``` git clone https://github.com/mktcode/cheetah-cmon.git cd cheetah-cmon git checkout general-purpose npm i export POSTING_KEY=... export ACCOUNT=... ``` `ACCOUNT` is of course the account that the bot should watch and look for a @cheetah comment to reply to. `POSTING_KEY` is the posting key of that account, so the bot can post the reply. Now create a `comment.md` in the root directory of the project. In this file you put your comment, that you want to be automatically published whenever @cheetah comments on your latest post. `comment.md`: ``` Dear @cheetah, please consider whitelisting my account... ``` ### Cronjob The cronjob can look like this: ``` # run every hour 0 * * * * . /home/<user>/cheetah-cmon.conf; /usr/local/bin/node /home/<user>/cheetah-cmon/index.js >> /home/<user>/cheetah-cmon/cheetah-cmon.log ``` `/home/<user>/cheetah-cmon.conf`: ``` export POSTING_KEY=... export ACCOUNT=... ``` # Roadmap - Automatically down- or upvote @cheetah's comment :P # Contribute Simply submit a PR but please only on the general-purpose branch. ;)
👍 mkt, fanni-steem, steemitstats, helo, analyzer, afridayanti, zcool, cryptonewsly, hanffreunde, yuki-nee, midun, gopax-deeposit, hro066, yarondrei, davletshi, ingakoral, missvega, antonova2030, felicjann, baejz, seca17, giogiorgadze1221, coinpyments.net, ocinpayments.net, coinpaymets.net, postprmoter, conpayments.net, mmyupbit, appreiator, huobi-proo, go4d, yuxi, chrislyr, chadrona, tanmoypain, leir, ramjee121, roxane, jamzed, jagotoyar, holger80, devrajsinghrawat, amosbastian, r351574nc3, salty-mcgriddles, maxpatternman, cahlen, livingtoday, tensor, jrawsthorne-dev, semasping, techtek, trufflepig, jga, movement19, shookriya, erikaflynn, doughtaker, electronicsworld, utopian-io, developspanish, shadowmyst,