RustyBeer is a CLI tool / web server written in Rust, to calculate values used in the process of brewing beer.
Live server running at https://rustybeer.herokuapp.com/
If you donβt already have the toolset installed, you will first need to install Rust. From the root of the repository, run the following command:
cargo build
You can now run the CLI tool with:
cargo run --bin rustybeer <subcommand>
To start the server:
cargo run --bin rustybeer-server
You can access the OpenAPI UI from http://localhost:3000/docs. To change the port number, you can define environment variable PORT.
Tests can be ran by calling:
cargo test
If you would like to run only one test, you can do this by specifying the test name:
cargo test -- --nocapture <test name>
Beer brewing has a lot of acronyms that have a meaning. This table is to help out with figuring out what everything means:
Acronum | Description |
---|---|
ABV | Alcohol By Volume |
ABW | Alcohol By Weight |
OG | Original Gravity |
FG | Final Gravity |
SG | Specific Gravity |
IBU | International Bittering Units |
Below is a table of the features currently implemented.
Implemented | Function | Description | Usage |
---|---|---|---|
:white_check_mark: | ABV | Calculates ABV from OG and FG or FG from OG and ABV | abv --og <Original gravity> (--fg <Final gravity>) (--abv <Alcohol by volume>) |
:white_check_mark: | ABV <-> ABW | Calculates alcohol by weight (ABW) from alcohol by volume (ABV) | abv_abw --percent <alcohol percentage> (--total_volume <total beer volume>) (--total_density <density of beer in g/cmΒ³) (--reverse) |
:white_check_mark: | Beer style | Finds beer styles matching given parameters | beer_style (--og <Original gravity>) (--fg <Final gravity>) (--abv <Alcohol by volume>) (--ibu <International bittering units> (--color <SRM color>) |
:hourglass_flowing_sand: | Boil-off Gravity | Calculates the volume needed to be boiled down to for a desired SG | boil_off --current_gravity <current_gravity> --wort_volume <wort_volume> <--target_volume <target_volume>|--desired_gravity <desired_gravity>> |
:white_check_mark: | Calories | Calculates calories by volume from OG and FG or from ABV | calories (--og <Original gravity>) (--fg <Final gravity>) (--abv <Alcohol by volume>) (--volume <Beer volume>) |
:white_check_mark: | Dilution | Calculates the SG after dilution | diluting --sg <Current specific gravity> --cv <Current volume> --tv <Target volume> |
:white_check_mark: | FG | Calculates FG from OG and yeast attenuation | fg --og <Original gravity> --att <Yeast attenuation> |
:white_check_mark: | Num Of Bottles | Calculates the number of bottles required for a given volume | num_of_bottles --volume <volume> |
:white_check_mark: | Priming | Beer Priming Calculator | priming --temp <Beer temperature> --amount <Beer volume> --co2_volumes <co2_volumes> |
:white_check_mark: | SG Correction | Corrects SG reading for differences between measurement and calibration temperatures | sg_correction --sg <Specific gravity reading> --ct <Calibration temperature> --mt <Measurement temperature> |
:white_check_mark: | Yeast Viability | Estimates yeast viability based off production date | yeast-viability --pd <Production date> --cc <Cell count> --f <Date format> |
This list will expand as ideas and suggestions come in.
See Issues
Thanks goes to these wonderful people (emoji key):
drodil π» |
mlatief π» |
Joseph Russell π» |
flauntingspade4 π» |
Ilakkiyan Jeyakumar π» |
Tom Milligan π» |
Roger Y π» |
Sampsa Sarjanoja π» |
Philip Golovin π» |
See CONTRIBUTING.md