clox 1.0__tar.gz → 1.1__tar.gz
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-1.0 → clox-1.1}/CHANGELOG.md +10 -1
- {clox-1.0 → clox-1.1}/PKG-INFO +29 -9
- {clox-1.0 → clox-1.1}/README.md +17 -6
- {clox-1.0 → clox-1.1}/SECURITY.md +2 -2
- {clox-1.0 → clox-1.1}/clox/functions.py +68 -17
- {clox-1.0 → clox-1.1}/clox/params.py +20 -4
- {clox-1.0 → clox-1.1}/clox.egg-info/PKG-INFO +29 -9
- {clox-1.0 → clox-1.1}/setup.py +2 -2
- {clox-1.0 → clox-1.1}/AUTHORS.md +0 -0
- {clox-1.0 → clox-1.1}/COUNTRIES.md +0 -0
- {clox-1.0 → clox-1.1}/FACES.md +0 -0
- {clox-1.0 → clox-1.1}/LICENSE +0 -0
- {clox-1.0 → clox-1.1}/MANIFEST.in +0 -0
- {clox-1.0 → clox-1.1}/TIMEZONES.md +0 -0
- {clox-1.0 → clox-1.1}/clox/__init__.py +0 -0
- {clox-1.0 → clox-1.1}/clox/__main__.py +0 -0
- {clox-1.0 → clox-1.1}/clox/jcalendar.py +0 -0
- {clox-1.0 → clox-1.1}/clox.egg-info/SOURCES.txt +0 -0
- {clox-1.0 → clox-1.1}/clox.egg-info/dependency_links.txt +0 -0
- {clox-1.0 → clox-1.1}/clox.egg-info/entry_points.txt +0 -0
- {clox-1.0 → clox-1.1}/clox.egg-info/requires.txt +0 -0
- {clox-1.0 → clox-1.1}/clox.egg-info/top_level.txt +0 -0
- {clox-1.0 → clox-1.1}/dev-requirements.txt +0 -0
- {clox-1.0 → clox-1.1}/requirements.txt +0 -0
- {clox-1.0 → clox-1.1}/setup.cfg +0 -0
|
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
|
+
## [1.1] - 2025-05-23
|
|
9
|
+
### Added
|
|
10
|
+
- `--first-weekday` argument
|
|
11
|
+
- `--date-format` argument
|
|
12
|
+
- `--date-formats-list` argument
|
|
13
|
+
### Changed
|
|
14
|
+
- `README.md` updated
|
|
15
|
+
- Test system modified
|
|
8
16
|
## [1.0] - 2025-05-06
|
|
9
17
|
### Added
|
|
10
18
|
- Local time
|
|
@@ -71,7 +79,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
71
79
|
- `TIMEZONES.md`
|
|
72
80
|
- `FACES.md`
|
|
73
81
|
|
|
74
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.
|
|
82
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.1...dev
|
|
83
|
+
[1.1]: https://github.com/sepandhaghighi/clox/compare/v1.0...v1.1
|
|
75
84
|
[1.0]: https://github.com/sepandhaghighi/clox/compare/v0.9...v1.0
|
|
76
85
|
[0.9]: https://github.com/sepandhaghighi/clox/compare/v0.8...v0.9
|
|
77
86
|
[0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
|
{clox-1.0 → clox-1.1}/PKG-INFO
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clox
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1
|
|
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/v1.
|
|
6
|
+
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v1.1
|
|
7
7
|
Author: Sepand Haghighi
|
|
8
8
|
Author-email: me@sepand.tech
|
|
9
9
|
License: MIT
|
|
@@ -104,13 +104,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
104
104
|
## Installation
|
|
105
105
|
|
|
106
106
|
### Source Code
|
|
107
|
-
- Download [Version 1.
|
|
107
|
+
- Download [Version 1.1](https://github.com/sepandhaghighi/clox/archive/v1.1.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
108
108
|
- `pip install .`
|
|
109
109
|
|
|
110
110
|
### PyPI
|
|
111
111
|
|
|
112
112
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
113
|
-
- `pip install clox==1.
|
|
113
|
+
- `pip install clox==1.1`
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
## Usage
|
|
@@ -218,22 +218,33 @@ clox --vertical
|
|
|
218
218
|
|
|
219
219
|
In this mode, the calendar will be displayed
|
|
220
220
|
|
|
221
|
-
ℹ️ Valid choices: [`
|
|
221
|
+
ℹ️ Valid choices: [`MONTH`, `YEAR`]
|
|
222
222
|
|
|
223
223
|
```console
|
|
224
|
-
clox --calendar=month
|
|
224
|
+
clox --calendar=month --first-weekday="SUNDAY"
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
### Date System
|
|
228
228
|
|
|
229
|
-
ℹ️ Valid choices: [`
|
|
229
|
+
ℹ️ Valid choices: [`GREGORIAN`, `JALALI`]
|
|
230
230
|
|
|
231
|
-
ℹ️ The default date system is `
|
|
231
|
+
ℹ️ The default date system is `GREGORIAN`
|
|
232
232
|
|
|
233
233
|
```console
|
|
234
234
|
clox --date-system=jalali
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
+
### Date Format
|
|
238
|
+
|
|
239
|
+
ℹ️ Valid choices: [`ISO`, `US`, `US-SHORT`, `EU`, `EU-SHORT`, `DOT`, `DASH`, `YMD`, `DMY`, `MDY`, `FULL`]
|
|
240
|
+
|
|
241
|
+
ℹ️ The default date format is `FULL`
|
|
242
|
+
|
|
243
|
+
```console
|
|
244
|
+
clox --date-system=jalali --date-format=EU
|
|
245
|
+
```
|
|
246
|
+
* Date Formats List: `clox --date-formats-list`
|
|
247
|
+
|
|
237
248
|
## Screen Record
|
|
238
249
|
|
|
239
250
|
<div align="center">
|
|
@@ -292,6 +303,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
292
303
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
293
304
|
|
|
294
305
|
## [Unreleased]
|
|
306
|
+
## [1.1] - 2025-05-23
|
|
307
|
+
### Added
|
|
308
|
+
- `--first-weekday` argument
|
|
309
|
+
- `--date-format` argument
|
|
310
|
+
- `--date-formats-list` argument
|
|
311
|
+
### Changed
|
|
312
|
+
- `README.md` updated
|
|
313
|
+
- Test system modified
|
|
295
314
|
## [1.0] - 2025-05-06
|
|
296
315
|
### Added
|
|
297
316
|
- Local time
|
|
@@ -358,7 +377,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
358
377
|
- `TIMEZONES.md`
|
|
359
378
|
- `FACES.md`
|
|
360
379
|
|
|
361
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.
|
|
380
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.1...dev
|
|
381
|
+
[1.1]: https://github.com/sepandhaghighi/clox/compare/v1.0...v1.1
|
|
362
382
|
[1.0]: https://github.com/sepandhaghighi/clox/compare/v0.9...v1.0
|
|
363
383
|
[0.9]: https://github.com/sepandhaghighi/clox/compare/v0.8...v0.9
|
|
364
384
|
[0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
|
{clox-1.0 → clox-1.1}/README.md
RENAMED
|
@@ -53,13 +53,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
53
53
|
## Installation
|
|
54
54
|
|
|
55
55
|
### Source Code
|
|
56
|
-
- Download [Version 1.
|
|
56
|
+
- Download [Version 1.1](https://github.com/sepandhaghighi/clox/archive/v1.1.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
57
57
|
- `pip install .`
|
|
58
58
|
|
|
59
59
|
### PyPI
|
|
60
60
|
|
|
61
61
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
62
|
-
- `pip install clox==1.
|
|
62
|
+
- `pip install clox==1.1`
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
## Usage
|
|
@@ -167,22 +167,33 @@ clox --vertical
|
|
|
167
167
|
|
|
168
168
|
In this mode, the calendar will be displayed
|
|
169
169
|
|
|
170
|
-
ℹ️ Valid choices: [`
|
|
170
|
+
ℹ️ Valid choices: [`MONTH`, `YEAR`]
|
|
171
171
|
|
|
172
172
|
```console
|
|
173
|
-
clox --calendar=month
|
|
173
|
+
clox --calendar=month --first-weekday="SUNDAY"
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
### Date System
|
|
177
177
|
|
|
178
|
-
ℹ️ Valid choices: [`
|
|
178
|
+
ℹ️ Valid choices: [`GREGORIAN`, `JALALI`]
|
|
179
179
|
|
|
180
|
-
ℹ️ The default date system is `
|
|
180
|
+
ℹ️ The default date system is `GREGORIAN`
|
|
181
181
|
|
|
182
182
|
```console
|
|
183
183
|
clox --date-system=jalali
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
+
### Date Format
|
|
187
|
+
|
|
188
|
+
ℹ️ Valid choices: [`ISO`, `US`, `US-SHORT`, `EU`, `EU-SHORT`, `DOT`, `DASH`, `YMD`, `DMY`, `MDY`, `FULL`]
|
|
189
|
+
|
|
190
|
+
ℹ️ The default date format is `FULL`
|
|
191
|
+
|
|
192
|
+
```console
|
|
193
|
+
clox --date-system=jalali --date-format=EU
|
|
194
|
+
```
|
|
195
|
+
* Date Formats List: `clox --date-formats-list`
|
|
196
|
+
|
|
186
197
|
## Screen Record
|
|
187
198
|
|
|
188
199
|
<div align="center">
|
|
@@ -15,12 +15,13 @@ from .jcalendar import TextCalendar as JalaliCalendar
|
|
|
15
15
|
from .params import HORIZONTAL_TIME_24H_FORMATS, VERTICAL_TIME_24H_FORMATS
|
|
16
16
|
from .params import HORIZONTAL_TIME_12H_FORMATS, VERTICAL_TIME_12H_FORMATS
|
|
17
17
|
from .params import TIMEZONE_DIFFERENCE_FORMAT
|
|
18
|
-
from .params import CLOX_VERSION
|
|
19
|
-
from .params import TIMEZONES_LIST, COUNTRIES_LIST
|
|
18
|
+
from .params import CLOX_VERSION
|
|
19
|
+
from .params import TIMEZONES_LIST, COUNTRIES_LIST, WEEKDAYS_LIST
|
|
20
20
|
from .params import ADDITIONAL_INFO, EXIT_MESSAGE
|
|
21
21
|
from .params import FACES_MAP, FACES_LIST, CALENDARS_LIST, DATE_SYSTEMS_LIST
|
|
22
22
|
from .params import HORIZONTAL_FACES_LIST_EXAMPLE, VERTICAL_FACES_LIST_EXAMPLE
|
|
23
23
|
from .params import CLOX_OVERVIEW, CLOX_REPO
|
|
24
|
+
from .params import DATE_FORMATS_MAP, DATE_FORMATS_LIST
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def clox_info() -> None:
|
|
@@ -125,13 +126,49 @@ def show_countries_list() -> None:
|
|
|
125
126
|
country_code=country_code, country_name=country_code))
|
|
126
127
|
|
|
127
128
|
|
|
129
|
+
def show_date_formats_list(date_system: str = "GREGORIAN") -> None:
|
|
130
|
+
"""
|
|
131
|
+
Show date formats list.
|
|
132
|
+
|
|
133
|
+
:param date_system: date system
|
|
134
|
+
"""
|
|
135
|
+
datetime_lib = datetime
|
|
136
|
+
example_year = 1990
|
|
137
|
+
if date_system == "JALALI":
|
|
138
|
+
datetime_lib = jdatetime
|
|
139
|
+
example_year = 1368
|
|
140
|
+
print("Date formats list:\n")
|
|
141
|
+
example_date = datetime_lib.datetime(year=example_year, month=7, day=23)
|
|
142
|
+
for index, date_format in enumerate(DATE_FORMATS_LIST, 1):
|
|
143
|
+
print("{index}. {date_format_code} - {date_format_example}".format(index=index,
|
|
144
|
+
date_format_code=date_format, date_format_example=example_date.strftime(DATE_FORMATS_MAP[date_format])))
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def _get_weekday_id(first_weekday: str, date_system: str = "GREGORIAN") -> int:
|
|
148
|
+
"""
|
|
149
|
+
Get weekday id.
|
|
150
|
+
|
|
151
|
+
:param first_weekday: first weekday
|
|
152
|
+
:param date_system: date system
|
|
153
|
+
"""
|
|
154
|
+
first_weekday_normalized = first_weekday.upper()
|
|
155
|
+
if len(first_weekday) > 2:
|
|
156
|
+
first_weekday_normalized = first_weekday_normalized[:2]
|
|
157
|
+
weekdays = [x[:2] for x in WEEKDAYS_LIST]
|
|
158
|
+
if date_system == "JALALI":
|
|
159
|
+
weekdays = weekdays[-2:] + weekdays[:-2]
|
|
160
|
+
return weekdays.index(first_weekday_normalized)
|
|
161
|
+
|
|
162
|
+
|
|
128
163
|
def print_calendar(
|
|
129
|
-
mode: str = "
|
|
164
|
+
mode: str = "MONTH",
|
|
130
165
|
timezone: Optional[str] = None,
|
|
131
166
|
country: Optional[str] = None,
|
|
132
167
|
v_shift: int = 0,
|
|
133
168
|
h_shift: int = 0,
|
|
134
|
-
date_system: str = "
|
|
169
|
+
date_system: str = "GREGORIAN",
|
|
170
|
+
date_format: str = "FULL",
|
|
171
|
+
first_weekday: str = "MONDAY") -> None:
|
|
135
172
|
"""
|
|
136
173
|
Print calendar.
|
|
137
174
|
|
|
@@ -141,12 +178,15 @@ def print_calendar(
|
|
|
141
178
|
:param v_shift: vertical shift
|
|
142
179
|
:param h_shift: horizontal shift
|
|
143
180
|
:param date_system: date system
|
|
181
|
+
:param date_format: date format
|
|
182
|
+
:param first_weekday: first weekday
|
|
144
183
|
"""
|
|
184
|
+
first_weekday_id = _get_weekday_id(first_weekday, date_system)
|
|
145
185
|
datetime_lib = datetime
|
|
146
|
-
calendar_obj = GregorianCalendar()
|
|
147
|
-
if date_system == "
|
|
186
|
+
calendar_obj = GregorianCalendar(first_weekday_id)
|
|
187
|
+
if date_system == "JALALI":
|
|
148
188
|
datetime_lib = jdatetime
|
|
149
|
-
calendar_obj = JalaliCalendar()
|
|
189
|
+
calendar_obj = JalaliCalendar(first_weekday_id)
|
|
150
190
|
tz = None
|
|
151
191
|
timezone_str = "Local"
|
|
152
192
|
if country is not None:
|
|
@@ -159,14 +199,14 @@ def print_calendar(
|
|
|
159
199
|
v_shift = max(0, v_shift)
|
|
160
200
|
h_shift = max(0, h_shift)
|
|
161
201
|
datetime_timezone = datetime_lib.datetime.now(tz=tz)
|
|
162
|
-
date_timezone_str = datetime_timezone.strftime(
|
|
202
|
+
date_timezone_str = datetime_timezone.strftime(DATE_FORMATS_MAP[date_format])
|
|
163
203
|
print('\n' * v_shift, end='')
|
|
164
204
|
print(" " * h_shift, end='')
|
|
165
205
|
print("Today: {date}".format(date=date_timezone_str))
|
|
166
206
|
print(" " * h_shift, end='')
|
|
167
207
|
print("Timezone: {timezone}\n".format(timezone=timezone_str))
|
|
168
208
|
calendar_str = calendar_obj.formatmonth(datetime_timezone.year, datetime_timezone.month)
|
|
169
|
-
if mode == "
|
|
209
|
+
if mode == "YEAR":
|
|
170
210
|
calendar_str = calendar_obj.formatyear(datetime_timezone.year)
|
|
171
211
|
print("\n".join([" " * h_shift + x for x in calendar_str.split("\n")]))
|
|
172
212
|
|
|
@@ -182,7 +222,8 @@ def run_clock(
|
|
|
182
222
|
hide_date: bool = False,
|
|
183
223
|
hide_timezone: bool = False,
|
|
184
224
|
am_pm: bool = False,
|
|
185
|
-
date_system: str = "
|
|
225
|
+
date_system: str = "GREGORIAN",
|
|
226
|
+
date_format: str = "FULL") -> None:
|
|
186
227
|
"""
|
|
187
228
|
Run clock.
|
|
188
229
|
|
|
@@ -197,9 +238,10 @@ def run_clock(
|
|
|
197
238
|
:param hide_timezone: hide timezone flag
|
|
198
239
|
:param am_pm: AM/PM mode flag
|
|
199
240
|
:param date_system: date system
|
|
241
|
+
:param date_format: date format
|
|
200
242
|
"""
|
|
201
243
|
datetime_lib = datetime
|
|
202
|
-
if date_system == "
|
|
244
|
+
if date_system == "JALALI":
|
|
203
245
|
datetime_lib = jdatetime
|
|
204
246
|
format_index = 0
|
|
205
247
|
time_formats = HORIZONTAL_TIME_12H_FORMATS if am_pm else HORIZONTAL_TIME_24H_FORMATS
|
|
@@ -224,7 +266,7 @@ def run_clock(
|
|
|
224
266
|
print(" " * h_shift, end='')
|
|
225
267
|
datetime_timezone = datetime_lib.datetime.now(tz=tz)
|
|
226
268
|
time_timezone_str = datetime_timezone.strftime(time_formats[format_index])
|
|
227
|
-
date_timezone_str = datetime_timezone.strftime(
|
|
269
|
+
date_timezone_str = datetime_timezone.strftime(DATE_FORMATS_MAP[date_format])
|
|
228
270
|
tprint(time_timezone_str, font=face, sep="\n" + " " * h_shift)
|
|
229
271
|
if not hide_date:
|
|
230
272
|
print(" " * h_shift, end='')
|
|
@@ -256,18 +298,22 @@ def main() -> None:
|
|
|
256
298
|
parser.add_argument('--faces-list', help='faces list', nargs="?", const=1)
|
|
257
299
|
parser.add_argument('--timezones-list', help='timezones list', nargs="?", const=1)
|
|
258
300
|
parser.add_argument('--countries-list', help='countries list', nargs="?", const=1)
|
|
301
|
+
parser.add_argument('--date-formats-list', help='date formats list', nargs="?", const=1)
|
|
259
302
|
parser.add_argument('--no-blink', help='disable blinking mode', nargs="?", const=1)
|
|
260
303
|
parser.add_argument('--vertical', help='vertical mode', nargs="?", const=1)
|
|
261
304
|
parser.add_argument('--hide-date', help='hide date', nargs="?", const=1)
|
|
262
305
|
parser.add_argument('--hide-timezone', help='hide timezone', nargs="?", const=1)
|
|
263
306
|
parser.add_argument('--am-pm', help='AM/PM mode', nargs="?", const=1)
|
|
264
|
-
parser.add_argument('--calendar', help='calendar mode', type=str.
|
|
307
|
+
parser.add_argument('--calendar', help='calendar mode', type=str.upper, choices=CALENDARS_LIST)
|
|
308
|
+
parser.add_argument('--first-weekday', help='first weekday', type=str.upper, default="MONDAY",
|
|
309
|
+
choices=WEEKDAYS_LIST + [x[:2] for x in WEEKDAYS_LIST])
|
|
310
|
+
parser.add_argument('--date-format', help='date format', type=str.upper, choices=DATE_FORMATS_LIST, default="FULL")
|
|
265
311
|
parser.add_argument(
|
|
266
312
|
'--date-system',
|
|
267
313
|
help='date system',
|
|
268
|
-
type=str.
|
|
314
|
+
type=str.upper,
|
|
269
315
|
choices=DATE_SYSTEMS_LIST,
|
|
270
|
-
default="
|
|
316
|
+
default="GREGORIAN")
|
|
271
317
|
args = parser.parse_args()
|
|
272
318
|
if args.version:
|
|
273
319
|
print(CLOX_VERSION)
|
|
@@ -279,6 +325,8 @@ def main() -> None:
|
|
|
279
325
|
show_timezones_list(args.country)
|
|
280
326
|
elif args.countries_list:
|
|
281
327
|
show_countries_list()
|
|
328
|
+
elif args.date_formats_list:
|
|
329
|
+
show_date_formats_list(date_system=args.date_system)
|
|
282
330
|
elif args.calendar:
|
|
283
331
|
print_calendar(
|
|
284
332
|
mode=args.calendar,
|
|
@@ -286,7 +334,9 @@ def main() -> None:
|
|
|
286
334
|
country=args.country,
|
|
287
335
|
h_shift=args.h_shift,
|
|
288
336
|
v_shift=args.v_shift,
|
|
289
|
-
date_system=args.date_system
|
|
337
|
+
date_system=args.date_system,
|
|
338
|
+
date_format=args.date_format,
|
|
339
|
+
first_weekday=args.first_weekday)
|
|
290
340
|
else:
|
|
291
341
|
try:
|
|
292
342
|
run_clock(
|
|
@@ -300,6 +350,7 @@ def main() -> None:
|
|
|
300
350
|
hide_date=args.hide_date,
|
|
301
351
|
hide_timezone=args.hide_timezone,
|
|
302
352
|
am_pm=args.am_pm,
|
|
303
|
-
date_system=args.date_system
|
|
353
|
+
date_system=args.date_system,
|
|
354
|
+
date_format=args.date_format)
|
|
304
355
|
except (KeyboardInterrupt, EOFError):
|
|
305
356
|
print(EXIT_MESSAGE)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""clox params."""
|
|
3
3
|
import pytz
|
|
4
4
|
|
|
5
|
-
CLOX_VERSION = "1.
|
|
5
|
+
CLOX_VERSION = "1.1"
|
|
6
6
|
|
|
7
7
|
CLOX_OVERVIEW = '''
|
|
8
8
|
Clox is a terminal-based clock application designed for terminal enthusiasts who appreciate simplicity,
|
|
@@ -22,9 +22,9 @@ HORIZONTAL_TIME_24H_FORMATS = ['%H:%M', '%H:%M.']
|
|
|
22
22
|
VERTICAL_TIME_24H_FORMATS = ['%H\n%M', '%H\n%M.']
|
|
23
23
|
HORIZONTAL_TIME_12H_FORMATS = ['%I:%M %p', '%I:%M %p.']
|
|
24
24
|
VERTICAL_TIME_12H_FORMATS = ['%I\n%M\n%p', '%I\n%M\n%p.']
|
|
25
|
-
DATE_FORMAT = "%A, %B %d, %Y"
|
|
26
25
|
TIMEZONE_DIFFERENCE_FORMAT = "{hours:02}h{minutes:02}m {direction}"
|
|
27
26
|
|
|
27
|
+
WEEKDAYS_LIST = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]
|
|
28
28
|
TIMEZONES_LIST = list(map(lambda x: x.upper(), pytz.all_timezones))
|
|
29
29
|
COUNTRIES_LIST = list(map(lambda x: x.upper(), pytz.country_timezones.keys()))
|
|
30
30
|
|
|
@@ -57,8 +57,24 @@ FACES_MAP = {
|
|
|
57
57
|
25: 'epic',
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
DATE_FORMATS_MAP = {
|
|
61
|
+
'ISO': '%Y-%m-%d',
|
|
62
|
+
'US': '%m/%d/%Y',
|
|
63
|
+
'US-SHORT': '%m/%d/%y',
|
|
64
|
+
'EU': '%d/%m/%Y',
|
|
65
|
+
'EU-SHORT': '%d/%m/%y',
|
|
66
|
+
'DOT': '%d.%m.%Y',
|
|
67
|
+
'DASH': '%d-%m-%Y',
|
|
68
|
+
'YMD': '%Y/%m/%d',
|
|
69
|
+
'DMY': '%d/%m/%Y',
|
|
70
|
+
'MDY': '%m/%d/%Y',
|
|
71
|
+
'FULL': '%A, %B %d, %Y',
|
|
72
|
+
}
|
|
73
|
+
|
|
60
74
|
FACES_LIST = [-1] + sorted(FACES_MAP)
|
|
61
75
|
|
|
62
|
-
CALENDARS_LIST = ["
|
|
76
|
+
CALENDARS_LIST = ["MONTH", "YEAR"]
|
|
77
|
+
|
|
78
|
+
DATE_SYSTEMS_LIST = ["GREGORIAN", "JALALI"]
|
|
63
79
|
|
|
64
|
-
|
|
80
|
+
DATE_FORMATS_LIST = sorted(DATE_FORMATS_MAP)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clox
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1
|
|
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/v1.
|
|
6
|
+
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v1.1
|
|
7
7
|
Author: Sepand Haghighi
|
|
8
8
|
Author-email: me@sepand.tech
|
|
9
9
|
License: MIT
|
|
@@ -104,13 +104,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
104
104
|
## Installation
|
|
105
105
|
|
|
106
106
|
### Source Code
|
|
107
|
-
- Download [Version 1.
|
|
107
|
+
- Download [Version 1.1](https://github.com/sepandhaghighi/clox/archive/v1.1.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
108
108
|
- `pip install .`
|
|
109
109
|
|
|
110
110
|
### PyPI
|
|
111
111
|
|
|
112
112
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
113
|
-
- `pip install clox==1.
|
|
113
|
+
- `pip install clox==1.1`
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
## Usage
|
|
@@ -218,22 +218,33 @@ clox --vertical
|
|
|
218
218
|
|
|
219
219
|
In this mode, the calendar will be displayed
|
|
220
220
|
|
|
221
|
-
ℹ️ Valid choices: [`
|
|
221
|
+
ℹ️ Valid choices: [`MONTH`, `YEAR`]
|
|
222
222
|
|
|
223
223
|
```console
|
|
224
|
-
clox --calendar=month
|
|
224
|
+
clox --calendar=month --first-weekday="SUNDAY"
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
### Date System
|
|
228
228
|
|
|
229
|
-
ℹ️ Valid choices: [`
|
|
229
|
+
ℹ️ Valid choices: [`GREGORIAN`, `JALALI`]
|
|
230
230
|
|
|
231
|
-
ℹ️ The default date system is `
|
|
231
|
+
ℹ️ The default date system is `GREGORIAN`
|
|
232
232
|
|
|
233
233
|
```console
|
|
234
234
|
clox --date-system=jalali
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
+
### Date Format
|
|
238
|
+
|
|
239
|
+
ℹ️ Valid choices: [`ISO`, `US`, `US-SHORT`, `EU`, `EU-SHORT`, `DOT`, `DASH`, `YMD`, `DMY`, `MDY`, `FULL`]
|
|
240
|
+
|
|
241
|
+
ℹ️ The default date format is `FULL`
|
|
242
|
+
|
|
243
|
+
```console
|
|
244
|
+
clox --date-system=jalali --date-format=EU
|
|
245
|
+
```
|
|
246
|
+
* Date Formats List: `clox --date-formats-list`
|
|
247
|
+
|
|
237
248
|
## Screen Record
|
|
238
249
|
|
|
239
250
|
<div align="center">
|
|
@@ -292,6 +303,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
292
303
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
293
304
|
|
|
294
305
|
## [Unreleased]
|
|
306
|
+
## [1.1] - 2025-05-23
|
|
307
|
+
### Added
|
|
308
|
+
- `--first-weekday` argument
|
|
309
|
+
- `--date-format` argument
|
|
310
|
+
- `--date-formats-list` argument
|
|
311
|
+
### Changed
|
|
312
|
+
- `README.md` updated
|
|
313
|
+
- Test system modified
|
|
295
314
|
## [1.0] - 2025-05-06
|
|
296
315
|
### Added
|
|
297
316
|
- Local time
|
|
@@ -358,7 +377,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
358
377
|
- `TIMEZONES.md`
|
|
359
378
|
- `FACES.md`
|
|
360
379
|
|
|
361
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.
|
|
380
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.1...dev
|
|
381
|
+
[1.1]: https://github.com/sepandhaghighi/clox/compare/v1.0...v1.1
|
|
362
382
|
[1.0]: https://github.com/sepandhaghighi/clox/compare/v0.9...v1.0
|
|
363
383
|
[0.9]: https://github.com/sepandhaghighi/clox/compare/v0.8...v0.9
|
|
364
384
|
[0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
|
{clox-1.0 → clox-1.1}/setup.py
RENAMED
|
@@ -30,7 +30,7 @@ def read_description() -> str:
|
|
|
30
30
|
setup(
|
|
31
31
|
name='clox',
|
|
32
32
|
packages=['clox'],
|
|
33
|
-
version='1.
|
|
33
|
+
version='1.1',
|
|
34
34
|
description='A Geeky Clock for Terminal Enthusiasts',
|
|
35
35
|
long_description=read_description(),
|
|
36
36
|
long_description_content_type='text/markdown',
|
|
@@ -38,7 +38,7 @@ setup(
|
|
|
38
38
|
author='Sepand Haghighi',
|
|
39
39
|
author_email='me@sepand.tech',
|
|
40
40
|
url='https://github.com/sepandhaghighi/clox',
|
|
41
|
-
download_url='https://github.com/sepandhaghighi/clox/tarball/v1.
|
|
41
|
+
download_url='https://github.com/sepandhaghighi/clox/tarball/v1.1',
|
|
42
42
|
keywords="clock time timer timezone terminal cli geek clox",
|
|
43
43
|
project_urls={
|
|
44
44
|
'Source': 'https://github.com/sepandhaghighi/clox'
|
{clox-1.0 → clox-1.1}/AUTHORS.md
RENAMED
|
File without changes
|
|
File without changes
|
{clox-1.0 → clox-1.1}/FACES.md
RENAMED
|
File without changes
|
{clox-1.0 → clox-1.1}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clox-1.0 → clox-1.1}/setup.cfg
RENAMED
|
File without changes
|