pipeline-eds 0.2.24__py3-none-any.whl → 0.2.25__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.
- pipeline/pipeline-winreg-filler-based-on-filetype.py +122 -0
- {pipeline_eds-0.2.24.dist-info → pipeline_eds-0.2.25.dist-info}/METADATA +2 -2
- {pipeline_eds-0.2.24.dist-info → pipeline_eds-0.2.25.dist-info}/RECORD +6 -5
- {pipeline_eds-0.2.24.dist-info → pipeline_eds-0.2.25.dist-info}/LICENSE +0 -0
- {pipeline_eds-0.2.24.dist-info → pipeline_eds-0.2.25.dist-info}/WHEEL +0 -0
- {pipeline_eds-0.2.24.dist-info → pipeline_eds-0.2.25.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,122 @@
|
|
1
|
+
# mulch/reg_winreg.py
|
2
|
+
import os
|
3
|
+
from pathlib import Path
|
4
|
+
import platform
|
5
|
+
if platform.system() == "Windows":
|
6
|
+
import winreg
|
7
|
+
|
8
|
+
local_app_data = Path(os.environ['LOCALAPPDATA'])
|
9
|
+
mulch_dir = local_app_data / 'mulch'
|
10
|
+
mulch_dir.mkdir(parents=True, exist_ok=True)
|
11
|
+
call_script_mulch_workspace = mulch_dir / "call-mulch-workspace.ps1"
|
12
|
+
call_script_mulch_seed = mulch_dir / "call-mulch-seed.ps1"
|
13
|
+
icon_path = r"%LOCALAPPDATA%\mulch\mulch-icon.ico"
|
14
|
+
|
15
|
+
# Helper to delete a key tree safely
|
16
|
+
def delete_key_tree(root, sub_key):
|
17
|
+
try:
|
18
|
+
with winreg.OpenKey(root, sub_key, 0, winreg.KEY_READ | winreg.KEY_WRITE) as key:
|
19
|
+
# Recursively delete subkeys
|
20
|
+
i = 0
|
21
|
+
while True:
|
22
|
+
try:
|
23
|
+
sub = winreg.EnumKey(key, i)
|
24
|
+
delete_key_tree(key, sub)
|
25
|
+
except OSError:
|
26
|
+
break
|
27
|
+
i += 1
|
28
|
+
winreg.DeleteKey(root, sub_key)
|
29
|
+
except FileNotFoundError:
|
30
|
+
pass # Key doesn't exist, that's fine
|
31
|
+
|
32
|
+
# Helper to create a shell entry
|
33
|
+
def create_shell_entry(base_key, menu_key_path, display_name, command, icon=None, position="Top", command_flags=0):
|
34
|
+
# Create the main shell key
|
35
|
+
with winreg.CreateKey(base_key, menu_key_path) as key:
|
36
|
+
winreg.SetValueEx(key, '', 0, winreg.REG_SZ, display_name)
|
37
|
+
if icon:
|
38
|
+
winreg.SetValueEx(key, "Icon", 0, winreg.REG_SZ, icon)
|
39
|
+
winreg.SetValueEx(key, "Position", 0, winreg.REG_SZ, position)
|
40
|
+
winreg.SetValueEx(key, "CommandFlags", 0, winreg.REG_DWORD, command_flags)
|
41
|
+
|
42
|
+
# Create the command subkey
|
43
|
+
with winreg.CreateKey(base_key, f"{menu_key_path}\\command") as cmd_key:
|
44
|
+
winreg.SetValueEx(cmd_key, '', 0, winreg.REG_SZ, command)
|
45
|
+
|
46
|
+
def verify_registry():
|
47
|
+
base = winreg.HKEY_CURRENT_USER
|
48
|
+
classes_key = r"Software\Classes"
|
49
|
+
|
50
|
+
required_keys = [
|
51
|
+
r"Directory\Background\shell\mulch_workspace\command",
|
52
|
+
r"Directory\shell\mulch_workspace\command",
|
53
|
+
r"Directory\Background\shell\mulch_seed\command",
|
54
|
+
r"Directory\shell\mulch_seed\command"
|
55
|
+
]
|
56
|
+
|
57
|
+
missing = []
|
58
|
+
for k in required_keys:
|
59
|
+
try:
|
60
|
+
with winreg.OpenKey(base, classes_key + "\\" + k, 0, winreg.KEY_READ):
|
61
|
+
pass
|
62
|
+
except FileNotFoundError:
|
63
|
+
missing.append(k)
|
64
|
+
|
65
|
+
if missing:
|
66
|
+
raise RuntimeError(f"Registry keys missing after installation: {missing}")
|
67
|
+
|
68
|
+
|
69
|
+
def call():
|
70
|
+
# Base key for current user classes
|
71
|
+
base = winreg.HKEY_CURRENT_USER
|
72
|
+
classes_key = r"Software\Classes"
|
73
|
+
|
74
|
+
# Paths to remove if they exist
|
75
|
+
keys_to_remove = [
|
76
|
+
r"Directory\Background\shell\mulch_workspace",
|
77
|
+
r"Directory\shell\mulch_workspace",
|
78
|
+
r"Directory\Background\shell\mulch_seed",
|
79
|
+
r"Directory\shell\mulch_seed",
|
80
|
+
]
|
81
|
+
|
82
|
+
# Remove existing entries
|
83
|
+
for k in keys_to_remove:
|
84
|
+
delete_key_tree(winreg.OpenKey(base, classes_key, 0, winreg.KEY_WRITE), k)
|
85
|
+
|
86
|
+
# Background right-click, mulch workspace
|
87
|
+
background_command = f'powershell.exe -NoProfile -ExecutionPolicy Bypass -File "{call_script_mulch_workspace}" "%V"'
|
88
|
+
create_shell_entry(
|
89
|
+
base_key=winreg.OpenKey(base, classes_key, 0, winreg.KEY_WRITE),
|
90
|
+
menu_key_path=r"Directory\Background\shell\mulch_workspace",
|
91
|
+
display_name='mulch workspace',
|
92
|
+
command = background_command,
|
93
|
+
icon=icon_path)
|
94
|
+
|
95
|
+
# Folder right-click, mulch workspace
|
96
|
+
folder_command = f'powershell.exe -NoProfile -ExecutionPolicy Bypass -File "{call_script_mulch_workspace}" "%L"'
|
97
|
+
create_shell_entry(
|
98
|
+
base_key = winreg.OpenKey(base, classes_key, 0, winreg.KEY_WRITE),
|
99
|
+
menu_key_path=r"Directory\shell\mulch_workspace",
|
100
|
+
display_name='mulch workspace',
|
101
|
+
command=folder_command,
|
102
|
+
icon=icon_path)
|
103
|
+
|
104
|
+
# Background right-click, mulch seed
|
105
|
+
background_command = f'powershell.exe -NoProfile -ExecutionPolicy Bypass -File "{call_script_mulch_seed}" "%V"'
|
106
|
+
create_shell_entry(
|
107
|
+
base_key=winreg.OpenKey(base, classes_key, 0, winreg.KEY_WRITE),
|
108
|
+
menu_key_path=r"Directory\Background\shell\mulch_seed",
|
109
|
+
display_name='mulch seed',
|
110
|
+
command = background_command,
|
111
|
+
icon=icon_path)
|
112
|
+
|
113
|
+
# Folder right-click, mulch seed
|
114
|
+
folder_command = f'powershell.exe -NoProfile -ExecutionPolicy Bypass -File "{call_script_mulch_seed}" "%L"'
|
115
|
+
create_shell_entry(
|
116
|
+
base_key = winreg.OpenKey(base, classes_key, 0, winreg.KEY_WRITE),
|
117
|
+
menu_key_path=r"Directory\shell\mulch_seed",
|
118
|
+
display_name='mulch seed',
|
119
|
+
command=folder_command,
|
120
|
+
icon=icon_path)
|
121
|
+
|
122
|
+
print("Registry context menu entries removed and recreated successfully!")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pipeline-eds
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.25
|
4
4
|
Summary: The official API pipeline library for mulch-based projects. Key target: Emerson Ovation EDS REST API.
|
5
5
|
License: BSD-3
|
6
6
|
Author: George Clayton Bennett
|
@@ -15,7 +15,7 @@ Provides-Extra: windb
|
|
15
15
|
Requires-Dist: certifi (>=2025.1.31,<2026.0.0)
|
16
16
|
Requires-Dist: fastapi (>=0.116.1,<0.117.0)
|
17
17
|
Requires-Dist: matplotlib (>=3.10.6,<4.0.0)
|
18
|
-
Requires-Dist: mulch (>=0.2.
|
18
|
+
Requires-Dist: mulch (>=0.2.63,<0.3.0)
|
19
19
|
Requires-Dist: mysql-connector-python (>=9.3.0,<10.0.0)
|
20
20
|
Requires-Dist: pendulum (>=3.1.0,<4.0.0)
|
21
21
|
Requires-Dist: plotly (>=6.2.0,<7.0.0)
|
@@ -18,6 +18,7 @@ pipeline/install_appdata.py,sha256=DGemGRogMVAmFzqSKladfxgLQOslIHyul2Xxq34do8A,2
|
|
18
18
|
pipeline/logging_setup.py,sha256=CAqWfchscCdzJ63Wf1dC3QGRnFnQqBELxyTmPZxsxgs,1674
|
19
19
|
pipeline/pastehelpers.py,sha256=pkmtULW5Zk_-ffUDDp_VsGzruIjsNB1xAIPbb9jtofE,265
|
20
20
|
pipeline/philosophy.py,sha256=QskLEpY3uZn46oyH7rHekOXiC55JqW3raThxwxaiM5U,1919
|
21
|
+
pipeline/pipeline-winreg-filler-based-on-filetype.py,sha256=O94Pub3KyrABTZShvJEsrH_Q_okuX-wJzDKw-MR2jnI,5032
|
21
22
|
pipeline/plotbuffer.py,sha256=jCsFbT47TdR8Sq5tjj2JdhVELjRiebLPN7O4r2LjPeY,625
|
22
23
|
pipeline/points_loader.py,sha256=4OCGLiatbP3D5hixVnYcFGThvBRYt_bf5DhNGdGw_9k,519
|
23
24
|
pipeline/queriesmanager.py,sha256=iQRPZDnllhQ4_nI7764SgUCxA0Wy5-cA32y-7tR5vBE,5011
|
@@ -57,8 +58,8 @@ workspaces/eds_to_rjn/scripts/daemon_runner.py,sha256=gBCYrJ-FYPCTt_l5O07_YNrrGj
|
|
57
58
|
workspaces/eds_to_rjn/secrets/README.md,sha256=tWf2bhopA0C08C8ImtHNZoPde9ub-sLMjX6EMe7lyJw,600
|
58
59
|
workspaces/eds_to_rjn/secrets/secrets-example.yaml,sha256=qKGrKsKBC0ulDQRVbr1zkfNlr8WPWK4lg5GAvTqZ-T4,365
|
59
60
|
workspaces/eds_to_termux/..txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
|
-
pipeline_eds-0.2.
|
61
|
-
pipeline_eds-0.2.
|
62
|
-
pipeline_eds-0.2.
|
63
|
-
pipeline_eds-0.2.
|
64
|
-
pipeline_eds-0.2.
|
61
|
+
pipeline_eds-0.2.25.dist-info/entry_points.txt,sha256=jmU0FQ7-2AHXhKcj4TXPn61xLbHlycHA2lkDlRZT-pg,124
|
62
|
+
pipeline_eds-0.2.25.dist-info/LICENSE,sha256=LKdx0wS1t9vFZpbRhDg_iLQ6ny-XsXRwhKAoCfrF6iA,1501
|
63
|
+
pipeline_eds-0.2.25.dist-info/METADATA,sha256=Fy6R_D81m8bH4vFpXpvybbefdyPuBd8d1FU5MvPN2Xk,10028
|
64
|
+
pipeline_eds-0.2.25.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
65
|
+
pipeline_eds-0.2.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|