workbench

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 1 Imported by: 0

README

Workbench

Personal workbench for all the things I automate or don't want to forget. It's also a personal project to expand my Go knowledge.

Installation

$ go install gitub.com/bdunn313/workbench@latest

Usage

Roll

Roll is a simple dice roller. It takes a dice notation and rolls the dice. It supports the following notation:

  • d6: Roll a single 6-sided die
  • 2d6: Roll two 6-sided dice
  • d6+1: Roll a single 6-sided die and add 1 to the result
  • 2d6+1: Roll two 6-sided dice and add 1 to the result
  • 2d4+3d8+4+1d20+2: Roll two 4-sided dice, three 8-sided dice, a single 20-sided die, and add 4 and 2 to the result
$ workbench roll 2d4+3d8+4+1d20+2
Rolling: 2d4+3d8+4+1d20+2

 2      2d4
30    3d8+4
15   1d20+2
------------
47

It also supports plain formatting so you can pipe the output

$ workbench roll 2d4+3d8+4+1d20+2 --plain | cat
47

Note: Right now it does not support negative numbers for modifiers. That is tracked here.

Documentation

Overview

Copyright © 2023 Brad Dunn

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis
Package embedpkg provides access to the embedded scripts.
Package embedpkg provides access to the embedded scripts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL