clox 0.9__py3-none-any.whl → 1.0__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 CHANGED
@@ -28,7 +28,7 @@ def clox_info() -> None:
28
28
  tprint("Clox")
29
29
  tprint("V:" + CLOX_VERSION)
30
30
  print(CLOX_OVERVIEW)
31
- print(CLOX_REPO)
31
+ print("Repo : " + CLOX_REPO)
32
32
 
33
33
 
34
34
  def clear_screen() -> None:
@@ -58,9 +58,9 @@ def get_timezone_difference(timezone: str) -> str:
58
58
  """
59
59
  direction = "ahead"
60
60
  tz = pytz.timezone(timezone)
61
- datetime_now_timezone = datetime.datetime.now(tz=tz)
62
- datetime_now_local = datetime.datetime.now()
63
- difference = datetime_now_timezone - tz.localize(datetime_now_local)
61
+ datetime_timezone = datetime.datetime.now(tz=tz)
62
+ datetime_local = datetime.datetime.now()
63
+ difference = datetime_timezone - tz.localize(datetime_local)
64
64
  total_minutes = difference.total_seconds() // 60
65
65
  if total_minutes < 0:
66
66
  direction = "behind"
@@ -158,16 +158,16 @@ def print_calendar(
158
158
  tz = pytz.timezone(timezone)
159
159
  v_shift = max(0, v_shift)
160
160
  h_shift = max(0, h_shift)
161
- datetime_now = datetime_lib.datetime.now(tz=tz)
162
- current_date = datetime_now.strftime(DATE_FORMAT)
161
+ datetime_timezone = datetime_lib.datetime.now(tz=tz)
162
+ date_timezone_str = datetime_timezone.strftime(DATE_FORMAT)
163
163
  print('\n' * v_shift, end='')
164
164
  print(" " * h_shift, end='')
165
- print("Today: {date}".format(date=current_date))
165
+ print("Today: {date}".format(date=date_timezone_str))
166
166
  print(" " * h_shift, end='')
167
167
  print("Timezone: {timezone}\n".format(timezone=timezone_str))
168
- calendar_str = calendar_obj.formatmonth(datetime_now.year, datetime_now.month)
168
+ calendar_str = calendar_obj.formatmonth(datetime_timezone.year, datetime_timezone.month)
169
169
  if mode == "year":
170
- calendar_str = calendar_obj.formatyear(datetime_now.year)
170
+ calendar_str = calendar_obj.formatyear(datetime_timezone.year)
171
171
  print("\n".join([" " * h_shift + x for x in calendar_str.split("\n")]))
172
172
 
173
173
 
@@ -203,6 +203,7 @@ def run_clock(
203
203
  datetime_lib = jdatetime
204
204
  format_index = 0
205
205
  time_formats = HORIZONTAL_TIME_12H_FORMATS if am_pm else HORIZONTAL_TIME_24H_FORMATS
206
+ time_formats_local = HORIZONTAL_TIME_12H_FORMATS if am_pm else HORIZONTAL_TIME_24H_FORMATS
206
207
  if vertical:
207
208
  time_formats = VERTICAL_TIME_12H_FORMATS if am_pm else VERTICAL_TIME_24H_FORMATS
208
209
  tz = None
@@ -221,16 +222,21 @@ def run_clock(
221
222
  clear_screen()
222
223
  print('\n' * v_shift, end='')
223
224
  print(" " * h_shift, end='')
224
- datetime_now = datetime_lib.datetime.now(tz=tz)
225
- current_time = datetime_now.strftime(time_formats[format_index])
226
- current_date = datetime_now.strftime(DATE_FORMAT)
227
- tprint(current_time, font=face, sep="\n" + " " * h_shift)
225
+ datetime_timezone = datetime_lib.datetime.now(tz=tz)
226
+ time_timezone_str = datetime_timezone.strftime(time_formats[format_index])
227
+ date_timezone_str = datetime_timezone.strftime(DATE_FORMAT)
228
+ tprint(time_timezone_str, font=face, sep="\n" + " " * h_shift)
228
229
  if not hide_date:
229
230
  print(" " * h_shift, end='')
230
- print(current_date)
231
+ print(date_timezone_str)
231
232
  if not hide_timezone:
232
233
  print(" " * h_shift, end='')
233
234
  print("Timezone: {timezone}".format(timezone=timezone_str))
235
+ if timezone is not None:
236
+ datetime_local = datetime.datetime.now()
237
+ time_local_str = datetime_local.strftime(time_formats_local[format_index])
238
+ print(" " * h_shift, end='')
239
+ print("Local Time: {local_time}".format(local_time=time_local_str))
234
240
  time.sleep(1)
235
241
  if not no_blink:
236
242
  format_index = int(not format_index)
clox/params.py CHANGED
@@ -2,7 +2,7 @@
2
2
  """clox params."""
3
3
  import pytz
4
4
 
5
- CLOX_VERSION = "0.9"
5
+ CLOX_VERSION = "1.0"
6
6
 
7
7
  CLOX_OVERVIEW = '''
8
8
  Clox is a terminal-based clock application designed for terminal enthusiasts who appreciate simplicity,
@@ -10,7 +10,7 @@ elegance, and productivity within their command-line environment. Whether you're
10
10
  or simply enjoying the terminal aesthetic, Clox brings a stylish and customizable time display to your workspace.
11
11
  '''
12
12
 
13
- CLOX_REPO = "Repo : https://github.com/sepandhaghighi/clox"
13
+ CLOX_REPO = "https://github.com/sepandhaghighi/clox"
14
14
 
15
15
  ADDITIONAL_INFO = "Additional information: Press `Ctrl+C` to exit."
16
16
  EXIT_MESSAGE = "See you. Bye!"
@@ -1,15 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clox
3
- Version: 0.9
3
+ Version: 1.0
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.9
6
+ Download-URL: https://github.com/sepandhaghighi/clox/tarball/v1.0
7
7
  Author: Sepand Haghighi
8
8
  Author-email: me@sepand.tech
9
9
  License: MIT
10
10
  Project-URL: Source, https://github.com/sepandhaghighi/clox
11
11
  Keywords: clock time timer timezone terminal cli geek clox
12
- Classifier: Development Status :: 4 - Beta
12
+ Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Natural Language :: English
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
@@ -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 0.9](https://github.com/sepandhaghighi/clox/archive/v0.9.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
107
+ - Download [Version 1.0](https://github.com/sepandhaghighi/clox/archive/v1.0.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==0.9`
113
+ - `pip install clox==1.0`
114
114
 
115
115
 
116
116
  ## Usage
@@ -292,6 +292,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
292
292
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
293
293
 
294
294
  ## [Unreleased]
295
+ ## [1.0] - 2025-05-06
296
+ ### Added
297
+ - Local time
298
+ ### Changed
299
+ - `clox_info` function modified
300
+ - `run_clock` function modified
295
301
  ## [0.9] - 2025-04-14
296
302
  ### Added
297
303
  - Timezone difference
@@ -352,7 +358,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
352
358
  - `TIMEZONES.md`
353
359
  - `FACES.md`
354
360
 
355
- [Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.9...dev
361
+ [Unreleased]: https://github.com/sepandhaghighi/clox/compare/v1.0...dev
362
+ [1.0]: https://github.com/sepandhaghighi/clox/compare/v0.9...v1.0
356
363
  [0.9]: https://github.com/sepandhaghighi/clox/compare/v0.8...v0.9
357
364
  [0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
358
365
  [0.7]: https://github.com/sepandhaghighi/clox/compare/v0.6...v0.7
@@ -0,0 +1,12 @@
1
+ clox/__init__.py,sha256=gErclFSjUDschQpngWqOBGkBKt1jwd-Ww8B9iJmlU5s,108
2
+ clox/__main__.py,sha256=9oJYc1WXu4ZMrjKny_2-4Cgu46-VWHuE9xOqD1iJY0E,109
3
+ clox/functions.py,sha256=NocjRMBfVLOBXk7rTkNfiDqvlJ5roQFkEB947Gx1hbY,11313
4
+ clox/jcalendar.py,sha256=RvtTikECGI4LjDSi5qbJF9grz7to2__fgR98xnnvme8,13462
5
+ clox/params.py,sha256=4eEm2syVxmx2_HsOG6HweVToGuNOx3tJAB8bQKNNgGQ,1715
6
+ clox-1.0.dist-info/licenses/AUTHORS.md,sha256=lmtnd18MnfgB57jdvfJbC0JHN3iARf2Ov4pY5kPGJC8,242
7
+ clox-1.0.dist-info/licenses/LICENSE,sha256=WoAsqqZ_lNVBGdyxjwh7YnVNXKfOB-qYVrRhrn-e-_4,1072
8
+ clox-1.0.dist-info/METADATA,sha256=A4Jl_O1NYBkvXE4vrlsNUZpYv8SDeXhOOTudRuwBeWE,9913
9
+ clox-1.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
10
+ clox-1.0.dist-info/entry_points.txt,sha256=sP4Rmoe-DxYGjlF_Tld6nghbt_u-fK8h9ZUQFmO8TJs,45
11
+ clox-1.0.dist-info/top_level.txt,sha256=5DxGH-4VNfYkM8vbfngObh6-jpFEoSW4M90EvDGfhSw,5
12
+ clox-1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
clox-0.9.dist-info/RECORD DELETED
@@ -1,12 +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=E5-nMw4OlASGsuSUO3TvoD3J2E1y7QFsz5cVAwYOF5M,10838
4
- clox/jcalendar.py,sha256=RvtTikECGI4LjDSi5qbJF9grz7to2__fgR98xnnvme8,13462
5
- clox/params.py,sha256=fUTq-i9Lr2oHj7mwXvuW9NaBjWmou0MTiEqcdNR0wg4,1722
6
- clox-0.9.dist-info/licenses/AUTHORS.md,sha256=lmtnd18MnfgB57jdvfJbC0JHN3iARf2Ov4pY5kPGJC8,242
7
- clox-0.9.dist-info/licenses/LICENSE,sha256=WoAsqqZ_lNVBGdyxjwh7YnVNXKfOB-qYVrRhrn-e-_4,1072
8
- clox-0.9.dist-info/METADATA,sha256=pGZb1PCNl_wmayj6H6FzfdFjU1DoJNdBukRAG3Yx1RM,9713
9
- clox-0.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
10
- clox-0.9.dist-info/entry_points.txt,sha256=sP4Rmoe-DxYGjlF_Tld6nghbt_u-fK8h9ZUQFmO8TJs,45
11
- clox-0.9.dist-info/top_level.txt,sha256=5DxGH-4VNfYkM8vbfngObh6-jpFEoSW4M90EvDGfhSw,5
12
- clox-0.9.dist-info/RECORD,,
File without changes