2021-06-27 23:20:37 -05:00
|
|
|
# Tiempo
|
|
|
|
|
2021-06-27 23:22:50 -05:00
|
|
|
A [timetrap](https://github.com/samg/timetrap/) compatible command line time
|
2022-09-18 21:54:56 -05:00
|
|
|
tracking application. [Read the fine manual](https://tiempo.categulario.xyz).
|
2021-06-27 23:20:37 -05:00
|
|
|
|
2021-08-14 18:47:58 -05:00
|
|
|
## Installation
|
|
|
|
|
2022-07-22 06:20:47 -05:00
|
|
|
### For Archlinux (and derivatives) users
|
|
|
|
|
|
|
|
There are a binary and a source package in the AUR:
|
|
|
|
|
|
|
|
* [tiempo-bin](https://aur.archlinux.org/packages/tiempo-bin)
|
|
|
|
* [tiempo-git](https://aur.archlinux.org/packages/tiempo-git)
|
|
|
|
|
|
|
|
### For every other linux users
|
|
|
|
|
|
|
|
Go to [gitlab releases page](https://gitlab.com/categulario/tiempo-rs/-/releases)
|
|
|
|
and grab the latest binary for your linux. There is a `.deb` file for Debian and
|
|
|
|
Ubuntu as well as a binary for any `x86_64` Linux.
|
|
|
|
|
|
|
|
### For Rust developers
|
|
|
|
|
|
|
|
You have `cargo`! you can run:
|
2021-08-14 18:47:58 -05:00
|
|
|
|
|
|
|
cargo install tiempo
|
|
|
|
|
2022-10-30 23:25:16 -06:00
|
|
|
However that will not install the beautiful man page. Although you can still see
|
|
|
|
it at https://tiempo.categulario.xyz .
|
|
|
|
|
2022-07-22 06:20:47 -05:00
|
|
|
### For everyone else
|
|
|
|
|
|
|
|
You need to compile `tiempo` by yourself. But don't worry! It is not that hard.
|
|
|
|
Just clone [the repository](https://gitlab.com/categulario/tiempo-rs), make sure
|
|
|
|
you have [rust installed](https://rustup.rs) and run:
|
|
|
|
|
|
|
|
cargo build --release
|
|
|
|
|
|
|
|
inside the repository. The binary will be named `t` (or `t.exe` if you use
|
|
|
|
windows) and it is located inside the `target/release` directory that was
|
|
|
|
created during compilation.
|
2021-08-14 18:47:58 -05:00
|
|
|
|
2021-07-03 16:44:31 -05:00
|
|
|
## How to build
|
2021-06-27 23:20:37 -05:00
|
|
|
|
|
|
|
You need [rust](https://rustup.rs), then clone the repo and simply run
|
|
|
|
|
|
|
|
cargo test
|
|
|
|
|
|
|
|
to check that everything is working, and then
|
|
|
|
|
|
|
|
cargo build --release
|
|
|
|
|
2021-07-03 16:44:31 -05:00
|
|
|
to have a binary at `target/release/t` that you can then move to a
|
|
|
|
directory in your `PATH` or use it by its absoulte or relative paths.
|
2021-06-27 23:20:37 -05:00
|
|
|
|
|
|
|
Run
|
|
|
|
|
2021-07-03 16:44:31 -05:00
|
|
|
t --help
|
2021-06-27 23:20:37 -05:00
|
|
|
|
|
|
|
to see the options.
|
2021-07-21 19:07:05 -05:00
|
|
|
|
2021-08-11 20:25:21 -05:00
|
|
|
### Development database
|
|
|
|
|
|
|
|
When developing I prefer not to mess with my own database, so I use this `.env`
|
|
|
|
file:
|
|
|
|
|
|
|
|
export TIMETRAP_CONFIG_FILE=/absolute/path/to/repo/dev_config.toml
|
|
|
|
PS1="$ "
|
|
|
|
|
|
|
|
and when I want to test some commands against such config file I just source it:
|
|
|
|
|
|
|
|
source .env
|
|
|
|
cargo run -- in 'hola'
|
|
|
|
|
2021-10-26 20:29:18 -05:00
|
|
|
### Documentation
|
|
|
|
|
2022-09-27 20:42:19 -05:00
|
|
|
The docs are written using [sphinx](https://www.sphinx-doc.org/en/master/). To
|
|
|
|
install the required dependencies enter the `docs` directory and create a virual
|
|
|
|
environment:
|
2021-10-26 20:29:18 -05:00
|
|
|
|
2022-09-27 20:42:19 -05:00
|
|
|
virtualenv .venv
|
2021-10-26 20:29:18 -05:00
|
|
|
|
2022-09-27 20:42:19 -05:00
|
|
|
then activate it and install the dependencies:
|
|
|
|
|
|
|
|
source .venv/bin/activate
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
|
|
|
To build the docs just do:
|
2021-10-26 20:29:18 -05:00
|
|
|
|
|
|
|
make html
|
|
|
|
|
2022-09-18 21:54:56 -05:00
|
|
|
for the html version (output located at `docs/build/html`), or
|
2021-10-26 20:29:18 -05:00
|
|
|
|
|
|
|
make man
|
|
|
|
|
2022-09-20 09:52:42 -05:00
|
|
|
for the man page (output located at `docs/build/man/tiempo.1`). To test the man
|
|
|
|
page you can do:
|
|
|
|
|
2022-09-27 20:42:19 -05:00
|
|
|
man -l build/man/tiempo.1
|
|
|
|
|
|
|
|
To get a live-reloaded server with the html docs do:
|
2022-09-20 09:52:42 -05:00
|
|
|
|
2022-10-28 18:50:28 -05:00
|
|
|
sphinx-autobuild source/ build/html/
|
2021-10-26 20:29:18 -05:00
|
|
|
|
2022-09-27 20:42:19 -05:00
|
|
|
The contents of the man page are located in `docs/source/index.rst`,
|
2021-10-26 20:32:59 -05:00
|
|
|
formatted as
|
|
|
|
[reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html).
|
|
|
|
|
2021-07-21 19:07:05 -05:00
|
|
|
## Special Thanks
|
|
|
|
|
2021-10-26 20:29:18 -05:00
|
|
|
To [timetrap](https://github.com/samg/timetrap) for existing, to
|
|
|
|
[samg](https://github.com/samg) for creating it. It is the tool I was looking
|
|
|
|
for and whose design I took as reference, keeping compatibility when possible.
|
2022-08-03 08:53:52 -05:00
|
|
|
|
|
|
|
## Release checklist
|
|
|
|
|
|
|
|
(mostly to remind myself)
|
|
|
|
|
|
|
|
* [ ] Ensure tests pass and that clippy doesn't complain
|
2022-09-18 21:54:56 -05:00
|
|
|
* [ ] Add documentation about the new features
|
2022-08-31 07:19:16 -05:00
|
|
|
* [ ] Create an entry in `CHANGELOG.md` with the target version, stage it but
|
|
|
|
don't commit
|
2022-08-03 08:53:52 -05:00
|
|
|
* [ ] run `vbump`
|
2022-10-31 00:21:47 -06:00
|
|
|
* [ ] git push && git push --tags && cargo publish
|
|
|
|
* [ ] wait for release and then test the releases (aur bin and git and
|
|
|
|
packaged).
|