Git Product home page Git Product logo

godhoodbot's Introduction

GodhoodWB Bot

This project aims to create a bot for r/godhoodwb which helps the people in various ways.

Design Principles

The bot should have the following properties:

  1. easy: no complex syntax is required to use it
  2. fail-safe: texts only ever experience minor changes, and always with human supervision
  3. non-intrusive: the bot syntax is subtle and bot messages are short
  4. non-essential: the bot can (to some degree) be instantly replaced by a human worker
  5. helpful: the bot offers small pieces of help, but does not require you to take any or all of them

Features

The following features are planned:

Wiki-Parsing Generic Badge

The wiki is parsed into a tree of entries.

An entry has the following syntax:

### The Name of Entry

Info: /u/responsible_player [Turn X](link_to_relevant_comment)

A description follows, over multiple lines.
It may not contain any headlines (##), as those start a new entry, although perhaps a child entry.
Separators (---) are also forbidden.

#### Child Entry

Every entry needs to have a description, but the info line is optional.

Child entries need to have more "#"s in their headline than the parent entry.

---

Horizontal separators signal the end of an entry, no more description or child entries will follow.
They usually aren't required to be added by the user, and if the user adds some, 
they might be removed during formatting.

Wiki-Sorting and -Formatting Generic Badge

The parsed wiki tree can be sorted and formated. The tree structure is retained, child entries are sorted such that deepest headlines come first, and then alphabetically.

Example:

# The World
#### Master Copy
## Biomes
### North Pole
#### The Arktis
#### Bering Strait
### Rainforest

Wiki-Parsing from Comments Generic Badge

Besides the wiki pages, the bot can also parse sections of comments. The sections need to be marked with a start and end command, each taking a whole line. Markdown formatting and out-of-context brackets ([]) are optional.

The start command is wikibot start <entry>, where <entry> is some existing entry in the wiki. The subsequently parsed entries are then inserted as the children of <entry>. If a child-entry already exists, instead it is updated.

End commands either have the form wikibot end or are simply the end of a comment.

Human Wiki-Editing Generic Badge

If a human edits the wiki, the bot will not overwrite the changes with older information (it uses timestamps for that). Changes to the info or the description of some wiki entry are safe in that regard, and can even be used to fix errors the bot made.

Only syntax formatting and ordering of posts will not be retained.

Adding a new wiki entry is easily doable as well.

Deleting a wiki entry might be a bit more elaborate, and the bot will have to be updated when that becomes necessary.

Wiki-Links Generic Badge

If you use a wiki-link in your comments, the bot will respond with a collection of links to the respective wiki entries, using the tooltip to display their description.

The syntax in your comment is [[arktis]], which is displayed as [[arktis]].

The bot's respond will be displayed as The Arktis, with syntax

[The Arktis](https://www.reddit.com/r/godhoodwb/wiki/godhoodwb19/wiki/world#wiki_arktis "lots of ice")

Website - Checking the Bot Generic Badge

There is a website which runs the bot.

It allows you to check how the bot will interpret your comment, displaying which line is which and providing error messages.

You can use it to learn how the bot works, although I think using it to write/pre-format the reddit comments is too much of a hassle (switching browser tabs etc.).

It also won't safe your work, so beware sudden loss of text!

godhoodbot's People

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.