24seconds / rust-cli-pomodoro Goto Github PK
View Code? Open in Web Editor NEWPomodoro cli app. Manage your time using this
Home Page: https://crates.io/crates/rust-cli-pomodoro
License: MIT License
Pomodoro cli app. Manage your time using this
Home Page: https://crates.io/crates/rust-cli-pomodoro
License: MIT License
https://github.com/mozilla/sccache seems good to apply. I didn't understand sccache
fully but looks good
This bug is easy to reproduce. When starting pomodoro in one terminal tab and send command with another terminal tab, then pomodoro app can not handle and returns error
terminalA
terminalA
terminalA
terminalB
. Typed pomodoro history
Maybe pomodoro app should stream the output and keep the buffer space usage as low as possible.
Thanks to many people, I guess it's okay to support brew
installation. Other installation channel suggestions are welcome.
title explains itself
When the pomodoro is running, sometimes user may(?) want to know what was the configuration.
To solve this curiosity, it would be nice to provide this
# IPC mode
> pomodoro config list
# standalone mode
> config list
# expected output sample
[2023-03-28T11:56:07Z INFO pomodoro::configuration]
config flag result!
┌────┬─────────────────────┬───────────────────────────────────┐
│ ok │ desc │ reason │
├────┼─────────────────────┼───────────────────────────────────┤
│ O │ no config err │ │
├────┼─────────────────────┼───────────────────────────────────┤
│ X │ slack_channel │ can not find slack config in json │
├────┼─────────────────────┼───────────────────────────────────┤
│ X │ slack_token │ can not find slack config in json │
├────┼─────────────────────┼───────────────────────────────────┤
│ O │ discord_webhook_url │ │
└────┴─────────────────────┴───────────────────────────────────┘
Thanks again @panarch . When initializing the pomodoro app, currently user doesn't know which configuration is successfully applied. I think it's not user friendly. So let's fix this
While using the app, I found that sometimes I need to finish pomodoro timer early. In that case, I want to record how much did I spend - 70%, 50% for example. Let's make this option
This is adding new column named percentage
support safe delete
Current clap version is 3.1.6 (as of 2022 Mar 14th). If it's worth to upgrade the clap version, let's do it
I found that sometimes discord notification is needed.
Let's implement it. It's quite simple
credential.json format would look like this
{
"discord": {
"webhook_url": "your webhook url"
}
}
After implementation, don't forget to update README.md
repo: https://github.com/kkawakam/rustyline
While viewing other repo's code, I found this crate. This is really useful for many cases. Let's use this!
I doin't know this feature is useful or not. But it's worth to discuss the app structure if it needs to implement
Recently work_time_default_value
and break_time_default_value
configurations are added. Therefore, the config report should reflect it.
work_time_default_value
is not given, then 'ok' would be x
and the reason would be not specified
work_time_default_value
is given, then 'ok' would be o
and the reason would be emptybreak_time_default_value
Thanks to @adrianEffe , history clear
feature is released. (#175, https://github.com/24seconds/rust-cli-pomodoro/releases/tag/v1.4.0).
There are two modes in rust-cli-pomodoro
. Standalone mode and IPC mode.
History clear
is supported in Standalone mode while is not supported IPC mode yet.
It would be nice to support it in IPC mode.
Similar PR is #178
Hi. I am new Rust developer. Now i want to improve my skill by contribute open-source project
writing release is sometimes boring. Let's apply this if it is useful
Currently this pomodoro app is hard to use for other people.
To make app more like app, there are somethings to do.
Currently rust-cli-pomodoro
app forces desktop notification
and sound
(as I remember..).
But sometimes it could be annoying to other people. Therefore, it would be nice to if we gave knob to user about
What dynamically means user can turn it on/off whenever they want while the app is running.
Any configuration which can be controlled dynamically suggestions are welcome
Currently description
column is not used. It just shows default string, sample
. See the image below.
I found that this could be useful if it accepts user input. If the user can type description
on their own, then the user can see the more information in history
.
Because the result of list
table is quite fat (there are many columns), I don't think it's good idea to extend description
column. For example, if the description
string length is more than 50 (50 is just a sample number. There is no meaning), then the table would be more uglier than now. So we should find a proper way of
Maybe --description
or --desc
should be introduced. For example, we can create a notification like this.
> pomodoro create --default --desc "finish writing README.md"
I have no idea..
--config
option if it is changed too often.description
.When I use the git command, git supports auto complete. For example, I typed git sta
and pressed tab
then git showed suggestions. I can select one of suggestions with arrow keys (up/down) and tab and enter.
It would be nice for pomodoro to support this feature also
Usually rust-cli-pomodoro works as follow
I found that whenever I need to write command, it's quite cumbersome.
I need to find the executing terminal then write command.
How can we improve this? There might be several options.
rust-cli-pomodoro
as a server and listen to the specific port (TCP or Unix)Currently clap
version is low. It's good to upgrade it to latest one.
Hi!
First of all, emphasize that I have seen the project and it fits exactly in my needs (to have an offline tool to manage pomodoro times), and I want to contribute to the project.
I've been looking at the code for a while and I can't understand why are you using oneshot::channel for communicating between the different threads. Couldn't the first tokio::spawn thread delegate the function to display the type of error/action to the thread that analyzes the user input? With this form we wouldn't need the tokyo::sync::oneshot channel, (element that has made my reading of the code a little bit more difficult).
Finally, why is this project using the tokio library instead of the standard thread api from rust? From what I have seen I would say that all the added functionalities can be done (without much more complication) with the standard library. Emphasize that in case you say that the tokio library is not really necessary, I could contribute to port the current code to a new one that uses the standard thread library.
Thanks in advance and that said, I will try to contribute when I can, although it has to be said that I am relatively new to rust 😅
rust-cli-pomodoro/src/notification/mod.rs
Line 464 in c8d2565
This code can be rewritten as table driven test case form. For the readability, I think it would be nice to write this test case as table driven form.
while preparing the release, I found that macOS compiles notify_terminal_notifier
function.
And inside this function, it's calling terminal-notifier.
So macOS user should install this binary to avoid error currently.
To avoid this inefficiency, let's handle the case where macOS user didn't install it
Usually terminal supports thie feature: when I entered arrow up key
, then the terminal automatically shows previous command.
Maybe it would be nice to implement this feature in pomodoro cli
As GlueSQL supports ast builder, it would be nice to use it. Check the gluesql v0.12.0
Currently it supports
Queue
command is to queue the notification.
For example, if there is several notifications in the Notification
table,
Queue
would create notification
started at right after the last notification in Notification
table expired.
I found that pomodoro delete -i 3
didn't work (IPC).
But that command works in standard input.
Let's fix it
It's different from #14 . This feature is to show the notification history.
Currently, once the notification is consumed, it is deleted in the memory.
Recently I felt like notification history is really needed. So it's good to keep notification history in the memory.
Maybe new table, archived_notifications
are needed to do this.
While using the history, I found that staled notification is not that important. So I guess it's okay to delete them.
Let's support clearing feature.
As of now clearing all or nothing is enough to cover my needs, providing flag --clear
or --c
would be okay.
main.rs is lenghty. Refactor it so that reader can focus on what they really want.
Previously in the version 1.3.4 rust-cli-pomodoro
, d -a
command works. It deletes all notifications in the queue.
But main branch version rust-cli-pomodoro
can not handle this command. Let's fix it.
To prevent this case, it would be nice to write down test case for this.
sometimes I want to check when did I run the command without typing the command.
This is current stdout message.
As-is
❯ pmdr q -b 5
Notification (id: 67) created and queued
Let's add timestamp like this.
To-be
❯ pmdr q -b 5
[2023-01-22 14:12] Notification (id: 67) created and queued
While using it, I found that I wanted to make ipc command but I sometimes typed pmdr
by mistake. Then what it happened is running pomodoro's ipc socket is closed. (Because newly running pomodoro app - by pmdr
command - deleted existing file..)
To prevent this, let's run pomodoro app with certain option if user wants IPC feature.
Maybe --ipc
flag would be enough?
I've using this app and found that maybe it's good to show the usage statistics.
To do that, logging the command should be done first
github's auto generated release note is good. But it could be better.
Gluesql uses this github action. https://github.com/gluesql/gluesql/blob/main/.github/release-drafter-config.yml.
Maybe rust-cli-pomodoro
can utilize labels also.
While using this app, I think it could be more powerful if it supports history tracking.
For example, week or day analysis can be possible. And visualizing the history can give some insight to me.
Maybe the simple storage for this purpose would be firestore I guess.
Sometime, it's good to look back. I guess gantt chart form is good to view and might give some insights to users.
Or any other statistic report form suggestions are welcome.
Sometimes socket doesn't work as expected. In that case timeout is necessary to proceed the program execution. Let's implement it
Currently, sending notifications are done by one by one. So it took some time to get notification.
To reduce the latency a bit, let's make sending notifications concurrently.
Maybe adding rust-toolchain
file can force this project's rust version?
Example: https://github.com/gluesql/gluesql/blob/72d4b8b17c05d445eeb782b2eb45ac8970845821/rust-toolchain#L1
If so, then it's good to add it here also. Maybe latest rust version would be nice.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.