exclock is a cui extended timer.
Project description
exclock is a cui extended timer.
Required
vlc
xmessage
Usage
$ exclock [options] {clock-filename}
Features
Sound an alarm at a specified time.
Sound the alarm after the specified time has elapsed.
You can flexibly set the alarm.
Options
–version: show program’s version number and exit
-h, –help: show this help message and exit
-l, –list: show clock names in your PC and exit
-t, –time: Time which spends until or to specified
-r, –ring-filename: Sound-filename which used for ringing with -t, –time option. Note that you can use EXCLOCK_RING_FILENAME system variable if you often indicate ring-filename option.
–trace, –traceback: show traceback
How to sound an alarm at a specified time
Enter
$ exclock -t {time}
format command.
Where time is given in the %H:%m or %H:%m:%S format.
Ex.
$ exclock -t "1:00" $ exclock -t "1:00:20"
How to sound the alarm after the specified time has elapsed
Enter
$ exclock -t {time}
format command.
Where time is given in the %S, %Ss, %mm or %mm%ss.
Ex.
$ exclock -t 3 $ exclock -t 3s $ exclock -t 2m $ exclock -t 2m3s
How to flexibly set the alarm
Enter
$ exclock {clock-filename}
format command. Although {clock-filename} can be omitted as descrived below.
clock-file should be a file in json5 format.
Official page for json5 format is Here.
clock file format
{ "title": "title(optional)", "sounds": { "time1": { "message": "message1", "sound_filename": "sound_filename1", }, "time2":{ "message": "message2", "sound_filename": "sound_filename2", }, ... }, "loop": loop_number }
title: string which be used for notification. This is the optional option. Then the property is computed from clock-filename.
sounds: dictionary from time to dictionary which includes message and sound_filename.
time format is “{sec}”, “{sec}s”, “{min}m” or “{min}m{sec}s” format.
message is a string which be used for notification and terminal output.
sound_filename is a string which be used for play the sound.
loop: number of iterations for above clock timer. If this is nil, this means repeatation a number of times.
There are sample files in sample dir in gitlab.
How to omit clock filename
Clock filename can be omitted for some case.
Rules are
If extension of clock filename is .json5, extension can be omitted(ex: pomodoro.json5 => pomodoro).
If dir is in the specified directory(~/.exclock/clock/ or environment variable EXCLOCK_CLOCK_DIR), dir is omitted (ex: ~/.exclock/clock/abc.json5 => abc).
Buitin clock file can be accessed. There are in sample dir in gitlab (ex: 3m or pomodoro).
How to omit sound filename
Sound filename can be omitted for some case.
Rules are
If dir is in the specified directory(~/.exclock/sound/ or environment variable EXCLOCK_SOUND_DIR), dir is omitted (ex: ~/.exclock/sound/abc.mp3 => abc.mp3).
Buitin sound file can be accessed. There are in sample sound dir in gitlab (ex: silent.mp3 or warning.mp3).
LICENSE
Todo
[x] 環境にあるclock一覧を表示するコマンドを追加
Exception対応
[x] ‘Error: No available formula with the name “vlc“‘対応
[x] xmessageがない場合のエラー処理
[x] 指定された時間になったらタイマーを発火させるコマンドを追加
[x] 0病後にSoundが指定されていた場合 そのSoundのとき tqdmを使わない
[x] プログレスバーの出力をいい感じにする
[-] Add n variable
[x] secの変数名を_secというようにする
[x] KeyboardInteraptのエラー処理を書く
[x] 🐛 二つ同じ名前がなくても一つしか表示されないようにする
[x] 🎨 main関数のテストを追加
[-] is_bgm flag
[ ] poetry導入
[x] confirm_fの削除
[ ] loopのデフォルト値を1にする
[-] –debug optionを付ける
[x] warningの音を設定できるような項目を追加する
[x] CLOCK_DIR_IN_SYSを指定できるような環境変数を定義する
[x] SOUND_DIR_IN_SYSを指定できるような環境変数を定義する
[x] setup.pyでPipenvのpackagesを使うようにする
[x] 真面目にdocumentを書く
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file exclock-0.1.16.tar.gz
.
File metadata
- Download URL: exclock-0.1.16.tar.gz
- Upload date:
- Size: 70.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.7.0 Darwin/19.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f608d7d39ce195e803560a9ce862be06d096c7469870f057953f8152e0043648 |
|
MD5 | 73fb678cc620a7fa1e42834136e8b2ce |
|
BLAKE2b-256 | ef00652353775e0c161daedb905d6c4ee7e0745a7a72b92ad6da56baa0d76778 |
File details
Details for the file exclock-0.1.16-py3-none-any.whl
.
File metadata
- Download URL: exclock-0.1.16-py3-none-any.whl
- Upload date:
- Size: 68.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.7.0 Darwin/19.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0311189562e7bd422baac8547fb3f619fb8d90b452642be56f05f03834a5736a |
|
MD5 | 5891cd3b8c0efadcbaa84b502b1eeb9b |
|
BLAKE2b-256 | 6ffc1072adbe578cf6e528ddc2b086ea01492d089a12bf8846494e1ae37fb900 |