hardliner66 / timetracking

Apache License 2.0
30 stars 5 forks source link

Creating a tui out of it #14

Closed simonsan closed 7 months ago

simonsan commented 3 years ago

There is a nice template here https://github.com/orhun/rust-tui-template to create a TUI application. I think timetracking could profit from it if started from a subcommend to show e.g. a small calendar when you worked how much tt ui calendar while still keeping the base parameters.

An overview of the available widgets you could find here: https://docs.rs/tui/0.16.0/tui/widgets/index.html

hardliner66 commented 2 years ago

Sorry, I completely forgot to respond.

I'm not sure including an UI is the way forward. It might be better to make an UI which just uses the binary in the background and make the binary provide good machine readable data. This way you can make a GUI, TUI, webserver, etc. while still using the same binary.

Alternatively we could split the tool into a library and a CLI part. This way other projects could more directly interact with the internal data structures.

simonsan commented 2 years ago

Alternatively we could split the tool into a library and a CLI part. This way other projects could more directly interact with the internal data structures.

I think this would be the way (also regarding: https://doc.rust-lang.org/book/ch12-03-improving-error-handling-and-modularity.html#separation-of-concerns-for-binary-projects )

I like the idea to be able to pull in timetracking as a library and then maybe even have a web-frontend using it. Sounds like a good one.

hardliner66 commented 2 years ago

I'm not sure how much time (pun not intended) i can currently invest into this project. But if you want, you send in a pull request and I'll take the time to review it.