mytimer 2.3__tar.gz → 2.5__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.
Files changed (60) hide show
  1. {mytimer-2.3 → mytimer-2.5}/CHANGELOG.md +32 -1
  2. {mytimer-2.3 → mytimer-2.5}/PKG-INFO +76 -7
  3. {mytimer-2.3 → mytimer-2.5}/README.md +40 -4
  4. {mytimer-2.3 → mytimer-2.5}/SECURITY.md +2 -2
  5. {mytimer-2.3 → mytimer-2.5}/dev-requirements.txt +2 -1
  6. mytimer-2.5/mytimer/__main__.py +7 -0
  7. {mytimer-2.3 → mytimer-2.5}/mytimer/functions.py +209 -66
  8. {mytimer-2.3 → mytimer-2.5}/mytimer/params.py +26 -1
  9. {mytimer-2.3 → mytimer-2.5}/mytimer.egg-info/PKG-INFO +76 -7
  10. mytimer-2.5/mytimer.egg-info/entry_points.txt +2 -0
  11. {mytimer-2.3 → mytimer-2.5}/mytimer.egg-info/requires.txt +1 -0
  12. {mytimer-2.3 → mytimer-2.5}/requirements.txt +1 -0
  13. {mytimer-2.3 → mytimer-2.5}/setup.py +4 -3
  14. mytimer-2.3/mytimer/__main__.py +0 -77
  15. mytimer-2.3/mytimer.egg-info/entry_points.txt +0 -2
  16. {mytimer-2.3 → mytimer-2.5}/AUTHORS.md +0 -0
  17. {mytimer-2.3 → mytimer-2.5}/FACES.md +0 -0
  18. {mytimer-2.3 → mytimer-2.5}/LICENSE +0 -0
  19. {mytimer-2.3 → mytimer-2.5}/MANIFEST.in +0 -0
  20. {mytimer-2.3 → mytimer-2.5}/PROGRAMS.md +0 -0
  21. {mytimer-2.3 → mytimer-2.5}/TONES.md +0 -0
  22. {mytimer-2.3 → mytimer-2.5}/mytimer/__init__.py +0 -0
  23. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/1.wav +0 -0
  24. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/10.wav +0 -0
  25. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/11.wav +0 -0
  26. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/12.wav +0 -0
  27. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/13.wav +0 -0
  28. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/14.wav +0 -0
  29. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/15.wav +0 -0
  30. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/16.wav +0 -0
  31. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/17.wav +0 -0
  32. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/18.wav +0 -0
  33. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/19.wav +0 -0
  34. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/2.wav +0 -0
  35. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/20.wav +0 -0
  36. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/21.wav +0 -0
  37. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/22.wav +0 -0
  38. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/23.wav +0 -0
  39. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/24.wav +0 -0
  40. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/25.wav +0 -0
  41. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/26.wav +0 -0
  42. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/27.wav +0 -0
  43. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/28.wav +0 -0
  44. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/29.wav +0 -0
  45. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/3.wav +0 -0
  46. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/30.wav +0 -0
  47. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/31.wav +0 -0
  48. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/32.wav +0 -0
  49. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/33.wav +0 -0
  50. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/34.wav +0 -0
  51. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/4.wav +0 -0
  52. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/5.wav +0 -0
  53. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/6.wav +0 -0
  54. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/7.wav +0 -0
  55. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/8.wav +0 -0
  56. {mytimer-2.3 → mytimer-2.5}/mytimer/sounds/9.wav +0 -0
  57. {mytimer-2.3 → mytimer-2.5}/mytimer.egg-info/SOURCES.txt +0 -0
  58. {mytimer-2.3 → mytimer-2.5}/mytimer.egg-info/dependency_links.txt +0 -0
  59. {mytimer-2.3 → mytimer-2.5}/mytimer.egg-info/top_level.txt +0 -0
  60. {mytimer-2.3 → mytimer-2.5}/setup.cfg +0 -0
@@ -5,6 +5,35 @@ 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
+ ## [2.5] - 2026-02-10
9
+ ### Added
10
+ - `--intensity` argument
11
+ - Light colors
12
+ ### Changed
13
+ - `README.md` updated
14
+ - Test system modified
15
+ - Background color bug fixed
16
+ - `set_color` function modified
17
+ - `set_bg_color` function modified
18
+ - `run_timer` function modified
19
+ - Arguments moved to `handle_args` function
20
+ - `main` function moved to `functions.py`
21
+ - `--set-on` flag bug fixed
22
+ - Screen record updated
23
+ ## [2.4] - 2025-12-04
24
+ ### Added
25
+ - `--color` argument
26
+ - `--bg-color` argument
27
+ ### Changed
28
+ - `load_program_params` function modified
29
+ - `pomodoro_timer` function modified
30
+ - `two_step_timer` function modified
31
+ - `select_timer_func` function renamed to `select_timer_function`
32
+ - `mytimer_info` function renamed to `print_mytimer_info`
33
+ - `run_timer` function modified
34
+ - `Python 3.14` added to `test.yml`
35
+ - `README.md` updated
36
+ - Test system modified
8
37
  ## [2.3] - 2025-07-17
9
38
  ### Added
10
39
  - 2 new programs
@@ -230,7 +259,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
230
259
  - Count-up mode
231
260
  - Alarm
232
261
 
233
- [Unreleased]: https://github.com/sepandhaghighi/mytimer/compare/v2.3...dev
262
+ [Unreleased]: https://github.com/sepandhaghighi/mytimer/compare/v2.5...dev
263
+ [2.5]: https://github.com/sepandhaghighi/mytimer/compare/v2.4...v2.5
264
+ [2.4]: https://github.com/sepandhaghighi/mytimer/compare/v2.3...v2.4
234
265
  [2.3]: https://github.com/sepandhaghighi/mytimer/compare/v2.2...v2.3
235
266
  [2.2]: https://github.com/sepandhaghighi/mytimer/compare/v2.1...v2.2
