Skip to content

okm-8/pmt-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PMT

PMT is a project for fun. This tool use math to make some fun things. For example, you can use this tool to make a decision what to eat today.

Requirements

  • Rust

How to use

Install

https://www.rust-lang.org/tools/install

make release

This command will generate a binary file in the bin directory.

Run

./bin/pmt <command> <args>

Help

./bin/pmt help
./bin/pmt --help
./bin/pmt -h
./bin/pmt help <command>
./bin/pmt <command> --help
./bin/pmt <command> -h

You can get help information for any command.

Command

Choose number

./bin/pmt choose number \
  --rolls <rolls> \           # how many times to roll the dice for each number
  --count <count> \           # how many numbers to get in the end
  --precision <precision> \   # how many decimal places to keep (be careful, it may cause performance issue)
  --unique \                  # if the numbers should be unique
  --sort \                    # if the numbers should be sorted
  {}

Choose value

./bin/pmt choose variant \
    --rolls <rolls> \         # how many times to roll the dice for each value
    --count <count> \         # how many values to get in the end
    --unique \                # if the values should be unique
    --sort \                  # if the values should be sorted
    <value1> <value2> ...     # values to choose from

you also can use $(cat ) to input values from a file.

./bin/pmt choose variant \
    --rolls <rolls> \         # how many times to roll the dice for each value
    --count <count> \         # how many values to get in the end
    $(cat <file>)

or even keep in file the full configuration

--rolls <rolls>  # how many times to roll the dice for each value
--count <count>  # how many values to get in the end
# values to choose from
VALUE1 
VALUE2 
...         
./bin/pmt choose variant $(cat <file>)

Math

./bin/pmt math ...

It also contains some math functions, like different mean (arithmetic, geometric, ...), median, mode, variance, standard deviation, etc. They are being added by the mood.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published