@qwenny/core v2.0.3
Qwenny Core
An open-source, quasi-AI 20 questions program that can be configured to any custom database.
Made entirely by Cole Gawin
Installation
First, install yarn
npm i yarn -g
Install only Qwenny Core:
yarn add @qwenny/core
Install all of Qwenny:
yarn add @qwenny/all
If you don't plan on running tests:
add the tag --production
Test
npm run test
Usage
This is all the code needed to initialize Qwenny...
const Qwenny = require("@qwenny/core");
const q = new Qwenny("dev")("qwenny.md");
...and this is all the markdown needed to configure Qwenny.
# 20 Questions
Cole Gawin
## Can you get this game to guess who you're thinking?
# UI
@qwenny/ui
# Database
db.csv
# Answers
answers.csv
Learn how to make your Qwenny with:
Markdown
YAML
Markdown
Documentation on how to configure your Qwenny using Markdown.
Your markdown document must be written following these steps. Italicized steps are optional.
Pro-tip: use sites such as stackedit.io to assist in writing your Qwenny Markdown document.
Title
The title of your Qwenny must be at the top of your markdown document, with a first-degree header.
# 20 Questions
Author
The author of this Qwenny should directly follow the title and written in normal text.
Cole Gawin
It can also be written as a markdown link to include an author link:
[Cole Gawin](http://example.com)
Message
This will be the message displayed on your Qwenny. It should be written as a second-degree header, and follow either the author name or title.
## Can you get this game to guess who you're thinking?
Loading game files
To load the database and answers file as created followed by the steps in the Qwenny wiki:
# Database
db.csv
# Answers
answers.csv
Including a Theme
To include a theme:
# Theme
@qwenny/ui
This will be the location of your Qwenny theme. It may be either a node module, or a filesystem folder.
YAML
Documentation on how to configure your Qwenny using YAML.
Your YAML file must be written following these steps. Italicized steps are optional.
Initialize
Prove to Qwenny that this YAML file contains Qwenny configuration information:
Qwenny:
Title
The title of your Qwenny.
title: "20 Questions"
Author
The author of this Qwenny.
author:
name: "Cole Gawin"
You may also include an author link:
link: "http://example.com"
Message
This will be the message displayed on your Qwenny.
message: "Can you get this game to guess who you're thinking?"
Loading game files
To load the database and answers file as created followed by the steps in the Qwenny wiki:
database: db.csv
answers: answers.csv
Including a Theme
To include a theme:
ui: "@qwenny/ui"
This will be the location of your Qwenny theme. It may be either a node module, or a filesystem folder.
Port
Only for development servers
To define the port at which your Qwenny will be served:
port: 3000
Contributing
Pull requests will be maintained as much as possible. Please open an issue with tag request
for feature requests, etc.
Todo
- Code cleaning
- README
- Wiki
License
GNU Lesser General Public License v3.0
See COPYING and COPYING.LESSER to see the full text.