236
267
  [2.1]: https://github.com/sepandhaghighi/mytimer/compare/v2.0...v2.1
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mytimer
3
- Version: 2.3
3
+ Version: 2.5
4
4
  Summary: A Geeky Timer for Terminal Enthusiasts
5
5
  Home-page: https://github.com/sepandhaghighi/mytimer
6
- Download-URL: https://github.com/sepandhaghighi/mytimer/tarball/v2.3
6
+ Download-URL: https://github.com/sepandhaghighi/mytimer/tarball/v2.5
7
7
  Author: Sepand Haghighi
8
8
  Author-email: me@sepand.tech
9
9
  License: MIT
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
23
24
  Classifier: Intended Audience :: Developers
24
25
  Classifier: Intended Audience :: Education
25
26
  Classifier: Intended Audience :: End Users/Desktop
@@ -33,6 +34,7 @@ License-File: AUTHORS.md
33
34
  Requires-Dist: art>=5.3
34
35
  Requires-Dist: jdatetime>=3.8.2
35
36
  Requires-Dist: nava>=0.4
37
+ Requires-Dist: colorama>=0.4.5
36
38
  Dynamic: author
37
39
  Dynamic: author-email
38
40
  Dynamic: classifier
@@ -96,8 +98,8 @@ The main objective of <strong>MyTimer</strong> is to offer a minimalistic and di
96
98
  <table>
97
99
  <tr>
98
100
  <td align="center">Code Quality</td>
99
- <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer/badge" alt="CodeFactor" /></a></td>
100
- <td><a href="https://app.codacy.com/gh/sepandhaghighi/mytimer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/1bf28500431a498998ac79891cd79cda"/></a></td>
101
+ <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer/badge" alt="CodeFactor"></a></td>
102
+ <td><a href="https://app.codacy.com/gh/sepandhaghighi/mytimer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/1bf28500431a498998ac79891cd79cda"></a></td>
101
103
  </tr>
102
104
  </table>
103
105
 
@@ -105,13 +107,13 @@ The main objective of <strong>MyTimer</strong> is to offer a minimalistic and di
105
107
  ## Installation
106
108
 
107
109
  ### Source Code
