Giter Club home page Giter Club logo

bullshit's Introduction

New Age Bullshit Generator

See the live page here.

Does what it says on the box :) Written in JS, using jQuery.

The main script (main.js) relies on two lists of words called patterns.js, which is a stock of sentence patterns made up of fixed words and variable words, and vocab.js, which contains these variable words.

For example, take this sentence pattern from patterns.js:

This life is nothing short of a ing nOf of adj nMass

Here there are 4 variable words: ing, nOf, adj and nMass.

The script looks inside vocab.js for those 4 words. In the case of ing (a present participle), it might choose "flowering" or "unveiling." For nMass (a mass noun), it might choose "consciousness," "growth" or "stardust."

It then fills each heading and paragraph of the page with a certain number of sentence patterns. Paragraphs get three sentences each, for instance, while each heading gets one.

It avoids duplicate sentences by making a copy of the entire pattern array found in patterns.js at the start and removing each sentence as it is used.

The pretty picture comes from placeimg.com, which generates a random image each time something visits its URL.

You can read about the background and aftermath here.

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.