Skip to content

An experiment w/ PEG.js: a simple language 2 express a strategy 2 shorten a tweet to 140 chars

Notifications You must be signed in to change notification settings

lucaminudel/tweeeeeeeeeet

Repository files navigation

tweeeeeeeeeet

try it [on-line] (http://www.luca.minudel.it/tweeeeeeeeeet/) or:

  1. download the [latest version] (https://github.com/lucaminudel/tweeeeeeeeeet/downloads)
  2. extract the files
  3. open the htlm page locally in your browser
  4. type your tweet and click the button to shorten it
  5. copy your shortened tweet and tweet it

usage notes

  • you can change the Tweeeeeeeeeet instructions as much as you like, to save the changes you need to edit the html page and change the textarea
  • the syntax should be pretty intuitive, if that was true I should not need to add the next two points
  • shortening instructions are evaluated following their order starting from the first one, until the tweet fit the 140 character limit
  • when the shortened string on the right is not lower case, its case is preserved otherwise the original string case (upper, lower or capital) is used instead

implementation notes

libraries used, thanks to

About

An experiment w/ PEG.js: a simple language 2 express a strategy 2 shorten a tweet to 140 chars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published