1
0
Fork
You've already forked wheel
0
randomly select an item from a list of items with a console wheel
  • Go 97.8%
  • Makefile 2.2%
2026年05月15日 16:34:54 -05:00
doc Period 2026年05月14日 15:53:02 -05:00
examples Add 3s.conf 2026年05月15日 16:34:54 -05:00
src Initial commit 2026年05月14日 12:56:25 -05:00
CHANGELOG Initial commit 2026年05月14日 12:56:25 -05:00
go.mod Initial commit 2026年05月14日 12:56:25 -05:00
go.sum Initial commit 2026年05月14日 12:56:25 -05:00
LICENSE Initial commit 2026年05月14日 12:56:25 -05:00
Makefile Initial commit 2026年05月14日 12:56:25 -05:00
README.md Add gmake dependency 2026年05月14日 13:56:42 -05:00

wheel

wheel is a program written in Go that simulates a wheel in your console that can be used for randomly selecting items from a list of given values.

Building

wheel depends on the following to be built:

  • GNU make
  • go (>= 1.24.0)

wheel can then be built and installed by running the following commands:

make
make test
make install
make clean

Usage

wheel reads a list of items through a file given to it via input. A wheel file consists of lines of items optionally followed by the "weight" of said item (how likely should the wheel land on the item). Here is an example:

# Lines starting with '#' are comments and are ignored.
# So are blank lines.
Ryu
Ken
Sagat
# Manually specify a weight of 2 and 0.5
Sakura = 2
Dan = 0.5

In the above example, Ryu, Ken, and Sagat will be set to a default average weight, while Sakura and Dan will be 2 and 0.5 respectively.

With the -l option, wheel can just read lines from a input file as items for the wheel without regard for whether lines start with a hash or contain an equals sign.

When running wheel, you can navigate the items in the wheel with the <Up> and <Down> arrow keys and the <Space> bar to spin. The ? brings a help menu that you can consult at any time for help on the controls.

Copyright 2026, Samuel Young.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.