Skip to main content

my clock

Project description

version: 0.2.2

MyClock is a simple and “programmable” clock program.

Build Status

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

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: “MyClock”

  • -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

  • –terminal_notify_options TERMINAL_NOTIFY_OPTIONS: options of terminal 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"]
  }
}

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: “MyClock”

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: inner-program sound

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: inner-program sound

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.

Terminal_notify_options Option

Corresponding option: –terminal_notify_options type: str default: “”

You can define terminal_notify_options option by using configure file. This value is given for options of terminal-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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my_clock-0.2.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

my_clock-0.2.2-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file my_clock-0.2.2.tar.gz.

File metadata

  • Download URL: my_clock-0.2.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for my_clock-0.2.2.tar.gz
Algorithm Hash digest
SHA256 eecbff9ba1e61e977bfbf91d5a83dcad0d5038cea191b1cc34d9d9ac36153a68
MD5 12351695bf2f431535dadf7e989e6980
BLAKE2b-256 dd89440f91e8a85270a1fcd5571bd715cadfa70694cacf13e4e6972083726974

See more details on using hashes here.

File details

Details for the file my_clock-0.2.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for my_clock-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e77b023cc85a7a4aa79e125aed7121a42c6688b91b8939276c99c0ed11239a75
MD5 145a3b845c130aaaf711624a0a004545
BLAKE2b-256 56bfdf7b966cf649ce7e04733b20e4fee9bf886e03f57f89209aed304437b6c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page