A digital terminal clock
To run the clock, go to the folder where lambda-clock.py
is located and type python lambda-clock.py
into the terminal.
You can also do python lambda-clock.py -h
to list the all command line arguments.
Command line argument: -m
or --format
The format of the clock.
- m (Hour:Minute)
- s (Hour:Minute:Second) (Default)
- ms (Hour:Minute:Second:Microsecond)
- ds (Day:Month:Year Hour:Minute:Second)
Command line argument: -p
or --position
Position of the clock.
You can choose one of the 9 positions: 1 to 9.
Think of it as a grid starts from the top left corner and ends at the bottom right corner.
Default position is 5.
1 2 3
4 5 6
7 8 9
Command line argument: -c
or --coloring
How to color the clock.
- Default
- Gradient (Default)
Command line argument: -s
or --spacing
The character that fills the space between characters in the clock.
Default character is empty
You can choose one of the character in the fonts.
Command line argument: -e
or --echar
The empty cell character.
Default character is empty
You can choose one of the character in the fonts.
Command line argument: -f
or --fchar
The non-empty cell character.
Default character is full-block
You can choose one of the character in the fonts.
Command line argument: --gstyle
Style of the gradient.
Applied only if coloring option is selected as gradient.
- horizontal (Default)
- vertical
- diagonal
- reverse-diagonal
For gradient HSV is used and program needs start and spread values for both hue (H) and saturation (S).
Accepts only floats between 0.0 and 1.0 (both included)
Note: value (V) is constant and equal to 1.
For example, if start value of hue is 0.0 and spread is 0.5, the hue of gradient starts from 0.0 and ends at 0.0 + 0.5 = 0.5. It is same for saturation.
Command line argument: --hstart
Start value of hue.
Default value is 0.0
Command line argument: --hspread
Spread value of hue.
Default value is 0.1
Command line argument: --sstart
Start value of saturation.
Default value is 1.0
Command line argument: --sspread
Spread value of saturation.
Default value is 0.0