Coder Social home page Coder Social logo

oodler577 / skynet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tra38/skynet

1.0 0.0 0.0 278 KB

Skynet is a command-line program that can generate stories based on a template written in a scripting language called Sky.

License: Other

Ruby 96.46% Shell 0.66% Gherkin 2.88%

skynet's Introduction

Skynet

Skynet is a command-line program that can generate stories based on a template written in a scripting language called Sky.

While the program was originally created to generate a novel for National Novel Writing Month, it may also be used for other creative writing projects as well.

Though the program's source code is licensed under the MIT, the Sky files may be placed under their own individual licenses.

Installation

$ git clone https://github.com/tra38/Skynet.git
$ gem install skynet-0.1.0.gem

Usage

$ skynet path/to/story.sky

Sky Language

puts %{ #{HERO.name} never cared too much about #{NOUN}.

Instead, #{HERO.name} would busy himself with his career as a #{HERO.job},
where he would #{HERO.job_purpose}.

While he would work, #{HERO.name} wished for some adventure in his life.

Sometimes, #{HERO.name} #{HERO.action}, but his life was still boring.

So, one day, #{HERO.name} said "#{HERO.speak}". It did not help.

Oh well.}
 Julian never cared too much about Flower Plaza.

Instead, Julian would busy himself with his career as a District Division Coordinator,
where he would repair coats.

While he would work, Julian wished for some adventure in his life.

Sometimes, Julian thought he would be capable enough to handle the task, but his life was still boring.

So, one day, Julian said "The golden age never was the present one". It did not help.

Oh well.

For a 'real-world example' where Skynet may be more useful, look at story.sky.

There are currently 8 different characters...

  1. the HERO
  2. the QUEST_GIVER
  3. the MONSTER
  4. the FALSE_HERO (in earlier versions, the MONSTER_KID)
  5. the MONARCH
  6. the REBEL
  7. the ADVISOR
  8. the TRAITOR

NOUN is a "special location" that is meant to be a focus of the story, but it does not have to be.

If you like to create your own random generators, you can specify your own Custom Rules.

CustomRule.generate_rule "animal", %W(dog cat monkey)

puts %{ The #{CustomRule.animal} is on the mat.} #=> The cat is on the mat.

Phrases are a little more complicated.

CustomRule.generate_rule "animal", %W(#{"terrible and hideous tiger"} #{"lovable and pretty dinosaur"})

puts %{ The #{CustomRule.animal} is on the mat.} #=>The lovable and pretty dinosaur is on the mat.

Because Sky is a DSL of Ruby, Ruby code would work just as fine in Sky. There may be quirks in this system that I have to discover and document.

TODO: Provide more detailed documentation.

Contributing

  1. Fork it ( https://github.com/tra38/skynet/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

skynet's People

Contributors

tra38 avatar

Stargazers

 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.