clox 0.2__py3-none-any.whl → 0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of clox might be problematic. Click here for more details.
- clox/functions.py +24 -9
- clox/params.py +5 -3
- clox-0.3.dist-info/AUTHORS.md +11 -0
- {clox-0.2.dist-info → clox-0.3.dist-info}/METADATA +34 -6
- clox-0.3.dist-info/RECORD +11 -0
- {clox-0.2.dist-info → clox-0.3.dist-info}/WHEEL +1 -1
- clox-0.2.dist-info/AUTHORS.md +0 -6
- clox-0.2.dist-info/RECORD +0 -11
- {clox-0.2.dist-info → clox-0.3.dist-info}/LICENSE +0 -0
- {clox-0.2.dist-info → clox-0.3.dist-info}/entry_points.txt +0 -0
- {clox-0.2.dist-info → clox-0.3.dist-info}/top_level.txt +0 -0
clox/functions.py
CHANGED
|
@@ -8,10 +8,11 @@ import datetime
|
|
|
8
8
|
import argparse
|
|
9
9
|
import pytz
|
|
10
10
|
from art import tprint
|
|
11
|
-
from .params import
|
|
11
|
+
from .params import HORIZONTAL_TIME_FORMATS, VERTICAL_TIME_FORMATS
|
|
12
12
|
from .params import TIMEZONES_LIST, CLOX_VERSION
|
|
13
13
|
from .params import ADDITIONAL_INFO, EXIT_MESSAGE
|
|
14
|
-
from .params import FACES_MAP, FACES_LIST
|
|
14
|
+
from .params import FACES_MAP, FACES_LIST
|
|
15
|
+
from .params import HORIZONTAL_FACES_LIST_EXAMPLE, VERTICAL_FACES_LIST_EXAMPLE
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
def clear_screen():
|
|
@@ -39,16 +40,23 @@ def get_face(index):
|
|
|
39
40
|
return FACES_MAP[index]
|
|
40
41
|
|
|
41
42
|
|
|
42
|
-
def show_faces_list():
|
|
43
|
+
def show_faces_list(vertical=False):
|
|
43
44
|
"""
|
|
44
45
|
Show faces list.
|
|
45
46
|
|
|
47
|
+
:param vertical: vertical mode flag
|
|
48
|
+
:type vertical: bool
|
|
46
49
|
:return: None
|
|
47
50
|
"""
|
|
48
|
-
|
|
51
|
+
mode = "Horizontal"
|
|
52
|
+
example = HORIZONTAL_FACES_LIST_EXAMPLE
|
|
53
|
+
if vertical:
|
|
54
|
+
example = VERTICAL_FACES_LIST_EXAMPLE
|
|
55
|
+
mode = "Vertical"
|
|
56
|
+
print("Faces list ({0}):\n".format(mode))
|
|
49
57
|
for i in sorted(FACES_MAP):
|
|
50
58
|
print('Face {}\n'.format(i))
|
|
51
|
-
tprint(
|
|
59
|
+
tprint(example, font=get_face(i))
|
|
52
60
|
print('=' * 80)
|
|
53
61
|
|
|
54
62
|
|
|
@@ -63,7 +71,7 @@ def show_timezones_list():
|
|
|
63
71
|
print("{0}. {1}".format(index, timezone))
|
|
64
72
|
|
|
65
73
|
|
|
66
|
-
def run_clock(timezone=None, v_shift=0, h_shift=0, face=1, no_blink=False):
|
|
74
|
+
def run_clock(timezone=None, v_shift=0, h_shift=0, face=1, no_blink=False, vertical=False):
|
|
67
75
|
"""
|
|
68
76
|
Run clock.
|
|
69
77
|
|
|
@@ -77,10 +85,15 @@ def run_clock(timezone=None, v_shift=0, h_shift=0, face=1, no_blink=False):
|
|
|
77
85
|
:type face: int
|
|
78
86
|
:param no_blink: no-blink flag
|
|
79
87
|
:type no_blink: bool
|
|
88
|
+
:param vertical: vertical mode flag
|
|
89
|
+
:type vertical: bool
|
|
80
90
|
:return: None
|
|
81
91
|
"""
|
|
82
92
|
format_index = 0
|
|
83
93
|
timezone_str = timezone
|
|
94
|
+
time_formats = HORIZONTAL_TIME_FORMATS
|
|
95
|
+
if vertical:
|
|
96
|
+
time_formats = VERTICAL_TIME_FORMATS
|
|
84
97
|
if timezone is None:
|
|
85
98
|
tz = None
|
|
86
99
|
timezone_str = "Local"
|
|
@@ -93,7 +106,7 @@ def run_clock(timezone=None, v_shift=0, h_shift=0, face=1, no_blink=False):
|
|
|
93
106
|
clear_screen()
|
|
94
107
|
print('\n' * v_shift, end='')
|
|
95
108
|
print(" " * h_shift, end='')
|
|
96
|
-
current_time = datetime.datetime.now(tz=tz).strftime(
|
|
109
|
+
current_time = datetime.datetime.now(tz=tz).strftime(time_formats[format_index])
|
|
97
110
|
tprint(current_time, font=face, sep="\n" + " " * h_shift)
|
|
98
111
|
print(" " * h_shift, end='')
|
|
99
112
|
print("Timezone: {0}".format(timezone_str))
|
|
@@ -118,11 +131,12 @@ def main():
|
|
|
118
131
|
parser.add_argument('--faces-list', help='faces list', nargs="?", const=1)
|
|
119
132
|
parser.add_argument('--timezones-list', help='timezones list', nargs="?", const=1)
|
|
120
133
|
parser.add_argument('--no-blink', help='disable blinking mode', nargs="?", const=1)
|
|
134
|
+
parser.add_argument('--vertical', help='vertical mode', nargs="?", const=1)
|
|
121
135
|
args = parser.parse_args()
|
|
122
136
|
if args.version:
|
|
123
137
|
print(CLOX_VERSION)
|
|
124
138
|
elif args.faces_list:
|
|
125
|
-
show_faces_list()
|
|
139
|
+
show_faces_list(vertical=args.vertical)
|
|
126
140
|
elif args.timezones_list:
|
|
127
141
|
show_timezones_list()
|
|
128
142
|
else:
|
|
@@ -132,6 +146,7 @@ def main():
|
|
|
132
146
|
h_shift=args.h_shift,
|
|
133
147
|
v_shift=args.v_shift,
|
|
134
148
|
face=args.face,
|
|
135
|
-
no_blink=args.no_blink
|
|
149
|
+
no_blink=args.no_blink,
|
|
150
|
+
vertical=args.vertical)
|
|
136
151
|
except (KeyboardInterrupt, EOFError):
|
|
137
152
|
print(EXIT_MESSAGE)
|
clox/params.py
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
"""clox params."""
|
|
3
3
|
import pytz
|
|
4
4
|
|
|
5
|
-
CLOX_VERSION = "0.
|
|
5
|
+
CLOX_VERSION = "0.3"
|
|
6
6
|
|
|
7
7
|
ADDITIONAL_INFO = "Additional information: Press `Ctrl+C` to exit."
|
|
8
8
|
EXIT_MESSAGE = "See you. Bye!"
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
HORIZONTAL_FACES_LIST_EXAMPLE = "12:34"
|
|
11
|
+
VERTICAL_FACES_LIST_EXAMPLE = "12\n34"
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
HORIZONTAL_TIME_FORMATS = ['%H:%M', '%H:%M.']
|
|
14
|
+
VERTICAL_TIME_FORMATS = ['%H\n%M', '%H\n%M.']
|
|
13
15
|
|
|
14
16
|
TIMEZONES_LIST = pytz.all_timezones
|
|
15
17
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Core Developers
|
|
2
|
+
----------
|
|
3
|
+
- [@sepandhaghighi](http://github.com/sepandhaghighi)
|
|
4
|
+
|
|
5
|
+
# Other Contributors
|
|
6
|
+
----------
|
|
7
|
+
- [@boreshnavard](https://github.com/boreshnavard) **
|
|
8
|
+
- [@sadrasabouri](https://github.com/sadrasabouri)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
** Graphic designer
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: clox
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3
|
|
4
4
|
Summary: A Geeky Clock for Terminal Enthusiasts
|
|
5
5
|
Home-page: https://github.com/sepandhaghighi/clox
|
|
6
|
-
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v0.
|
|
6
|
+
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v0.3
|
|
7
7
|
Author: Sepand Haghighi
|
|
8
8
|
Author-email: me@sepand.tech
|
|
9
9
|
License: MIT
|
|
@@ -33,9 +33,23 @@ License-File: LICENSE
|
|
|
33
33
|
License-File: AUTHORS.md
|
|
34
34
|
Requires-Dist: art>=5.3
|
|
35
35
|
Requires-Dist: pytz>=2019.2
|
|
36
|
+
Dynamic: author
|
|
37
|
+
Dynamic: author-email
|
|
38
|
+
Dynamic: classifier
|
|
39
|
+
Dynamic: description
|
|
40
|
+
Dynamic: description-content-type
|
|
41
|
+
Dynamic: download-url
|
|
42
|
+
Dynamic: home-page
|
|
43
|
+
Dynamic: keywords
|
|
44
|
+
Dynamic: license
|
|
45
|
+
Dynamic: project-url
|
|
46
|
+
Dynamic: requires-dist
|
|
47
|
+
Dynamic: requires-python
|
|
48
|
+
Dynamic: summary
|
|
36
49
|
|
|
37
50
|
|
|
38
51
|
<div align="center">
|
|
52
|
+
<img src="https://github.com/sepandhaghighi/clox/raw/main/otherfiles/logo.png" width="450">
|
|
39
53
|
<h1>Clox: A Geeky Clock for Terminal Enthusiasts</h1>
|
|
40
54
|
<br/>
|
|
41
55
|
<a href="https://badge.fury.io/py/clox"><img src="https://badge.fury.io/py/clox.svg" alt="PyPI version"></a>
|
|
@@ -89,13 +103,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
89
103
|
## Installation
|
|
90
104
|
|
|
91
105
|
### Source Code
|
|
92
|
-
- Download [Version 0.
|
|
106
|
+
- Download [Version 0.3](https://github.com/sepandhaghighi/clox/archive/v0.3.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
93
107
|
- `pip install .`
|
|
94
108
|
|
|
95
109
|
### PyPI
|
|
96
110
|
|
|
97
111
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
98
|
-
- `pip install clox==0.
|
|
112
|
+
- `pip install clox==0.3`
|
|
99
113
|
|
|
100
114
|
|
|
101
115
|
## Usage
|
|
@@ -149,6 +163,12 @@ Disable blinking mode
|
|
|
149
163
|
clox --no-blink
|
|
150
164
|
```
|
|
151
165
|
|
|
166
|
+
### Vertical Mode
|
|
167
|
+
|
|
168
|
+
```console
|
|
169
|
+
clox --vertical
|
|
170
|
+
```
|
|
171
|
+
|
|
152
172
|
## Issues & Bug Reports
|
|
153
173
|
|
|
154
174
|
Just fill an issue and describe it. We'll check it ASAP!
|
|
@@ -199,6 +219,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
199
219
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
200
220
|
|
|
201
221
|
## [Unreleased]
|
|
222
|
+
## [0.3] - 2025-01-10
|
|
223
|
+
### Added
|
|
224
|
+
- Logo
|
|
225
|
+
- `--vertical` argument
|
|
226
|
+
### Changed
|
|
227
|
+
- `show_faces_list` function updated
|
|
228
|
+
- `AUTHORS.md` updated
|
|
202
229
|
## [0.2] - 2025-01-01
|
|
203
230
|
### Added
|
|
204
231
|
- Blink mode
|
|
@@ -214,7 +241,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
214
241
|
- `TIMEZONES.md`
|
|
215
242
|
- `FACES.md`
|
|
216
243
|
|
|
217
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.
|
|
244
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.3...dev
|
|
245
|
+
[0.3]: https://github.com/sepandhaghighi/clox/compare/v0.2...v0.3
|
|
218
246
|
[0.2]: https://github.com/sepandhaghighi/clox/compare/v0.1...v0.2
|
|
219
247
|
[0.1]: https://github.com/sepandhaghighi/clox/compare/e9b49e2...v0.1
|
|
220
248
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
clox/__init__.py,sha256=gErclFSjUDschQpngWqOBGkBKt1jwd-Ww8B9iJmlU5s,108
|
|
2
|
+
clox/__main__.py,sha256=9oJYc1WXu4ZMrjKny_2-4Cgu46-VWHuE9xOqD1iJY0E,109
|
|
3
|
+
clox/functions.py,sha256=BJQhThthfJhr6TCF8VV-nEjl30Gq0ZAYdP3GAe1m1yk,4354
|
|
4
|
+
clox/params.py,sha256=7vbJ-z7PlkqyVqlgbGJP1-o0Izc_6KSZ3ygnbPrO70E,899
|
|
5
|
+
clox-0.3.dist-info/AUTHORS.md,sha256=lmtnd18MnfgB57jdvfJbC0JHN3iARf2Ov4pY5kPGJC8,242
|
|
6
|
+
clox-0.3.dist-info/LICENSE,sha256=WoAsqqZ_lNVBGdyxjwh7YnVNXKfOB-qYVrRhrn-e-_4,1072
|
|
7
|
+
clox-0.3.dist-info/METADATA,sha256=ZBDNDzs2vULZcNTEAy-Sp-4kooMmkhxGh9DyZES7NG8,7341
|
|
8
|
+
clox-0.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
clox-0.3.dist-info/entry_points.txt,sha256=sP4Rmoe-DxYGjlF_Tld6nghbt_u-fK8h9ZUQFmO8TJs,45
|
|
10
|
+
clox-0.3.dist-info/top_level.txt,sha256=5DxGH-4VNfYkM8vbfngObh6-jpFEoSW4M90EvDGfhSw,5
|
|
11
|
+
clox-0.3.dist-info/RECORD,,
|
clox-0.2.dist-info/AUTHORS.md
DELETED
clox-0.2.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
clox/__init__.py,sha256=gErclFSjUDschQpngWqOBGkBKt1jwd-Ww8B9iJmlU5s,108
|
|
2
|
-
clox/__main__.py,sha256=9oJYc1WXu4ZMrjKny_2-4Cgu46-VWHuE9xOqD1iJY0E,109
|
|
3
|
-
clox/functions.py,sha256=ixKa3BHMzwWdnn8SWZAuk4f3-Kpqs0irHeEcP0n9_k0,3705
|
|
4
|
-
clox/params.py,sha256=7jFzOBH41Yfcmk-eUv1tBnOJfiBV0EV4kFJApPq66wE,802
|
|
5
|
-
clox-0.2.dist-info/AUTHORS.md,sha256=1T_gvCIPkHMdGX9e6dg9eich7OiqlYkE6hSk8tieihQ,116
|
|
6
|
-
clox-0.2.dist-info/LICENSE,sha256=WoAsqqZ_lNVBGdyxjwh7YnVNXKfOB-qYVrRhrn-e-_4,1072
|
|
7
|
-
clox-0.2.dist-info/METADATA,sha256=JlKP-N2oJkwyWVpQbypp90Xnr_MQQ3oHsHzh9I3hGwI,6722
|
|
8
|
-
clox-0.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
9
|
-
clox-0.2.dist-info/entry_points.txt,sha256=sP4Rmoe-DxYGjlF_Tld6nghbt_u-fK8h9ZUQFmO8TJs,45
|
|
10
|
-
clox-0.2.dist-info/top_level.txt,sha256=5DxGH-4VNfYkM8vbfngObh6-jpFEoSW4M90EvDGfhSw,5
|
|
11
|
-
clox-0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|