Giter Club home page Giter Club logo

wtfengine's Introduction

WTF Engine

WTF Engine is an HTML / CSS / JavaScript template for generating WTFSIMFD style websites, originally written for What The Fuck Is My Mashup? and inspired by the infamous What The Fuck Should I Make For Dinner? by Zach Golden

This was written simply as a bit of fun. Zach's site was so popular that it inspired references based on other subjects, such as What The Fuck Is My Social Media Strategy? (and consequently What The Fuck Is My Mashup?). As far as I am aware, this idea was Zach's alone and so credit to him for the inspiration. As a meme, there are doubtlessly many topics that could do with the WTF treatment; which is why I decided to create this (very) simple platform.

How to use it

The process is very simple. WTF Engine takes a sentence template and fills in different types of blanks with different types of words, much like the game Mad Libs. You can nominate any amount of templates and as many different categories of words or phrases as you like.

For example, here is a basic implementation

var templates = ["A @colour @animal"];
var corpus = {
	colour: ["red", "green", "blue"],
	animal: ["cat", "dog", "rabbit"]
};

As you can see, you use the @ symbol, followed by the type of word from the corpus you wish to use to tell the WTF Engine to pick a random word of that type from the corpus and insert it at that point.

Note: You can make words plural, present continuous tense (etc) by writing, for example; __@object__s or __@object__ing without having to create separate lists in the corpus.

Grammar

WTF Engine currently performs some very basic grammatical checks, such as when to use 'an' as opposed to 'a' (even this is not failsafe as this grammar is based on phonetics and not simply whether the following word starts with a vowel). These grammatical checks may become slightly more sophisticated in the future, however it's recommended that you design your templates and corpus around these limitations for now.

Building a Corpus

You can easily use Google Spreadsheets to maintain the corpus you're using. Simply create a spreadsheet where each column is a set of words belonging to a particular type (for example nouns, verbs or place names) and ensure that the first row contains the identification of that type, for example:

Example Google Spreadsheet

You can then download the spreadsheet at any time in CSV format (File > Download as > CSV) and run it through the parser which will copy JavaScript code to your clipboard. Simply paste this into corpus and you're ready to roll.

wtfengine's People

Contributors

soulwire avatar

Stargazers

 avatar

Watchers

 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.