108
- - Download [Version 2.3](https://github.com/sepandhaghighi/mytimer/archive/v2.3.zip) or [Latest Source](https://github.com/sepandhaghighi/mytimer/archive/dev.zip)
110
+ - Download [Version 2.5](https://github.com/sepandhaghighi/mytimer/archive/v2.5.zip) or [Latest Source](https://github.com/sepandhaghighi/mytimer/archive/dev.zip)
109
111
  - `pip install .`
110
112
 
111
113
  ### PyPI
112
114
 
113
115
  - Check [Python Packaging User Guide](https://packaging.python.org/installing/)
114
- - `pip install mytimer==2.3`
116
+ - `pip install mytimer==2.5`
115
117
 
116
118
 
117
119
  ## Usage
@@ -288,6 +290,42 @@ mytimer --program=black-tea
288
290
  mytimer --minute=7 --second=30 --message="Test message"
289
291
  ```
290
292
 
293
+ ### Color
294
+
295
+ ⚠️ This mode may not be supported on all systems
296
+
297
+ ℹ️ Valid choices: [`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `lightblack`, `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`, `lightwhite`]
298
+
299
+ ℹ️ The default color is `white`
300
+
301
+ ```console
302
+ mytimer --minute=7 --second=30 --color="red"
303
+ ```
304
+
305
+ ### Background Color
306
+
307
+ ⚠️ This mode may not be supported on all systems
308
+
309
+ ℹ️ Valid choices: [`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `lightblack`, `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`, `lightwhite`]
310
+
311
+ ℹ️ The default background color is `black`
312
+
313
+ ```console
314
+ mytimer --minute=7 --second=30 --bg-color="blue"
315
+ ```
316
+
317
+ ### Intensity
318
+
319
+ ⚠️ This mode may not be supported on all systems
320
+
321
+ ℹ️ Valid choices: [`normal`, `bright`, `dim`]
322
+
323
+ ℹ️ The default intensity is `normal`
324
+
325
+ ```console
326
+ mytimer --minute=7 --second=30 --intensity="bright"
327
+ ```
328
+
291
329
  ## Screen Record
292
330
 
293
331
  <div align="center">
@@ -374,6 +412,35 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
374
412
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
375
413
 
376
414
  ## [Unreleased]
415
+ ## [2.5] - 2026-02-10
416
+ ### Added
417
+ - `--intensity` argument
418
+ - Light colors
419
+ ### Changed
420
+ - `README.md` updated
421
+ - Test system modified
422
+ - Background color bug fixed
423
+ - `set_color` function modified
424
+ - `set_bg_color` function modified
425
+ - `run_timer` function modified
426
+ - Arguments moved to `handle_args` function
427
+ - `main` function moved to `functions.py`
428
+ - `--set-on` flag bug fixed
429
+ - Screen record updated
430
+ ## [2.4] - 2025-12-04
431
+ ### Added
432
+ - `--color` argument
433
+ - `--bg-color` argument
434
+ ### Changed
435
+ - `load_program_params` function modified
436
+ - `pomodoro_timer` function modified
437
+ - `two_step_timer` function modified
438
+ - `select_timer_func` function renamed to `select_timer_function`
439
+ - `mytimer_info` function renamed to `print_mytimer_info`
440
+ - `run_timer` function modified
441
+ - `Python 3.14` added to `test.yml`
442
+ - `README.md` updated
443
+ - Test system modified
377
444
  ## [2.3] - 2025-07-17
378
445
  ### Added
379
446
  - 2 new programs
@@ -599,7 +666,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
599
666
  - Count-up mode
600
667
  - Alarm
601
668
 
602
- [Unreleased]: https://github.com/sepandhaghighi/mytimer/compare/v2.3...dev
669
+ [Unreleased]: https://github.com/sepandhaghighi/mytimer/compare/v2.5...dev
670
+ [2.5]: https://github.com/sepandhaghighi/mytimer/compare/v2.4...v2.5
671
+ [2.4]: https://github.com/sepandhaghighi/mytimer/compare/v2.3...v2.4
603
672
  [2.3]: https://github.com/sepandhaghighi/mytimer/compare/v2.2...v2.3
604
673
  [2.2]: https://github.com/sepandhaghighi/mytimer/compare/v2.1...v2.2
605
674
  [2.1]: https://github.com/sepandhaghighi/mytimer/compare/v2.0...v2.1
@@ -45,8 +45,8 @@ The main objective of <strong>MyTimer</strong> is to offer a minimalistic and di
45
45
  <table>
46
46
  <tr>
47
47
  <td align="center">Code Quality</td>
48
- <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer/badge" alt="CodeFactor" /></a></td>
49
- <td><a href="https://app.codacy.com/gh/sepandhaghighi/mytimer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/1bf28500431a498998ac79891cd79cda"/></a></td>
48
+ <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer/badge" alt="CodeFactor"></a></td>
49
+ <td><a href="https://app.codacy.com/gh/sepandhaghighi/mytimer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/1bf28500431a498998ac79891cd79cda"></a></td>
50
50
  </tr>
51
51
  </table>
52
52
 
@@ -54,13 +54,13 @@ The main objective of <strong>MyTimer</strong> is to offer a minimalistic and di
54
54
  ## Installation
55
55
 
56
56
  ### Source Code
57
- - Download [Version 2.3](https://github.com/sepandhaghighi/mytimer/archive/v2.3.zip) or [Latest Source](https://github.com/sepandhaghighi/mytimer/archive/dev.zip)
57
+ - Download [Version 2.5](https://github.com/sepandhaghighi/mytimer/archive/v2.5.zip) or [Latest Source](https://github.com/sepandhaghighi/mytimer/archive/dev.zip)
58
58
  - `pip install .`
59
59
 
60
60
  ### PyPI
61
61
 
62
62
  - Check [Python Packaging User Guide](https://packaging.python.org/installing/)
63
- - `pip install mytimer==2.3`
63
+ - `pip install mytimer==2.5`
64
64
 
65
65
 
66
66
  ## Usage
@@ -237,6 +237,42 @@ mytimer --program=black-tea
237
237
  mytimer --minute=7 --second=30 --message="Test message"
238
238
  ```
239
239
 
240
+ ### Color
241
+
242
+ ⚠️ This mode may not be supported on all systems
243
+
244
+ ℹ️ Valid choices: [`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `lightblack`, `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`, `lightwhite`]
245
+
246
+ ℹ️ The default color is `white`
247
+
248
+ ```console
249
+ mytimer --minute=7 --second=30 --color="red"
250
+ ```
251
+
252
+ ### Background Color
253
+
254
+ ⚠️ This mode may not be supported on all systems
255
+
256
+ ℹ️ Valid choices: [`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `lightblack`, `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`, `lightwhite`]
257
+
258
+ ℹ️ The default background color is `black`
259
+
260
+ ```console
261
+ mytimer --minute=7 --second=30 --bg-color="blue"
262
+ ```
263
+
264
+ ### Intensity
265
+
266
+ ⚠️ This mode may not be supported on all systems
267
+
268
+ ℹ️ Valid choices: [`normal`, `bright`, `dim`]
269
+
270
+ ℹ️ The default intensity is `normal`
271
+
272
+ ```console
273
+ mytimer --minute=7 --second=30 --intensity="bright"
274
+ ```
275
+
240
276
  ## Screen Record
241
277
 
242
278
  <div align="center">
@@ -4,8 +4,8 @@
4
4
 
5
5
  | Version | Supported |
6
6
  | ------------- | ------------------ |
7
- | 2.3 | :white_check_mark: |
8
- | < 2.3 | :x: |
7
+ | 2.5 | :white_check_mark: |
8
+ | < 2.5 | :x: |
9
9
 
10
10
  ## Reporting a Vulnerability
11
11
 
@@ -1,6 +1,7 @@
1
- nava==0.7
1
+ nava==0.8
2
2
  art==6.5
3
3
  jdatetime==5.2.0
4
+ colorama==0.4.6
4
5
  setuptools>=40.8.0
5
6
  vulture>=1.0
6
7
  bandit>=1.5.1
@@ -0,0 +1,7 @@
1
+ # -*- coding: utf-8 -*-
2
+ """mytimer main."""
3
+ from mytimer.functions import main
4
+
5
+
6
+ if __name__ == "__main__":
7
+ main()
@@ -9,10 +9,11 @@ import jdatetime
9
9
  import random
10
10
  import argparse
11
11
  from nava import play
12
+ from colorama import Fore, Back, Style
12
13
  from mytimer.params import INPUT_ERROR_MESSAGE, SOUND_ERROR_MESSAGE
13
14
  from mytimer.params import INPUT_EXAMPLE, TIME_ELEMENTS, MESSAGE_TEMPLATE
14
15
  from mytimer.params import FACES_MAP, PROGRAMS_MAP, BREAKS_MAP, TONES_MAP
15
- from mytimer.params import MY_TIMER_VERSION, PROGRAMS_LIST_TEMPLATE
16
+ from mytimer.params import MY_TIMER_VERSION, PROGRAMS_LIST_TEMPLATE, EXIT_MESSAGE
16
17
  from mytimer.params import FACES_LIST_EXAMPLE_MESSAGE
17
18
  from mytimer.params import DEFAULT_PARAMS, PROGRAMS_DEFAULTS, BREAKS_DEFAULTS
18
19
  from mytimer.params import NEXT_PROGRAM_MESSAGE, END_ROUND_MESSAGE
@@ -22,6 +23,9 @@ from mytimer.params import MY_TIMER_OVERVIEW, MY_TIMER_REPO
22
23
  from mytimer.params import TIME_HMS_TEMPLATE_HORIZONTAL, TIME_HM_TEMPLATE_HORIZONTAL
23
24
  from mytimer.params import TIME_HMS_TEMPLATE_VERTICAL, TIME_HM_TEMPLATE_VERTICAL
24
25
  from mytimer.params import CLOCK_FORMAT, DATE_FORMAT
26
+ from mytimer.params import FACES_LIST, TONES_LIST
27
+ from mytimer.params import ADDITIONAL_INFO, SIGNS_LIST
28
+ from mytimer.params import DATE_SYSTEMS_LIST, COLORS_LIST, INTENSITY_LIST
25
29
  from art import tprint
26
30
 
27
31
 
@@ -38,15 +42,15 @@ def print_message(
38
42
  :param h_shift: horizontal shift
39
43
  :param confirm: confirm flag
40
44
  """
41
- func = print
45
+ function = print
42
46
  if confirm:
43
- func = input
47
+ function = input
44
48
  print('\n' * v_shift, end='')
45
- func(h_shift * " " + message)
49
+ function(h_shift * " " + message)
46
50
 
47
51
 
48
- def mytimer_info() -> None:
49
- """Print mytimer details."""
52
+ def print_mytimer_info() -> None:
53
+ """Print mytimer info."""
50
54
  tprint("MyTimer")
51
55
  tprint("V:" + MY_TIMER_VERSION)
52
56
  print(MY_TIMER_OVERVIEW)
@@ -61,16 +65,16 @@ def load_program_params(program_name: str, is_break: bool = False) -> Dict[str,
61
65
  :param is_break: break flag
62
66
  """
63
67
  program_params = dict()
64
- ref_map = PROGRAMS_MAP
65
- ref_defaults = PROGRAMS_DEFAULTS
68
+ reference_map = PROGRAMS_MAP
69
+ reference_defaults = PROGRAMS_DEFAULTS
66
70
  if is_break:
67
- ref_map = BREAKS_MAP
68
- ref_defaults = BREAKS_DEFAULTS
71
+ reference_map = BREAKS_MAP
72
+ reference_defaults = BREAKS_DEFAULTS
69
73
  for item in DEFAULT_PARAMS:
70
- if item in ref_map[program_name]:
71
- program_params[item] = ref_map[program_name][item]
72
- elif item in ref_defaults:
73
- program_params[item] = ref_defaults[item]
74
+ if item in reference_map[program_name]:
75
+ program_params[item] = reference_map[program_name][item]
76
+ elif item in reference_defaults:
77
+ program_params[item] = reference_defaults[item]
74
78
  else:
75
79
  program_params[item] = DEFAULT_PARAMS[item]
76
80
  return program_params
@@ -131,11 +135,11 @@ def load_params(args: argparse.Namespace, program: str = None, is_break: bool =
131
135
  return params
132
136
 
133
137
 
134
- def input_handler(func: Callable) -> Callable:
138
+ def input_handler(function: Callable) -> Callable:
135
139
  """
136
140
  Input handler decorator for timer functions.
137
141
 
138
- :param func: input function
142
+ :param function: input function
139
143
  """
140
144
  def inner_function(
141
145
  hour: int,
@@ -189,7 +193,7 @@ def input_handler(func: Callable) -> Callable:
189
193
  if minute >= 60:
190
194
  hour += minute // 60
191
195
  minute %= 60
192
- func(
196
+ function(
193
197
  hour,
194
198
  minute,
195
199
  second,
@@ -230,6 +234,43 @@ def get_face(index: int) -> str:
230
234
  return FACES_MAP[index]
231
235
 
232
236
 
237
+ def set_color(color: str) -> None:
238
+ """
239
+ Set text color.
240
+
241
+ :param color: color name
242
+ """
243
+ if color:
244
+ color = color.strip().upper()
245
+ if color.startswith("LIGHT"):
246
+ color += "_EX"
247
+ print(getattr(Fore, color, ""), end="")
248
+
249
+
250
+ def set_bg_color(bg_color: str) -> None:
251
+ """
252
+ Set background color.
253
+
254
+ :param bg_color: background color name
255
+ """
256
+ if bg_color:
257
+ bg_color = bg_color.strip().upper()
258
+ if bg_color.startswith("LIGHT"):
259
+ bg_color += "_EX"
260
+ print(getattr(Back, bg_color, ""))
261
+
262
+
263
+ def set_intensity(intensity: str) -> None:
264
+ """
265
+ Set text intensity.
266
+
267
+ :param intensity: intensity name
268
+ """
269
+ if intensity:
270
+ intensity = intensity.strip().upper()
271
+ print(getattr(Style, intensity, ""), end="")
272
+
273
+
233
274
  def get_tone(index: int) -> str:
234
275
  """
235
276
  Return tone file name.
@@ -466,14 +507,14 @@ def countdown_timer(
466
507
 
467
508
 
468
509
  def pomodoro_timer(
469
- timer_func: Callable,
510
+ timer_function: Callable,
470
511
  params: Dict[str, Any],
471
512
  long_break_params: Dict[str, Any],
472
513
  short_break_params: Dict[str, Any]) -> None:
473
514
  """
474
515
  Pomodoro timer function.
475
516
 
476
- :param timer_func: timer function
517
+ :param timer_function: timer function
477
518
  :param params: program params
478
519
  :param long_break_params: long break params
479
520
  :param short_break_params: short break params
@@ -482,29 +523,29 @@ def pomodoro_timer(
482
523
  for index in range(4):
483
524
  work_params = params.copy()
484
525
  work_params["message"] += " {round}/{repeat}".format(round=index + 1, repeat=4)
485
- timer_func(**work_params)
526
+ timer_function(**work_params)
486
527
  if index == 3:
487
528
  break
488
529
  print_message(message=NEXT_PROGRAM_MESSAGE.format(next_program="Short break"), h_shift=h_shift, confirm=True)
489
- timer_func(**short_break_params)
530
+ timer_function(**short_break_params)
490
531
  print_message(message=NEXT_PROGRAM_MESSAGE.format(
491
532
  next_program="Work {round}/{repeat}".format(round=index + 2, repeat=4)), h_shift=h_shift, confirm=True)
492
533
  print_message(message=NEXT_PROGRAM_MESSAGE.format(next_program="Long break"), h_shift=h_shift, confirm=True)
493
- timer_func(**long_break_params)
534
+ timer_function(**long_break_params)
494
535
 
495
536
 
496
- def two_step_timer(timer_func: Callable, params1: Dict[str, Any], params2: Dict[str, Any]) -> None:
537
+ def two_step_timer(timer_function: Callable, params1: Dict[str, Any], params2: Dict[str, Any]) -> None:
497
538
  """
498
539
  Two step timer function.
499
540
 
500
- :param timer_func: timer function
541
+ :param timer_function: timer function
501
542
  :param params1: program-1 params
502
543
  :param params2: program-2 params
503
544
  """
504
545
  h_shift = params1["h_shift"]
505
- timer_func(**params1)
546
+ timer_function(**params1)
506
547
  print_message(message=NEXT_PROGRAM_MESSAGE.format(next_program="Break"), h_shift=h_shift, confirm=True)
507
- timer_func(**params2)
548
+ timer_function(**params2)
508
549
 
509
550
 
510
551
  def keep_on_timer(params: Dict[str, Any]) -> None:
@@ -547,39 +588,156 @@ def update_set_on_params(params: Dict[str, Any]) -> Dict[str, Any]:
547
588
  return params
548
589
 
549
590
 
550
- def select_timer_func(args: argparse.Namespace, params: Dict[str, Any]) -> Tuple[Callable, Dict[str, Any]]:
591
+ def select_timer_function(args: argparse.Namespace, params: Dict[str, Any]) -> Tuple[Callable, Dict[str, Any]]:
551
592
  """
552
593
  Select timer function and parameters.
553
594
 
554
595
  :param args: input arguments
555
596
  :param params: timer params
556
597
  """
557
- timer_func = countdown_timer
598
+ timer_function = countdown_timer
558
599
  if args.countup:
559
- timer_func = countup_timer
600
+ timer_function = countup_timer
560
601
  if args.countdown:
561
- timer_func = countdown_timer
602
+ timer_function = countdown_timer
562
603
  else:
563
604
  if check_null_time(args) and not args.program:
564
605
  params["hour"] = KEEP_ON_MAX
565
- timer_func = countup_timer
566
- return timer_func, params
567
-
568
-
569
- def run_timer(args: argparse.Namespace) -> None:
606
+ timer_function = countup_timer
607
+ return timer_function, params
608
+
609
+
610
+ def handle_args() -> argparse.Namespace:
611
+ """Handle CLI arguments."""
612
+ parser = argparse.ArgumentParser()
613
+ parser.epilog = ADDITIONAL_INFO
614
+ parser.add_argument('--minute', help='minute', type=int)
615
+ parser.add_argument('--second', help='second', type=int)
616
+ parser.add_argument('--hour', help='hour', type=int)
617
+ parser.add_argument('--message', help='message', type=str)
618
+ parser.add_argument(
619
+ '--face',
620
+ help='face',
621
+ type=int,
622
+ choices=FACES_LIST)
623
+ parser.add_argument(
624
+ '--color',
625
+ help='text color',
626
+ type=str.lower,
627
+ choices=COLORS_LIST)
628
+ parser.add_argument(
629
+ '--bg-color',
630
+ help='background color',
631
+ type=str.lower,
632
+ choices=COLORS_LIST)
633
+ parser.add_argument(
634
+ '--intensity',
635
+ help='text intensity',
636
+ type=str.lower,
637
+ choices=INTENSITY_LIST)
638
+ parser.add_argument(
639
+ '--tone',
640
+ help='alarm tone',
641
+ type=int,
642
+ choices=TONES_LIST)
643
+ parser.add_argument(
644
+ '--program',
645
+ help='program',
646
+ type=str.lower,
647
+ choices=sorted(PROGRAMS_MAP))
648
+ parser.add_argument(
649
+ '--sign',
650
+ help='timer sign',
651
+ type=str,
652
+ choices=SIGNS_LIST)
653
+ parser.add_argument('--alarm-repeat', help='alarm repeat', type=int)
654
+ parser.add_argument('--v-shift', help='vertical shift', type=int)
655
+ parser.add_argument('--h-shift', help='horizontal shift', type=int)
656
+ parser.add_argument('--repeat', help='number of repeats', type=int, default=1)
657
+ parser.add_argument(
658
+ '--countdown',
659
+ help='countdown timer',
660
+ nargs="?",
661
+ const=1)
662
+ parser.add_argument('--countup', help='countup timer', nargs="?", const=1)
663
+ parser.add_argument('--alarm', help='alarm', nargs="?", const=1)
664
+ parser.add_argument('--keep-on', help='keep-on', nargs="?", const=1)
665
+ parser.add_argument('--set-on', help='set-on', nargs="?", const=1)
666
+ parser.add_argument('--test-tone', help='test tone', nargs="?", const=1)
667
+ parser.add_argument('--faces-list', help='faces list', nargs="?", const=1)
668
+ parser.add_argument('--version', help='version', nargs="?", const=1)
669
+ parser.add_argument('--info', help='info', nargs="?", const=1)
670
+ parser.add_argument('--hide-second', help='hide second', nargs="?", const=1)
671
+ parser.add_argument('--hide-datetime', help='hide datetime', nargs="?", const=1)
672
+ parser.add_argument('--vertical', help='vertical mode', nargs="?", const=1)
673
+ parser.add_argument(
674
+ '--date-system',
675
+ help='date system',
676
+ type=str.lower,
677
+ choices=DATE_SYSTEMS_LIST,
678
+ default="gregorian")
679
+ parser.add_argument(
680
+ '--programs-list',
681
+ help='programs list',
682
+ nargs="?",
683
+ const=1)
684
+ args = parser.parse_args()
685
+ return args
686
+
687
+
688
+ def run_timer(timer_function: Callable, params: Dict[str, dict], repeat: int, program: str, keep_on: bool) -> None:
570
689
  """
571
690
  Run timer.
572
691
 
573
- :param args: input arguments
692
+ :param timer_function: timer function
693
+ :param params: timer and breaks params
694
+ :param repeat: number of repeats
695
+ :param program: program name
696
+ :param keep_on: keep-on flag
574
697
  """
698
+ try:
699
+ timer_round = 1
700
+ while timer_round <= repeat or repeat == -1:
701
+ if program == "pomodoro":
702
+ pomodoro_timer(
703
+ timer_function,
704
+ params=params["timer"],
705
+ long_break_params=params["long_break"],
706
+ short_break_params=params["short_break"])
707
+ elif program in ["52-17", "112-26", "animedoro"]:
708
+ two_step_timer(timer_function, params1=params["timer"], params2=params["break"])
709
+ else:
710
+ timer_function(**params["timer"])
711
+ end_round_message = END_ROUND_MESSAGE.format(
712
+ round="{round}/{repeat}".format(round=timer_round, repeat=repeat))
713
+ if repeat == -1:
714
+ end_round_message = END_ROUND_MESSAGE.format(round=timer_round)
715
+ if timer_round < repeat or repeat == -1:
716
+ print_message(
717
+ message=end_round_message,
718
+ h_shift=params["timer"]["h_shift"],
719
+ confirm=True)
720
+ timer_round += 1
721
+ if keep_on:
722
+ keep_on_timer(params["timer"])
723
+ except (KeyboardInterrupt, EOFError):
724
+ print(EXIT_MESSAGE)
725
+
726
+
727
+ def main() -> None:
728
+ """CLI main function."""
729
+ args = handle_args()
730
+ set_color(color=args.color)
731
+ set_bg_color(bg_color=args.bg_color)
732
+ set_intensity(intensity=args.intensity)
575
733
  params = load_params(args)
576
- timer_func, params = select_timer_func(args, params)
577
- if args.set_on:
734
+ timer_function, params = select_timer_function(args, params)
735
+ if args.set_on and not args.program:
578
736
  params = update_set_on_params(params)
579
737
  if args.version:
580
738
  print(MY_TIMER_VERSION)
581
739
  elif args.info:
582
- mytimer_info()
740
+ print_mytimer_info()
583
741
  elif args.faces_list:
584
742
  show_faces_list()
585
743
  elif args.programs_list:
@@ -587,30 +745,15 @@ def run_timer(args: argparse.Namespace) -> None:
587
745
  elif args.test_tone:
588
746
  test_tone(params["tone"], params["alarm_repeat"])
589
747
  else:
590
- timer_round = 1
591
- while timer_round <= args.repeat or args.repeat == -1:
592
- if args.program == "pomodoro":
593
- short_break_params = load_params(args, program="pomodoro-short-break", is_break=True)
594
- long_break_params = load_params(args, program="pomodoro-long-break", is_break=True)
595
- pomodoro_timer(
596
- timer_func,
597
- params=params,
598
- long_break_params=long_break_params,
599
- short_break_params=short_break_params)
600
- elif args.program in ["52-17", "112-26", "animedoro"]:
601
- break_params = load_params(args, is_break=True)
602
- two_step_timer(timer_func, params1=params, params2=break_params)
603
- else:
604
- timer_func(**params)
605
- end_round_message = END_ROUND_MESSAGE.format(
606
- round="{round}/{repeat}".format(round=timer_round, repeat=args.repeat))
607
- if args.repeat == -1:
608
- end_round_message = END_ROUND_MESSAGE.format(round=timer_round)
609
- if timer_round < args.repeat or args.repeat == -1:
610
- print_message(
611
- message=end_round_message,
612
- h_shift=params["h_shift"],
613
- confirm=True)
614
- timer_round += 1
615
- if args.keep_on:
616
- keep_on_timer(params)
748
+ params_dict = {"timer": params}
749
+ if args.program == "pomodoro":
750
+ params_dict["short_break"] = load_params(args, program="pomodoro-short-break", is_break=True)
751
+ params_dict["long_break"] = load_params(args, program="pomodoro-long-break", is_break=True)
752
+ elif args.program in ["52-17", "112-26", "animedoro"]:
753
+ params_dict["break"] = load_params(args, is_break=True)
754
+ run_timer(
755
+ timer_function=timer_function,
756
+ params=params_dict,
757
+ repeat=args.repeat,
758
+ program=args.program,
759
+ keep_on=args.keep_on)
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """mytimer params."""
3
3
 
4
- MY_TIMER_VERSION = "2.3"
4
+ MY_TIMER_VERSION = "2.5"
5
5
  ADDITIONAL_INFO = "Additional information: Press `Ctrl+C` to exit."
6
6
  INPUT_ERROR_MESSAGE = "[Error] Wrong input"
7
7
  SOUND_ERROR_MESSAGE = "[Error] Unable to play sound"
@@ -359,3 +359,28 @@ FACES_LIST = [-1] + sorted(FACES_MAP)
359
359
  TONES_LIST = [-1] + sorted(TONES_MAP)
360
360
 
361
361
  DATE_SYSTEMS_LIST = ["gregorian", "jalali"]
362
+
363
+ COLORS_LIST = [
364
+ "black",
365
+ "red",
366
+ "green",
367
+ "yellow",
368
+ "blue",
369
+ "magenta",
370
+ "cyan",
371
+ "white",
372
+ "lightblack",
373
+ "lightred",
374
+ "lightgreen",
375
+ "lightyellow",
376
+ "lightblue",
377
+ "lightmagenta",
378
+ "lightcyan",
379
+ "lightwhite",
380
+ ]
381
+
382
+ INTENSITY_LIST = [
383
+ "normal",
384
+ "bright",
385
+ "dim",
386
+ ]
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mytimer
3
- Version: 2.3
3
+ Version: 2.5
4
4
  Summary: A Geeky Timer for Terminal Enthusiasts
5
5
  Home-page: https://github.com/sepandhaghighi/mytimer
6
- Download-URL: https://github.com/sepandhaghighi/mytimer/tarball/v2.3
6
+ Download-URL: https://github.com/sepandhaghighi/mytimer/tarball/v2.5
7
7
  Author: Sepand Haghighi
8
8
  Author-email: me@sepand.tech
9
9
  License: MIT
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
23
24
  Classifier: Intended Audience :: Developers
24
25
  Classifier: Intended Audience :: Education
25
26
  Classifier: Intended Audience :: End Users/Desktop
@@ -33,6 +34,7 @@ License-File: AUTHORS.md
33
34
  Requires-Dist: art>=5.3
34
35
  Requires-Dist: jdatetime>=3.8.2
35
36
  Requires-Dist: nava>=0.4
37
+ Requires-Dist: colorama>=0.4.5
36
38
  Dynamic: author
37
39
  Dynamic: author-email
38
40
  Dynamic: classifier
@@ -96,8 +98,8 @@ The main objective of <strong>MyTimer</strong> is to offer a minimalistic and di
96
98
  <table>
97
99
  <tr>
98
100
  <td align="center">Code Quality</td>
99
- <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer/badge" alt="CodeFactor" /></a></td>
100
- <td><a href="https://app.codacy.com/gh/sepandhaghighi/mytimer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/1bf28500431a498998ac79891cd79cda"/></a></td>
101
+ <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/mytimer/badge" alt="CodeFactor"></a></td>
102
+ <td><a href="https://app.codacy.com/gh/sepandhaghighi/mytimer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/1bf28500431a498998ac79891cd79cda"></a></td>
101
103
  </tr>
102
104
  </table>
103
105
 
@@ -105,13 +107,13 @@ The main objective of <strong>MyTimer</strong> is to offer a minimalistic and di
105
107
  ## Installation
106
108
 
107
109
  ### Source Code
108
- - Download [Version 2.3](https://github.com/sepandhaghighi/mytimer/archive/v2.3.zip) or [Latest Source](https://github.com/sepandhaghighi/mytimer/archive/dev.zip)
110
+ - Download [Version 2.5](https://github.com/sepandhaghighi/mytimer/archive/v2.5.zip) or [Latest Source](https://github.com/sepandhaghighi/mytimer/archive/dev.zip)
109
111
  - `pip install .`
110
112
 
111
113
  ### PyPI
112
114
 
113
115
  - Check [Python Packaging User Guide](https://packaging.python.org/installing/)
114
- - `pip install mytimer==2.3`
116
+ - `pip install mytimer==2.5`
115
117
 
116
118
 
117
119
  ## Usage
@@ -288,6 +290,42 @@ mytimer --program=black-tea
288
290
  mytimer --minute=7 --second=30 --message="Test message"
289
291
  ```
290
292
 
293
+ ### Color
294
+
295
+ ⚠️ This mode may not be supported on all systems
296
+
297
+ ℹ️ Valid choices: [`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `lightblack`, `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`, `lightwhite`]
298
+
299
+ ℹ️ The default color is `white`
300
+
301
+ ```console
302
+ mytimer --minute=7 --second=30 --color="red"
303
+ ```
304
+
305
+ ### Background Color
306
+
307
+ ⚠️ This mode may not be supported on all systems
308
+
309
+ ℹ️ Valid choices: [`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `lightblack`, `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`, `lightwhite`]
310
+
311
+ ℹ️ The default background color is `black`
312
+
313
+ ```console
314
+ mytimer --minute=7 --second=30 --bg-color="blue"
315
+ ```
316
+
317
+ ### Intensity
318
+
319
+ ⚠️ This mode may not be supported on all systems
320
+
321
+ ℹ️ Valid choices: [`normal`, `bright`, `dim`]
322
+
323
+ ℹ️ The default intensity is `normal`
324
+
325
+ ```console
326
+ mytimer --minute=7 --second=30 --intensity="bright"
327
+ ```
328
+
291
329
  ## Screen Record
292
330
 
293
331
  <div align="center">
@@ -374,6 +412,35 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
374
412
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
375
413
 
376
414
  ## [Unreleased]
415
+ ## [2.5] - 2026-02-10
416
+ ### Added
417
+ - `--intensity` argument
418
+ - Light colors
419
+ ### Changed
420
+ - `README.md` updated
421
+ - Test system modified
422
+ - Background color bug fixed
423
+ - `set_color` function modified
424
+ - `set_bg_color` function modified
425
+ - `run_timer` function modified
426
+ - Arguments moved to `handle_args` function
427
+ - `main` function moved to `functions.py`
428
+ - `--set-on` flag bug fixed
429
+ - Screen record updated
430
+ ## [2.4] - 2025-12-04
431
+ ### Added
432
+ - `--color` argument
433
+ - `--bg-color` argument
434
+ ### Changed
435
+ - `load_program_params` function modified
436
+ - `pomodoro_timer` function modified
437
+ - `two_step_timer` function modified
438
+ - `select_timer_func` function renamed to `select_timer_function`
439
+ - `mytimer_info` function renamed to `print_mytimer_info`
440
+ - `run_timer` function modified
441
+ - `Python 3.14` added to `test.yml`
442
+ - `README.md` updated
443
+ - Test system modified
377
444
  ## [2.3] - 2025-07-17
378
445
  ### Added
379
446
  - 2 new programs
@@ -599,7 +666,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
599
666
  - Count-up mode
600
667
  - Alarm
601
668
 
602
- [Unreleased]: https://github.com/sepandhaghighi/mytimer/compare/v2.3...dev
669
+ [Unreleased]: https://github.com/sepandhaghighi/mytimer/compare/v2.5...dev
670
+ [2.5]: https://github.com/sepandhaghighi/mytimer/compare/v2.4...v2.5
671
+ [2.4]: https://github.com/sepandhaghighi/mytimer/compare/v2.3...v2.4
603
672
  [2.3]: https://github.com/sepandhaghighi/mytimer/compare/v2.2...v2.3
604
673
  [2.2]: https://github.com/sepandhaghighi/mytimer/compare/v2.1...v2.2
605
674
  [2.1]: https://github.com/sepandhaghighi/mytimer/compare/v2.0...v2.1
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mytimer = mytimer.functions:main
@@ -1,3 +1,4 @@
1
1
  art>=5.3
2
2
  jdatetime>=3.8.2
3
3
  nava>=0.4
4
+ colorama>=0.4.5
@@ -1,3 +1,4 @@
1
1
  art>=5.3
2
2
  jdatetime>=3.8.2
3
3
  nava>=0.4
4
+ colorama>=0.4.5
@@ -30,7 +30,7 @@ def read_description() -> str:
30
30
  setup(
31
31
  name='mytimer',
32
32
  packages=['mytimer'],
33
- version='2.3',
33
+ version='2.5',
34
34
  description='A Geeky Timer 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/mytimer',
41
- download_url='https://github.com/sepandhaghighi/mytimer/tarball/v2.3',
41
+ download_url='https://github.com/sepandhaghighi/mytimer/tarball/v2.5',
42
42
  keywords="timer time clock terminal stopwatch cli geek",
43
43
  project_urls={
44
44
  'Source': 'https://github.com/sepandhaghighi/mytimer'
@@ -57,6 +57,7 @@ setup(
57
57
  'Programming Language :: Python :: 3.11',
58
58
  'Programming Language :: Python :: 3.12',
59
59
  'Programming Language :: Python :: 3.13',
60
+ 'Programming Language :: Python :: 3.14',
60
61
  'Intended Audience :: Developers',
61
62
  'Intended Audience :: Education',
62
63
  'Intended Audience :: End Users/Desktop',
@@ -67,7 +68,7 @@ setup(
67
68
  license='MIT',
68
69
  entry_points={
69
70
  'console_scripts': [
70
- 'mytimer = mytimer.__main__:main',
71
+ 'mytimer = mytimer.functions:main',
71
72
  ]
72
73
  }
73
74
  )
@@ -1,77 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """mytimer main."""
3
- from mytimer.params import FACES_LIST, PROGRAMS_MAP, TONES_LIST
4
- from mytimer.params import EXIT_MESSAGE, ADDITIONAL_INFO, SIGNS_LIST
5
- from mytimer.params import DATE_SYSTEMS_LIST
6
- from mytimer.functions import run_timer
7
- import argparse
8
-
9
-
10
- def main() -> None:
11
- """CLI main function."""
12
- parser = argparse.ArgumentParser()
13
- parser.epilog = ADDITIONAL_INFO
14
- parser.add_argument('--minute', help='minute', type=int)
15
- parser.add_argument('--second', help='second', type=int)
16
- parser.add_argument('--hour', help='hour', type=int)
17
- parser.add_argument('--message', help='message', type=str)
18
- parser.add_argument(
19
- '--face',
20
- help='face',
21
- type=int,
22
- choices=FACES_LIST)
23
- parser.add_argument(
24
- '--tone',
25
- help='alarm tone',
26
- type=int,
27
- choices=TONES_LIST)
28
- parser.add_argument(
29
- '--program',
30
- help='program',
31
- type=str.lower,
32
- choices=sorted(PROGRAMS_MAP))
33
- parser.add_argument(
34
- '--sign',
35
- help='timer sign',
36
- type=str,
37
- choices=SIGNS_LIST)
38
- parser.add_argument('--alarm-repeat', help='alarm repeat', type=int)
39
- parser.add_argument('--v-shift', help='vertical shift', type=int)
40
- parser.add_argument('--h-shift', help='horizontal shift', type=int)
41
- parser.add_argument('--repeat', help='number of repeats', type=int, default=1)
42
- parser.add_argument(
43
- '--countdown',
44
- help='countdown timer',
45
- nargs="?",
46
- const=1)
47
- parser.add_argument('--countup', help='countup timer', nargs="?", const=1)
48
- parser.add_argument('--alarm', help='alarm', nargs="?", const=1)
49
- parser.add_argument('--keep-on', help='keep-on', nargs="?", const=1)
50
- parser.add_argument('--set-on', help='set-on', nargs="?", const=1)
51
- parser.add_argument('--test-tone', help='test tone', nargs="?", const=1)
52
- parser.add_argument('--faces-list', help='faces list', nargs="?", const=1)
53
- parser.add_argument('--version', help='version', nargs="?", const=1)
54
- parser.add_argument('--info', help='info', nargs="?", const=1)
55
- parser.add_argument('--hide-second', help='hide second', nargs="?", const=1)
56
- parser.add_argument('--hide-datetime', help='hide datetime', nargs="?", const=1)
57
- parser.add_argument('--vertical', help='vertical mode', nargs="?", const=1)
58
- parser.add_argument(
59
- '--date-system',
60
- help='date system',
61
- type=str.lower,
62
- choices=DATE_SYSTEMS_LIST,
63
- default="gregorian")
64
- parser.add_argument(
65
- '--programs-list',
66
- help='programs list',
67
- nargs="?",
68
- const=1)
69
- args = parser.parse_args()
70
- try:
71
- run_timer(args)
72
- except (KeyboardInterrupt, EOFError):
73
- print(EXIT_MESSAGE)
74
-
75
-
76
- if __name__ == "__main__":
77
- main()
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- mytimer = mytimer.__main__:main
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
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
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
File without changes
File without changes
File without changes