GithubHelp home page GithubHelp logo

mcanthony / rant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theberkin/rant3

1.0 4.0 0.0 1.51 MB

The Rant Procedural Text Generation DSL

Home Page: http://berkin.me/rant

License: MIT License

C# 99.71% C++ 0.19% CSS 0.11%

rant's Introduction

Rant logo

Build status Build status

##What is Rant?

Rant is a language for procedurally generating text, written in C#. It combines a markup language with functional and imperative programming concepts to deliver a powerful, but easy-to-use tool for adding rich variations to your text. The ultimate goal of Rant is to augment your creativity with the boundless potential of randomness, helping you consider your next great idea as not just a static concept, but a seed for countless possibilities.

berkin.me/rant

##Features of Rant

  • Recursive, weighted branching with customizable selection strategies
  • Dictionary queries
  • Automation for capitalization, rhyming, and indefinite articles
  • Multiple output support
  • Richard, an experimental embedded scripting language
  • Probability modifiers
  • Loops, conditionals, and subroutines
  • Package loader for easy resource management
  • Unmanaged function exports for use in C/C++ applications (Windows only, sorry!)
  • Compatible with Unity
  • And a whole lot more!

##Examples

Fill in the blanks

<name-male> likes to <verb-transitive> <noun.plural> with <pron.poss-male> pet <noun-animal> on <timenoun.plural-dayofweek>.
Alick likes to mount shuttlecocks with his pet bat on Mondays.

Generate ten random numbers between 1 and 50 and spell them out

[case:sentence][numfmt:verbal-en][rep:10][sep:\s]{[num:1;50].}
Four. Ten. Thirteen. Fifteen. Eighteen. Twenty four. Seven. Forty eight. Nineteen. Twenty five.

Write a poem

[rhyme:perfect]
The <noun(1)::&a> <verb.ed(1)-transitive::&a> the <adj::&a> <noun(1)::&a>.
The bread fed the red head.
The drug dug the smug plug.

?????

[rs:16;\N]
{
    [r:50]{([rr])\u2593|([re])\s}
}
▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓   ▓    ▓       ▓ ▓          
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓ ▓ ▓▓▓ ▓            ▓         
▓▓▓▓▓▓ ▓▓▓▓▓ ▓ ▓▓▓ ▓ ▓  ▓ ▓▓▓▓ ▓▓ ▓   ▓           
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓ ▓  ▓  ▓    ▓▓   ▓▓  ▓▓         
▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓ ▓▓ ▓ ▓ ▓  ▓ ▓ ▓▓▓▓   ▓          
▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ ▓  ▓  ▓▓                    
▓▓▓▓▓▓ ▓▓▓  ▓▓▓  ▓▓ ▓▓ ▓ ▓▓  ▓▓▓ ▓  ▓ ▓ ▓      ▓  
▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓    ▓▓  ▓▓ ▓▓▓▓ ▓▓▓  ▓            
▓▓▓▓▓▓▓▓▓▓ ▓▓▓   ▓▓▓▓▓▓▓ ▓▓                 ▓     
▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓      ▓ ▓  ▓ ▓  ▓  ▓   ▓  ▓▓      
▓▓▓▓▓▓▓▓▓▓ ▓ ▓ ▓▓ ▓ ▓▓▓▓▓▓▓ ▓      ▓   ▓          
▓▓▓▓▓▓▓▓▓▓ ▓  ▓▓   ▓▓▓   ▓▓▓▓▓     ▓ ▓▓           
▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓ ▓  ▓▓▓ ▓    ▓     ▓    ▓         
▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓   ▓ ▓▓ ▓▓▓   ▓▓        ▓     
▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓  ▓▓▓ ▓▓ ▓▓   ▓      ▓ ▓ ▓        
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓  ▓▓     ▓    ▓       ▓▓▓ ▓      

##NuGet Rant is also available as a NuGet package. Punch the following into your package manager console and smash the Enter key enthusiastically to get it:

PM> Install-Package Rant

Or if development builds are your thing:

PM> Install-Package Rant -Pre

But remember, the latest version will always be available on the repository first.

##License Rant is provided under The MIT License.

##Improve Rant If there is something you want fixed, added, or changed, feel free to submit an issue/pull request. You are welcome to help with any of the following:

  • Documentation
  • Fixing bugs
  • Optimization
  • New functions
  • New language features
  • Improving old language features
  • New API features
  • Formatting support for other cultures

##Learn Rant See berkin.me/rantdocs for full documentation of the API and Rant language, as well as additional example code.

##Support Rant If you love my work and want to support it by donating, you can do so here. Donating isn't required, but it's much appreciated!

##Other projects If you like Rant, you may also like these other, Rant-related projects:

  • RIDE: The official (and highly WIP) Rant IDE
  • Rantionary: The official Rant dictionary

:squirrel:

rant's People

Contributors

devprice avatar dialupnoises avatar paavohuhtala avatar spanfile avatar theberkin avatar zhangfann avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.