verachell / YeetWords

a domain-specific language for text substitution
GNU General Public License v3.0
13 stars 0 forks source link
domain-specific-language text-substitution textprocessing

YeetWords

a domain-specific language for text substitution

YeetWords is a domain-specific language for text substitution, and is suitable for programming generative fiction such as NaNoGenMo projects. It is aimed at complete beginners and up.

It is implemented in Ruby, although the YeetWords syntax does not resemble Ruby, nor is any Ruby knowledge necessary for use.

Here is the Quickstart Tutorial and here is the full Wiki. For a working example, you can see an old NaNoGenMo project ported into YeetWords code here.

YeetWords takes your YeetWords code and outputs a text file in Markdown format.

Contents

Installation and usage
Overview
Features
Restrictions
Credits
License & development info

Installation and usage

Usage is covered in the tutorial and wiki mentioned above, but the basic approach is:

  1. If you don't already have it, install Ruby on your machine (this is covered in the quickstart tutorial)

  2. Make sure you have downloaded the yeetwords.rb file from this repository in your working directory on your computer.

  3. (optional) In your working directory, create folders called words and sentences which contain your files of words and sentences respectively.

  4. Create a file with your YeetWords code

  5. Run ruby yeetwords.rb yourcodefile.txt - it will output a file in Markdown format.

Overview

Build sentences such as this and have it randomly substitute the words for you:

Feeling _EMOTION_, _PERSON.NAME_ went to the _BUILDINGTYPE_

Make your own data structures - people, cities, or other things.

Create loops, change your vocabulary, kill off characters, add or subtract items to their inventory, and more.

Features

Restrictions

Credits

  1. Nonbinary names - The majority of nonbinary names hard-coded into the program come from The Blunt Rose.

  2. Male and female names - The male and female names card-coded into the program come from the most popular 1000 names in 2019 from Popular baby names - Social Security Administration of the United States of America. From this list, less common names were selected for use in this program (from within the 500 - 1000 most common names).

License & development info

YeetWords is licensed under the GNU GPL 3.0 license. This software was developed and tested by Veronique Chellgren using Ruby v 2.7.0 in a Linux environment. It has also been tested on Ruby v 3.1.2 in a Windows 11 environment.