killtimer 0.3.2__py3-none-any.whl → 0.4.1__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.
- killtimer/main.py +9 -5
- {killtimer-0.3.2.dist-info → killtimer-0.4.1.dist-info}/METADATA +7 -4
- killtimer-0.4.1.dist-info/RECORD +8 -0
- {killtimer-0.3.2.dist-info → killtimer-0.4.1.dist-info}/WHEEL +1 -1
- killtimer-0.3.2.dist-info/RECORD +0 -8
- {killtimer-0.3.2.dist-info → killtimer-0.4.1.dist-info}/entry_points.txt +0 -0
killtimer/main.py
CHANGED
|
@@ -41,9 +41,9 @@ def parse_timedelta(time_delta_representation: str) -> datetime.timedelta:
|
|
|
41
41
|
@dataclass
|
|
42
42
|
class RuntimeConfiguration:
|
|
43
43
|
start_time: datetime.datetime
|
|
44
|
-
minimal_effort_duration: datetime.timedelta =
|
|
44
|
+
minimal_effort_duration: Optional[datetime.timedelta] = None
|
|
45
45
|
work_duration: datetime.timedelta = datetime.timedelta(hours=1)
|
|
46
|
-
overtime_duration: datetime.timedelta =
|
|
46
|
+
overtime_duration: Optional[datetime.timedelta] = None
|
|
47
47
|
title: Optional[str] = None
|
|
48
48
|
command_to_run: Optional[List[str]] = None
|
|
49
49
|
log_file_path: Optional[str] = None
|
|
@@ -59,7 +59,6 @@ def parse_configuration(args: [str]) -> RuntimeConfiguration:
|
|
|
59
59
|
parser.add_argument(
|
|
60
60
|
"-m", "--minimal-effort",
|
|
61
61
|
type=parse_timedelta,
|
|
62
|
-
default=RuntimeConfiguration.minimal_effort_duration,
|
|
63
62
|
metavar="duration",
|
|
64
63
|
help="Minimal work duration"
|
|
65
64
|
)
|
|
@@ -73,7 +72,6 @@ def parse_configuration(args: [str]) -> RuntimeConfiguration:
|
|
|
73
72
|
parser.add_argument(
|
|
74
73
|
"-o", "--overtime",
|
|
75
74
|
type=parse_timedelta,
|
|
76
|
-
default=RuntimeConfiguration.overtime_duration,
|
|
77
75
|
metavar="duration",
|
|
78
76
|
help="Overtime duration"
|
|
79
77
|
)
|
|
@@ -106,6 +104,11 @@ def parse_configuration(args: [str]) -> RuntimeConfiguration:
|
|
|
106
104
|
)
|
|
107
105
|
|
|
108
106
|
config = parser.parse_args(args)
|
|
107
|
+
if config.minimal_effort is None:
|
|
108
|
+
config.minimal_effort = 0.50 * config.work
|
|
109
|
+
|
|
110
|
+
if config.overtime is None:
|
|
111
|
+
config.overtime = 0.25 * config.work
|
|
109
112
|
|
|
110
113
|
if config.minimal_effort > config.work:
|
|
111
114
|
print("Minimal effort cannot take longer than actual work!")
|
|
@@ -127,7 +130,8 @@ def parse_configuration(args: [str]) -> RuntimeConfiguration:
|
|
|
127
130
|
|
|
128
131
|
|
|
129
132
|
notify = DesktopNotifier(app_name="Killtimer")
|
|
130
|
-
event_loop = asyncio.
|
|
133
|
+
event_loop = asyncio.new_event_loop()
|
|
134
|
+
asyncio.set_event_loop(event_loop)
|
|
131
135
|
|
|
132
136
|
console = Console()
|
|
133
137
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: killtimer
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Closes application after specified work interval
|
|
5
|
-
Home-page: https://github.com/idle-code/killtimer
|
|
6
5
|
License: GPL-3.0-or-later
|
|
7
6
|
Author: Paweł Żukowski
|
|
8
7
|
Author-email: p.z.idlecode@gmail.com
|
|
@@ -19,13 +18,17 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
-
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
25
|
Classifier: Topic :: Utilities
|
|
24
26
|
Requires-Dist: PyAudio (>=0.2.13,<0.3.0)
|
|
25
27
|
Requires-Dist: desktop-notifier (>=3.4.0,<4.0.0)
|
|
26
28
|
Requires-Dist: humanfriendly (>=10.0,<11.0)
|
|
27
29
|
Requires-Dist: pytimeparse (>=1.1.8,<2.0.0)
|
|
28
30
|
Requires-Dist: rich (>=12.4.3,<13.0.0)
|
|
31
|
+
Project-URL: Homepage, https://github.com/idle-code/killtimer
|
|
29
32
|
Description-Content-Type: text/markdown
|
|
30
33
|
|
|
31
34
|
# Killtimer - do more working less!
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
killtimer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
killtimer/alsa_utils.py,sha256=YR1s_SNo-bNq_UD4tRAYFpzVj_ueqi20IkxVV-_UrfE,461
|
|
3
|
+
killtimer/main.py,sha256=QZGDRXpkbQ_NmhPQfnQ3_I0h7kCaebciKPHVoRxhuTE,12060
|
|
4
|
+
killtimer/stats.py,sha256=BATTcJwVmuocmEMzGO6_Vie28bMJGOp8G5C5Oov-c3Y,4205
|
|
5
|
+
killtimer-0.4.1.dist-info/METADATA,sha256=YMzngsWtYXwume2Fn3da8w2-wHrYUcg-7U5KaSxqXHo,3489
|
|
6
|
+
killtimer-0.4.1.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
7
|
+
killtimer-0.4.1.dist-info/entry_points.txt,sha256=S7yMv0DVf7ZQ6Tbuc98Ni3TuBvCb9Dosv2hG7h3i3kU,86
|
|
8
|
+
killtimer-0.4.1.dist-info/RECORD,,
|
killtimer-0.3.2.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
killtimer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
killtimer/alsa_utils.py,sha256=YR1s_SNo-bNq_UD4tRAYFpzVj_ueqi20IkxVV-_UrfE,461
|
|
3
|
-
killtimer/main.py,sha256=M1LdA6j3u2hjCqTTsyF6cGFAMHGeOEAZKVveRFlmHd8,12000
|
|
4
|
-
killtimer/stats.py,sha256=BATTcJwVmuocmEMzGO6_Vie28bMJGOp8G5C5Oov-c3Y,4205
|
|
5
|
-
killtimer-0.3.2.dist-info/METADATA,sha256=WOxrGpsHz_j7Tut2HPZ6uZqYSfC_Hv4LW78qUcZ2T00,3321
|
|
6
|
-
killtimer-0.3.2.dist-info/entry_points.txt,sha256=S7yMv0DVf7ZQ6Tbuc98Ni3TuBvCb9Dosv2hG7h3i3kU,86
|
|
7
|
-
killtimer-0.3.2.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
|
8
|
-
killtimer-0.3.2.dist-info/RECORD,,
|
|
File without changes
|