crcutil 2.2.1__tar.gz → 2.2.2__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.
- {crcutil-2.2.1/src/crcutil.egg-info → crcutil-2.2.2}/PKG-INFO +9 -2
- {crcutil-2.2.1 → crcutil-2.2.2}/README.md +8 -1
- {crcutil-2.2.1 → crcutil-2.2.2}/pyproject.toml +1 -1
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/checksum.py +5 -2
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/keyboard_monitor_factory.py +35 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/util/path_ops.py +32 -1
- {crcutil-2.2.1 → crcutil-2.2.2/src/crcutil.egg-info}/PKG-INFO +9 -2
- {crcutil-2.2.1 → crcutil-2.2.2}/.github/workflows/python-publish.yml +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/.gitignore +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/LICENSE +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/git-hooks/commit-msg +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/git-hooks/pre-commit +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/init.sh +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/requirements.txt +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/ruff.toml +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/setup.cfg +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/__main__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/config/log_config.yaml +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/checksum_manager.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/keyboard_monitor.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/keyboard_monitor_darwin.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/keyboard_monitor_wayland.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/keyboard_monitor_windows.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/keyboard_monitor_x11.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/core/prompt.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/dto/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/dto/bootstrap_paths_dto.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/dto/checksum_dto.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/dto/crc_diff_report_dto.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/dto/user_instructions_dto.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/enums/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/enums/user_request.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/exception/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/exception/bootstrap_error.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/exception/corrupt_crc_error.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/exception/device_error.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/exception/unexpected_argument_error.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/exception/user_error.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/serializer/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/serializer/checksum_serializer.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/serializer/crc_diff_report_serializer.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/util/__init__.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/util/crcutil_logger.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/util/file_importer.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil/util/static.py +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil.egg-info/SOURCES.txt +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil.egg-info/dependency_links.txt +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil.egg-info/entry_points.txt +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil.egg-info/requires.txt +0 -0
- {crcutil-2.2.1 → crcutil-2.2.2}/src/crcutil.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crcutil
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Author-email: Carlos Florez <carlos@florez.co.uk>
|
|
5
5
|
Maintainer-email: Carlos Florez <carlos@florez.co.uk>
|
|
6
6
|
License: MIT License
|
|
@@ -71,6 +71,7 @@ Portable CRC32 Checksum Tool – Generate & Compare
|
|
|
71
71
|
* [pause/resume](#pauseresume)
|
|
72
72
|
* [Logs](#logs)
|
|
73
73
|
* [Development](#development)
|
|
74
|
+
* [Known Issues](#known-issues)
|
|
74
75
|
|
|
75
76
|
## Installation
|
|
76
77
|
> [!NOTE]
|
|
@@ -153,7 +154,7 @@ crcutil diff -l 'C:\crc1.json' 'C:\crc2.json' -o 'C:\diff.json'
|
|
|
153
154
|
> Logs can be found in:
|
|
154
155
|
> - Windows -> C:\Users\User\Documents\crcutil\log
|
|
155
156
|
> - Linux -> $XDG_STATE_HOME/crcutil/log
|
|
156
|
-
> - MacOS ->
|
|
157
|
+
> - MacOS -> ~/Library/Application Support/crcutil/log
|
|
157
158
|
|
|
158
159
|
## Development
|
|
159
160
|
|
|
@@ -163,3 +164,9 @@ crcutil diff -l 'C:\crc1.json' 'C:\crc2.json' -o 'C:\diff.json'
|
|
|
163
164
|
```bash
|
|
164
165
|
source init.sh
|
|
165
166
|
```
|
|
167
|
+
|
|
168
|
+
## Known Issues
|
|
169
|
+
|
|
170
|
+
- Playback controls on remote graphical sessions (NX, VNC, RDP, etc...) are not currently supported.
|
|
171
|
+
|
|
172
|
+
|
|
@@ -25,6 +25,7 @@ Portable CRC32 Checksum Tool – Generate & Compare
|
|
|
25
25
|
* [pause/resume](#pauseresume)
|
|
26
26
|
* [Logs](#logs)
|
|
27
27
|
* [Development](#development)
|
|
28
|
+
* [Known Issues](#known-issues)
|
|
28
29
|
|
|
29
30
|
## Installation
|
|
30
31
|
> [!NOTE]
|
|
@@ -107,7 +108,7 @@ crcutil diff -l 'C:\crc1.json' 'C:\crc2.json' -o 'C:\diff.json'
|
|
|
107
108
|
> Logs can be found in:
|
|
108
109
|
> - Windows -> C:\Users\User\Documents\crcutil\log
|
|
109
110
|
> - Linux -> $XDG_STATE_HOME/crcutil/log
|
|
110
|
-
> - MacOS ->
|
|
111
|
+
> - MacOS -> ~/Library/Application Support/crcutil/log
|
|
111
112
|
|
|
112
113
|
## Development
|
|
113
114
|
|
|
@@ -117,3 +118,9 @@ crcutil diff -l 'C:\crc1.json' 'C:\crc2.json' -o 'C:\diff.json'
|
|
|
117
118
|
```bash
|
|
118
119
|
source init.sh
|
|
119
120
|
```
|
|
121
|
+
|
|
122
|
+
## Known Issues
|
|
123
|
+
|
|
124
|
+
- Playback controls on remote graphical sessions (NX, VNC, RDP, etc...) are not currently supported.
|
|
125
|
+
|
|
126
|
+
|
|
@@ -181,6 +181,7 @@ class Checksum:
|
|
|
181
181
|
sample = f.read(8192)
|
|
182
182
|
|
|
183
183
|
# Empty file, treat as empty text
|
|
184
|
+
# Does not enter here if file not in text_extensions
|
|
184
185
|
if not sample and extension in text_extensions:
|
|
185
186
|
return True
|
|
186
187
|
|
|
@@ -199,5 +200,7 @@ class Checksum:
|
|
|
199
200
|
if ascii_lower_range <= byte <= ascii_upper_range
|
|
200
201
|
or byte in (tab, line_feed, carriage_return)
|
|
201
202
|
)
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
printable_character_threshold = 0.8
|
|
204
|
+
if printable_count <= 0:
|
|
205
|
+
return False
|
|
206
|
+
return (printable_count / len(sample)) > printable_character_threshold
|
|
@@ -27,15 +27,50 @@ class KeyboardMonitorFactory(Static):
|
|
|
27
27
|
return KeyboardMonitorWindows()
|
|
28
28
|
|
|
29
29
|
elif system == "Darwin":
|
|
30
|
+
import ctypes # noqa:PLC0415
|
|
31
|
+
|
|
32
|
+
app_services = ctypes.cdll.LoadLibrary(
|
|
33
|
+
"/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices"
|
|
34
|
+
)
|
|
35
|
+
accesibility_access = app_services.AXIsProcessTrusted() == 1
|
|
36
|
+
if not accesibility_access:
|
|
37
|
+
description = (
|
|
38
|
+
"Terminal does not have accesibility access. "
|
|
39
|
+
"To enable playback controls on MacOS: "
|
|
40
|
+
"https://github.com/florez-carlos/"
|
|
41
|
+
"crcutil#macos"
|
|
42
|
+
)
|
|
43
|
+
raise DeviceError(description)
|
|
44
|
+
|
|
30
45
|
from crcutil.core.keyboard_monitor_darwin import ( # noqa:PLC0415
|
|
31
46
|
KeyboardMonitorDarwin,
|
|
32
47
|
)
|
|
33
48
|
|
|
34
49
|
return KeyboardMonitorDarwin()
|
|
35
50
|
elif system == "Linux":
|
|
51
|
+
import getpass # noqa:PLC0415
|
|
52
|
+
import grp # noqa:PLC0415
|
|
53
|
+
import pwd # noqa:PLC0415
|
|
54
|
+
|
|
36
55
|
session = os.getenv("XDG_SESSION_TYPE") or ""
|
|
37
56
|
|
|
38
57
|
if session.startswith("wayland"):
|
|
58
|
+
username = getpass.getuser()
|
|
59
|
+
user = pwd.getpwnam(username)
|
|
60
|
+
groups = [
|
|
61
|
+
g.gr_name
|
|
62
|
+
for g in grp.getgrall()
|
|
63
|
+
if username in g.gr_mem or g.gr_gid == user.pw_gid
|
|
64
|
+
]
|
|
65
|
+
if "input" not in groups:
|
|
66
|
+
description = (
|
|
67
|
+
"user not assigned to input group. "
|
|
68
|
+
"To enable playback controls on wayland: "
|
|
69
|
+
"https://github.com/florez-carlos/"
|
|
70
|
+
"crcutil#linux-wayland"
|
|
71
|
+
)
|
|
72
|
+
raise DeviceError(description)
|
|
73
|
+
|
|
39
74
|
from crcutil.core.keyboard_monitor_wayland import ( # noqa:PLC0415
|
|
40
75
|
KeyboardMonitorWayland,
|
|
41
76
|
)
|
|
@@ -37,12 +37,18 @@ class PathOps(Static):
|
|
|
37
37
|
)
|
|
38
38
|
items = []
|
|
39
39
|
try:
|
|
40
|
+
if path.is_symlink():
|
|
41
|
+
description = f"{PathOps.WARNING} Ignoring symlink: {path!s}"
|
|
42
|
+
if not supress_warnings:
|
|
43
|
+
CrcutilLogger.get_console_logger().warning(description)
|
|
44
|
+
return items
|
|
45
|
+
|
|
40
46
|
if path.is_file():
|
|
41
47
|
items.append(path)
|
|
42
48
|
elif path.is_dir():
|
|
43
49
|
items.append(path)
|
|
44
50
|
for child in path.iterdir():
|
|
45
|
-
sub_items = PathOps.walk(child)
|
|
51
|
+
sub_items = PathOps.walk(child, supress_warnings)
|
|
46
52
|
items.extend(sub_items)
|
|
47
53
|
|
|
48
54
|
except PermissionError:
|
|
@@ -61,6 +67,31 @@ class PathOps(Static):
|
|
|
61
67
|
CrcutilLogger.get_console_logger().warning(description)
|
|
62
68
|
debug = "POSIX permission denied"
|
|
63
69
|
CrcutilLogger.get_logger().debug(debug)
|
|
70
|
+
elif e.errno == errno.ENAMETOOLONG:
|
|
71
|
+
parts = path.parts
|
|
72
|
+
truncated_path_str = ""
|
|
73
|
+
|
|
74
|
+
if len(parts) == 1:
|
|
75
|
+
truncated_path_str = "".join([parts[0]])
|
|
76
|
+
elif len(parts) == 2: # noqa: PLR2004
|
|
77
|
+
truncated_path_str = "".join([parts[0], parts[1]])
|
|
78
|
+
elif len(parts) == 3: # noqa: PLR2004
|
|
79
|
+
truncated_path_str = "".join(
|
|
80
|
+
[parts[0], parts[1], parts[2]]
|
|
81
|
+
)
|
|
82
|
+
elif len(parts) > 3: # noqa: PLR2004
|
|
83
|
+
truncated_path_str = "".join(
|
|
84
|
+
[parts[0], parts[1], "...", parts[-1]]
|
|
85
|
+
)
|
|
86
|
+
description = (
|
|
87
|
+
f"{PathOps.WARNING} Path too long to evaluate: "
|
|
88
|
+
f"{truncated_path_str}"
|
|
89
|
+
)
|
|
90
|
+
debug = f"Path too long to evaluate: {truncated_path_str}"
|
|
91
|
+
CrcutilLogger.get_logger().debug(debug)
|
|
92
|
+
|
|
93
|
+
if not supress_warnings:
|
|
94
|
+
CrcutilLogger.get_console_logger().warning(description)
|
|
64
95
|
else:
|
|
65
96
|
description = (
|
|
66
97
|
f"{PathOps.WARNING} Unexpected error, "
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crcutil
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Author-email: Carlos Florez <carlos@florez.co.uk>
|
|
5
5
|
Maintainer-email: Carlos Florez <carlos@florez.co.uk>
|
|
6
6
|
License: MIT License
|
|
@@ -71,6 +71,7 @@ Portable CRC32 Checksum Tool – Generate & Compare
|
|
|
71
71
|
* [pause/resume](#pauseresume)
|
|
72
72
|
* [Logs](#logs)
|
|
73
73
|
* [Development](#development)
|
|
74
|
+
* [Known Issues](#known-issues)
|
|
74
75
|
|
|
75
76
|
## Installation
|
|
76
77
|
> [!NOTE]
|
|
@@ -153,7 +154,7 @@ crcutil diff -l 'C:\crc1.json' 'C:\crc2.json' -o 'C:\diff.json'
|
|
|
153
154
|
> Logs can be found in:
|
|
154
155
|
> - Windows -> C:\Users\User\Documents\crcutil\log
|
|
155
156
|
> - Linux -> $XDG_STATE_HOME/crcutil/log
|
|
156
|
-
> - MacOS ->
|
|
157
|
+
> - MacOS -> ~/Library/Application Support/crcutil/log
|
|
157
158
|
|
|
158
159
|
## Development
|
|
159
160
|
|
|
@@ -163,3 +164,9 @@ crcutil diff -l 'C:\crc1.json' 'C:\crc2.json' -o 'C:\diff.json'
|
|
|
163
164
|
```bash
|
|
164
165
|
source init.sh
|
|
165
166
|
```
|
|
167
|
+
|
|
168
|
+
## Known Issues
|
|
169
|
+
|
|
170
|
+
- Playback controls on remote graphical sessions (NX, VNC, RDP, etc...) are not currently supported.
|
|
171
|
+
|
|
172
|
+
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|