dotctl 1.0.4__tar.gz → 1.0.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.
- {dotctl-1.0.4/src/dotctl.egg-info → dotctl-1.0.5}/PKG-INFO +1 -1
- {dotctl-1.0.4 → dotctl-1.0.5}/pyproject.toml +1 -1
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/activator.py +12 -2
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/arg_manager.py +8 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/handlers/hooks_handler.py +3 -2
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/main.py +2 -0
- {dotctl-1.0.4 → dotctl-1.0.5/src/dotctl.egg-info}/PKG-INFO +1 -1
- {dotctl-1.0.4 → dotctl-1.0.5}/LICENSE +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/README.md +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/setup.cfg +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/__init__.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/__init__.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/creator.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/exporter.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/importer.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/initializer.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/lister.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/remover.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/saver.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/switcher.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/actions/wiper.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/exception.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/handlers/__init__.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/handlers/config_handler.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/handlers/data_handler.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/handlers/git_handler.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/hooks/post_apply.sh +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/hooks/pre_apply.sh +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/paths.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/templates/__init__.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/templates/dev.yaml +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/templates/kde.yaml +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/templates/other.yaml +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/utils.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl/validators.py +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl.egg-info/SOURCES.txt +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl.egg-info/dependency_links.txt +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl.egg-info/entry_points.txt +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl.egg-info/requires.txt +0 -0
- {dotctl-1.0.4 → dotctl-1.0.5}/src/dotctl.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotctl
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: A powerful CLI tool to profile your OS by saving, applying, exporting, and importing system configurations as named profiles. Designed to manage dot files and service configurations in a centralized Git repository (local or remote), dotctl enables seamless system replication across machines. Supports pre/post hook scripts, making it ideal for setting up servers or desktops with consistent environments.
|
|
5
5
|
Author-email: Pankaj Jackson <pankajackson@live.co.uk>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dotctl"
|
|
7
|
-
version = "v1.0.
|
|
7
|
+
version = "v1.0.5"
|
|
8
8
|
description = "A powerful CLI tool to profile your OS by saving, applying, exporting, and importing system configurations as named profiles. Designed to manage dot files and service configurations in a centralized Git repository (local or remote), dotctl enables seamless system replication across machines. Supports pre/post hook scripts, making it ideal for setting up servers or desktops with consistent environments."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -23,6 +23,7 @@ class ActivatorProps:
|
|
|
23
23
|
skip_pre_hooks: bool
|
|
24
24
|
skip_post_hooks: bool
|
|
25
25
|
ignore_hook_errors: bool
|
|
26
|
+
hooks_timeout: int
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
activator_default_props = ActivatorProps(
|
|
@@ -33,6 +34,7 @@ activator_default_props = ActivatorProps(
|
|
|
33
34
|
skip_pre_hooks=False,
|
|
34
35
|
skip_post_hooks=False,
|
|
35
36
|
ignore_hook_errors=False,
|
|
37
|
+
hooks_timeout=60,
|
|
36
38
|
)
|
|
37
39
|
|
|
38
40
|
|
|
@@ -56,7 +58,11 @@ def apply(props: ActivatorProps) -> None:
|
|
|
56
58
|
|
|
57
59
|
config = conf_reader(config_file=Path(app_config_file))
|
|
58
60
|
if not props.skip_hooks and not props.skip_pre_hooks:
|
|
59
|
-
run_hooks(
|
|
61
|
+
run_hooks(
|
|
62
|
+
pre_apply_hooks=True,
|
|
63
|
+
ignore_errors=props.ignore_hook_errors,
|
|
64
|
+
timeout=props.hooks_timeout,
|
|
65
|
+
)
|
|
60
66
|
|
|
61
67
|
for name, section in config.save.items():
|
|
62
68
|
source_base_dir = profile_dir / name
|
|
@@ -79,5 +85,9 @@ def apply(props: ActivatorProps) -> None:
|
|
|
79
85
|
props.password = sudo_pass
|
|
80
86
|
|
|
81
87
|
if not props.skip_hooks and not props.skip_post_hooks:
|
|
82
|
-
run_hooks(
|
|
88
|
+
run_hooks(
|
|
89
|
+
post_apply_hooks=True,
|
|
90
|
+
ignore_errors=props.ignore_hook_errors,
|
|
91
|
+
timeout=props.hooks_timeout,
|
|
92
|
+
)
|
|
83
93
|
log("Profile saved successfully!")
|
|
@@ -219,6 +219,14 @@ def get_parser() -> argparse.ArgumentParser:
|
|
|
219
219
|
action="store_true",
|
|
220
220
|
help="Ignore hooks errors",
|
|
221
221
|
)
|
|
222
|
+
apply_parser.add_argument(
|
|
223
|
+
"--hooks-timeout",
|
|
224
|
+
required=False,
|
|
225
|
+
type=int,
|
|
226
|
+
help="Hook timeout in seconds",
|
|
227
|
+
metavar="<timeout>",
|
|
228
|
+
default=60,
|
|
229
|
+
)
|
|
222
230
|
|
|
223
231
|
# Export Parser
|
|
224
232
|
export_parser = subparsers.add_parser("export", help="Export profile")
|
|
@@ -94,17 +94,18 @@ def run_hooks(
|
|
|
94
94
|
pre_apply_hooks: bool = False,
|
|
95
95
|
post_apply_hooks: bool = False,
|
|
96
96
|
ignore_errors: bool = False,
|
|
97
|
+
timeout: int = 60,
|
|
97
98
|
):
|
|
98
99
|
if pre_apply_hooks:
|
|
99
100
|
log("Applying pre-apply hooks...")
|
|
100
101
|
script_file = app_hooks_dir_path / "pre_apply.sh"
|
|
101
102
|
run_shell_script(
|
|
102
|
-
script_file, timeout=
|
|
103
|
+
script_file, timeout=timeout, on_output=log, ignore_errors=ignore_errors
|
|
103
104
|
)
|
|
104
105
|
|
|
105
106
|
if post_apply_hooks:
|
|
106
107
|
log("Applying post-apply hooks...")
|
|
107
108
|
script_file = app_hooks_dir_path / "post_apply.sh"
|
|
108
109
|
run_shell_script(
|
|
109
|
-
script_file, timeout=
|
|
110
|
+
script_file, timeout=timeout, on_output=log, ignore_errors=ignore_errors
|
|
110
111
|
)
|
|
@@ -94,6 +94,7 @@ class DotCtl:
|
|
|
94
94
|
"skip_pre_hooks",
|
|
95
95
|
"skip_post_hooks",
|
|
96
96
|
"ignore_hook_errors",
|
|
97
|
+
"hooks_timeout",
|
|
97
98
|
)
|
|
98
99
|
apply(props)
|
|
99
100
|
|
|
@@ -173,6 +174,7 @@ def main():
|
|
|
173
174
|
"skip_pre_hooks": getattr(args, "skip_pre_hooks", False),
|
|
174
175
|
"skip_post_hooks": getattr(args, "skip_post_hooks", False),
|
|
175
176
|
"ignore_hook_errors": getattr(args, "ignore_hook_errors", False),
|
|
177
|
+
"hooks_timeout": getattr(args, "hooks_timeout", None),
|
|
176
178
|
"password": getattr(args, "password", None),
|
|
177
179
|
"details": getattr(args, "details", False),
|
|
178
180
|
"fetch": getattr(args, "fetch", False),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotctl
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: A powerful CLI tool to profile your OS by saving, applying, exporting, and importing system configurations as named profiles. Designed to manage dot files and service configurations in a centralized Git repository (local or remote), dotctl enables seamless system replication across machines. Supports pre/post hook scripts, making it ideal for setting up servers or desktops with consistent environments.
|
|
5
5
|
Author-email: Pankaj Jackson <pankajackson@live.co.uk>
|
|
6
6
|
License-Expression: MIT
|
|
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
|