Frederick W. Taylor was a bastard, but it is helpful to keep track of the amount of time you spend on an activity if you're doing it for your own benefit. timestudy
is here to help you in this endeavor.
timestudy
intends to be an activity tracker similar to Timewarrior. It is mostly a project to help me expand my Rust skills, so you probably actually want Timewarrior, not this. (There are far fewer features at the moment, and probably far more bugs.) But perhaps someday it will be a decent alternative. I'm currently building both a CLI and a GUI that use this library.
Features, enhancements, bugs, questions, and similar are tracked in issues. These are then distilled into milestones. I intend to regularly update the next two milestones as a way to think about and plan the next immediate things to do.
The test_utils
module provides some useful functions for testing. However, in order to use them outside unit tests - that is, either in the integration tests in this library or by another user of the library - the test-utils
feature must be used so that a temporary directory and file are used rather than the actual file in the user's data directory where activities are stored. Using the functions in test-utils
without enabling the feature could result in the loss of your activity data.
Integration tests handle this by using the attribute #![cfg(feature = "test-utils")]
at the beginning of each file, while users of the library should include the feature in their Cargo.toml file: timestudy = {version = "0.7", features = ["test-utils"] }
. Note that you may need to change the version number, that was simply the version at the time of writing.
For this library, since the integration tests are marked as requiring the test-utils
feature, tests must be run with cargo test --features test-utils
in order for them to be included.