The Magic Story Machine: Automatically check and warn about submission length

in #utopian-io6 years ago (edited)
the-magic-frog-src-cc-0-from-pixabay-remixed)

Project Background

The Magic Story Machine is an open source bot for the Steem blockchain which enables collaborative storytelling. Prospective contributors suggest additions to the story by commenting on a daily post.

According to the mechanics of the storytelling game, which creator @mkt describes more fully in this post, additions to the story are determined by community upvotes (i.e curation). Contributions that are chosen for inclusion in the story are rewarded with a share from a 'pot' of cryptocurrency generated by the game's daily posts.

Of course, all story suggestions — whether daily winner or not — can earn Steem for the poster.

Components

This suggestion expands the validation and user feedback experience of the bot. This would involve modifying mainly:

https://github.com/mktcode/the-magic-story-machine/blob/master/bot.js

Proposal

By design users propose each addition to the running story by making a comment to the main daily post. This comment must begin with a blockquote (denoted in Markdown by the character > followed by a space):

> Write here what you want to append to the story, in one line.
Leave a space after the > and use no more than 250 characters.

As noted in the template above there is currently a limit of 250 characters for each submission. If the user submits his suggestion via a website specifically designed for the contest it will be checked to enforce this limit.

In contrast submissions made by another Steem blockchain platform — Steemit, for example — are not validated this way. It is easy for a new or very enthusiastic contributor to run over the limit. Indeed this author did so on his own first submission.

After determining if a comment begins with a blockquote it can be further validated as to whether it is shorter than 250 characters. If the submission is too long the bot can post feedback stating so, as well as recommending use of the game website to avoid the mistake in the future.

Mockups / Examples

Here is a sample implementation to illustrate the validation in pseudocode, assuming an events framework similar to SteemBot and a utility library like Lodash:

bot.onComment((comment, responder) => {
  if (_.startsWith(comment.body, '> ') && comment.body.length > 250) {
    responder.comment(
      'You exceeded the character limit of 250.' +
        'Please use http://the-magic-frog.com/' +
        'to avoid this common mistake.'
    );
  }
});

Here is how the process might appear to the user:

image.png


Image src CC-0 from Pixabay (remixed)



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

You got a 19.24% Upvote and Resteem from @ebargains, as well as upvotes from our curation trail followers!

If you are looking to earn a passive no hassle return on your Steem Power, delegate your SP to @ebargains by clicking on one of the ready to delegate links:
50SP | 100SP | 250SP | 500SP | 1000SP | 5000SP | Custom Amount

You will earn 80% of the voting service's earnings based on your delegated SP's prorated share of the service's SP pool daily! That is up to 38.5% APR! You can also undelegate at anytime.

We are also a very profitable curation trail leader on https://steemauto.com/. Follow @ebargains today and earn more on curation rewards!

Thanks for the suggestion! This (and more) is absolutely planned!
I'm just a lazy programmer... so it will take some time! ;)

Once upon a time there was a lazy programmer... ;D

That's a whole different story.... but yeah... it starts with that sentence! xD

Hey @tdre! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io

Thank you. Your contribution has been approved.


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

[utopian-moderator]

Cool, I appreciate you taking the time to moderate and comment @syedumair

Wow, this would be great to do in Spanish. It hurts that my English is limited to the translator, but being able to do it in Spanish will be super great.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by tdre from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 62964.22
ETH 2595.61
USDT 1.00
SBD 2.74