Giter Site home page Giter Site logo

invnotesgenerator's Introduction

Inventory Notes Genorator

A simple application that will parse a block of text and format the contents into two tables. The first table is for items, the second is the currency split amongst the list of players.

Output Textbox

The output window shows the markdown formmated results parsed from the Players and Items/Currenct textboxes. The output is updated live and is formatted to support the limited markdown parsing supported by Discord. Copy the output textbox by selecting all the text, including the backtick (`) marks at the start and end of the textblock.

Players Textbox

List the players that are to receive an equal portion of the currency.

Separate players with a space or on its own line.

the last player marked with an (*) either at the beginning or end of the players name will be set to be the first player to receive the distributed currency. This is to let the user track which players were shorted the last time currency was handed out and make sure that player is distributed to first.

Example

(Players)

Chasz Chass Shadow
Skaggic *Niles Uunsha Elmo(N)

(Items/Currency)

13g

Result

# Money (0p 13g 0e 0s 0c)
| Player  | Currency       | Equivalent |
| ------- | -------------- | ---------- |
| Chasz   | 0p 2g 0e 0s 0c | 2g 0s 0c   |
| Chass   | 0p 2g 0e 0s 0c | 2g 0s 0c   |
| Shadow  | 0p 2g 0e 0s 0c | 2g 0s 0c   |
| Skaggic | 0p 1g 0e 0s 0c | 1g 0s 0c   | (Rounding)
| Niles   | 0p 2g 0e 0s 0c | 2g 0s 0c   |
| Uunsha  | 0p 2g 0e 0s 0c | 2g 0s 0c   |
| Elmo(N) | 0p 2g 0e 0s 0c | 2g 0s 0c   |

Items/Currency Textbox

This textbox will try to parse the user input line by line to find the following

Title

the last line that starts with a # will have the text following the # as the title for the output text

Exmple

# 1234
#abcd

Result

# abcd
....

Items

To add an item to the items output table it must follow the following pattern. Each item must be on a line by itself

(number of items) (name of items, spaces allowed) @(holder)

Example

7 Arrows of Walloping @John

Result

| 7      | Arrows of Walloping | John |

Currency

Each line that does parse to be the title or an item may contain any combinaion of currency, including multiple of the same currency. Currency must follow the (amount)(type) format.

The amount must be a positive whole number, the type can be:

p = platinum

g = gold

e = electrum

s = silver

c = copper

Example

14p 21g 5c 315g 92s
82s 15c

Result

# Money ( 14p 336g 0e 174s 20c )
...

invnotesgenerator's People

Contributors

elrholis 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.