usage-tracker

Crates.iousage-tracker
lib.rsusage-tracker
version0.3.2
sourcesrc
created_at2020-03-26 18:53:01.938563
updated_at2022-06-08 00:48:38.454348
descriptionA simple usage tracker in rust.
homepagehttps://github.com/TeFiLeDo/usage-tracker
repositoryhttps://github.com/TeFiLeDo/usage-tracker
max_upload_size
id223206
size47,296
Adrian Wannenmacher (TeFiLeDo)

documentation

https://docs.rs/usage-tracker

README

Usage Tracker version license Read the docs GitHub Workflow Status GitHub Last Commit

A simple usage tracker CLI written in rust. Also provides JSON output and a rust library to easily access the data.

What is this?

usage-tracker is a simple program that allows you to keep track of your usage of objects.

For example, if you want to keep track of how much milk you drink, you'd tell the program to keep track of a new object that you call "milk". After that, whenever you've emptied a can of milk, you tell the program to record a new usage. Later you can access a list of all times when you emptied a can of milk.

usage-tracker also provides the functionality to calculate an estimate of how much cans of milk you'll need in a certain amount of time. Please note that these estimates are estimates. In most cases the accuracy will increase with the amount of data and the time since the usage first record.

How to use?

In this section you'll learn how to enact the example from the previous section.

First of all, we need to tell usage-tracker to keep track of cans of milk:

$ usage-tracker add milk

Now we want to tell the program that we've emptied a can of milk:

$ usage-tracker use milk

After that, we want to see a list of all times we've emptied a can of milk:

$ usage-tracker show milk

Finally, we want to stop keeping track of milk:

$ usage-tracker remove milk

Command reference

For further information, you can use the integrated help of the CLI:

$ usage-tracker help
$ usage-tracker -h
  # These commands will provide you with a brief help message.

$ usage-tracker --help
  # This command will provide you with a longer, more detailed help message.

How to install?

If you have cargo installed (which probably means your a rust developer), just type this:

$ cargo install usage-tracker

Otherwise you can go to the releases page and grab the application for your platform from the latest release. Make sure to grab the version for the correct platform.

Details

In the prediction functionality, the existence of leap years is ignored. Also all months are treated as 30 days long. This is necessary to keep the interface for users simple. Otherwise they would be required to specify when the usage starts, which would be a worse user experience.

How to build from source?

You will need to set up a rust development environment. After that, clone or download the repository. Go into its root folder and run this command:

$ cargo build
Commit count: 61

cargo fmt