version: 0.2.5
MyClock is a simple and “programmable” clock program.
Usage
my_clock [options] [times]
where [times] is a list of syntax of {num}s, {num}m, {num}h or {num}.
MyClock program spends 60 * 60 * h + 60 * m + s times and notice by popup or music.
How to install
% pip install my_clock
or
% python setup.py install
at root directory of this project.
Requirements
growlnotify
Options
–version: show program’s version number and exit
-h, –help: show this help message and exit
-V, –verbose: verbose
-g MESSAGE, –message=MESSAGE: set message string default: “<sleep_time_min> seconds is spent.”
-t TITLE, –title=TITLE: set title string. default: “MyClock”
-o, –log: out log to stdout
-r, –ring-bell: ring bell or not after timer
-b BELL_SOUND, –bell-sound BELL_SOUND: mp3 file of bell_sound
–bgm, –play-bgm: play bgm
–bgm-sound BGM_FILENAME: bgm music
–growl_notify_options GROWL_NOTIFY_OPTIONS: options of growl notify
–hide-popup: don’t show popup
–force-to-use-task: force to use task
-s, –show: show options and exit
-T TASK, –task=TASK: set task string default: “default”
-f {filename}, –conf-file {filename}: set configure filename string default: “~/.clock.json”
-l, –list: show task names
About Configure File
You can define configure in configure file for json5 format. Default configure file path is ~/.clock.json. You can change configure file path by –conf-file option.
For example,
{
"default": {
"title": "MyTitle",
"message": "MyMessage",
"time": ["3s"]
},
"pomodoro-job": {
"title": "Pomodoro Job",
"message": "finished",
"time": ["25m"]
},
"pomodoro-rest": {
"title": "Pomodoro Rest",
"message": "Rest is finished",
"time": ["5m"]
}
}
You can embed value of following options in message, title, bgm_filename or bell_sound options as syntax <{opt_name}>:
sleep_time_sec
sleep_time_min
sleep_time_hour
title
message
bgm_filename
bell_sound
Verbose option
Corresponding option: -V, –verbose type: bool default: false
You can define verbose option by using configure file.
If value of this options is true, this program show all options, running commands and begin / finished task name.
Message Option
Corresponding option: -g, –message type: str default: “<sleep_time_sec> seconds is spent.”
You can define message option by using configure file.
This value is given for message value of termina-notify.
Title Option
Corresponding option: -t, –title type: str default: “MyClock”
You can define title option by using configure file.
This value is given for title value of termina-notify.
Ring_bell Option
Corresponding option: -r, –ring-bell type: bool default: false
You can define ring_bell option by using configure file. If value of this option is true, when finishing to spend time, play sound.
Bell_sound Option
Corresponding option:—bgm-sound type: str default: None
Playing sound when this program is finished.
Play_bgm Option
Corresponding option:–bgm, play-bgm type: bool default: false
You can define ring_bell option by using configure file. If value of this option is true, while this program spend time, this play music.
Bgm_filename Option
Corresponding option: bgm-sound type: str default: None
You can define bgm_filename option by using configure file. Playing sound when this program is speinding time.
Out_log Option
Corresponding option: -o, –log type: bool default: false
You can define ring_bell option by using configure file. When this option is true, show progress bar when this program spends time.
Growl_notify_options Option
Corresponding option: –growl_notify_options type: str default: “”
You can define growl_notify_options option by using configure file. This value is given for options of growl-notify.
Force_to_use_task Option
Corresponding option: –force-to-use-task type: bool default: false
You can define force_to_use_task option by using configure file. If this value is True and task name is not defined, raise Error.
Time Option
type: [int, int{s}, int{m}, int{h}] default: []
You can define time option by using configure file. Each values of this option is working like as stdin.
Hide Option
You can define hide option which like as _ task. For example,
When this program spent time, hide options is loaded.
Of course, you can “overwrite” usual configure options or stdin. For example,
{
"_": {
"verbose": true,
"out_log": true,
"title": "Hide Title",
"message": "Hide Message"
},
"sample": {
"title": "sample title",
"message": "sample message",
"time": ["2s"]
}
}
LICENSE
MIT
Metadata
Release files for my_clock 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| my_clock-0.2.5.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| my_clock-0.2.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 17.2 kB
Release files / my_clock-0.2.5.tar.gz
| Download URL | my_clock-0.2.5.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
605ef71c22cc317aca8d5d791a32a6e2c228b370f9723683eae38e5e0d290773
|
|
BLAKE2b-256 checksum How to use checksums |
5b7cc75cf8bbe1cc747f66aa0bf8850e11cd7585927c4025583eaee67f467c94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / my_clock-0.2.5-py2.py3-none-any.whl
| Download URL | my_clock-0.2.5-py2.py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c699be7510df64d03e1e7a030fffa58a5883b0c727aacdef2f159aaecf6d28c0
|
|
BLAKE2b-256 checksum How to use checksums |
4a156f6b44ba660e575fd01b15a94be3030df532a23abf2d7c68c7bf3c1efc30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |