machineconfig 1.97__py3-none-any.whl → 2.0__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.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/cluster/cloud_manager.py +22 -26
- machineconfig/cluster/data_transfer.py +2 -2
- machineconfig/cluster/distribute.py +0 -2
- machineconfig/cluster/file_manager.py +4 -4
- machineconfig/cluster/job_params.py +1 -1
- machineconfig/cluster/loader_runner.py +8 -8
- machineconfig/cluster/remote_machine.py +4 -4
- machineconfig/cluster/script_execution.py +2 -2
- machineconfig/cluster/sessions_managers/archive/create_zellij_template.py +1 -1
- machineconfig/cluster/sessions_managers/enhanced_command_runner.py +23 -23
- machineconfig/cluster/sessions_managers/wt_local.py +78 -76
- machineconfig/cluster/sessions_managers/wt_local_manager.py +91 -91
- machineconfig/cluster/sessions_managers/wt_remote.py +39 -39
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +94 -91
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +56 -54
- machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +49 -49
- machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +18 -18
- machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +42 -42
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +36 -36
- machineconfig/cluster/sessions_managers/zellij_local.py +43 -46
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +139 -120
- machineconfig/cluster/sessions_managers/zellij_remote.py +35 -35
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +33 -33
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +15 -15
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +25 -26
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +49 -49
- machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +5 -5
- machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +15 -15
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +11 -11
- machineconfig/cluster/templates/utils.py +3 -3
- machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
- machineconfig/jobs/python/check_installations.py +8 -9
- machineconfig/jobs/python/python_cargo_build_share.py +2 -2
- machineconfig/jobs/python/vscode/link_ve.py +7 -7
- machineconfig/jobs/python/vscode/select_interpreter.py +7 -7
- machineconfig/jobs/python/vscode/sync_code.py +5 -5
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +2 -2
- machineconfig/jobs/python_custom_installers/dev/aider.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/brave.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +5 -5
- machineconfig/jobs/python_custom_installers/dev/code.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/cursor.py +9 -9
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +4 -4
- machineconfig/jobs/python_custom_installers/dev/espanso.py +4 -4
- machineconfig/jobs/python_custom_installers/dev/goes.py +4 -4
- machineconfig/jobs/python_custom_installers/dev/lvim.py +4 -4
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/redis.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +3 -3
- machineconfig/jobs/python_custom_installers/dev/winget.py +27 -27
- machineconfig/jobs/python_custom_installers/docker.py +3 -3
- machineconfig/jobs/python_custom_installers/gh.py +7 -7
- machineconfig/jobs/python_custom_installers/hx.py +1 -1
- machineconfig/jobs/python_custom_installers/warp-cli.py +3 -3
- machineconfig/jobs/python_generic_installers/config.json +412 -389
- machineconfig/jobs/python_windows_installers/dev/config.json +1 -1
- machineconfig/logger.py +50 -0
- machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
- machineconfig/profile/create.py +23 -16
- machineconfig/profile/create_hardlinks.py +8 -8
- machineconfig/profile/shell.py +41 -37
- machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/linux/devops +2 -2
- machineconfig/scripts/linux/fire +1 -0
- machineconfig/scripts/linux/fire_agents +0 -1
- machineconfig/scripts/linux/mcinit +1 -1
- machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_agents.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/ai/__pycache__/init.cpython-311.pyc +0 -0
- machineconfig/scripts/python/ai/__pycache__/mcinit.cpython-311.pyc +0 -0
- machineconfig/scripts/python/ai/chatmodes/Thinking-Beast-Mode.chatmode.md +337 -0
- machineconfig/scripts/python/ai/chatmodes/Ultimate-Transparent-Thinking-Beast-Mode.chatmode.md +644 -0
- machineconfig/scripts/python/ai/chatmodes/deepResearch.chatmode.md +81 -0
- machineconfig/scripts/python/ai/configs/.gemini/settings.json +81 -0
- machineconfig/scripts/python/ai/instructions/python/dev.instructions.md +45 -0
- machineconfig/scripts/python/ai/mcinit.py +103 -0
- machineconfig/scripts/python/ai/prompts/allLintersAndTypeCheckers.prompt.md +5 -0
- machineconfig/scripts/python/ai/prompts/research-report-skeleton.prompt.md +38 -0
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +47 -0
- machineconfig/scripts/python/archive/tmate_conn.py +5 -5
- machineconfig/scripts/python/archive/tmate_start.py +3 -3
- machineconfig/scripts/python/choose_wezterm_theme.py +2 -2
- machineconfig/scripts/python/cloud_copy.py +19 -18
- machineconfig/scripts/python/cloud_mount.py +9 -7
- machineconfig/scripts/python/cloud_repo_sync.py +11 -11
- machineconfig/scripts/python/cloud_sync.py +1 -1
- machineconfig/scripts/python/croshell.py +14 -14
- machineconfig/scripts/python/devops.py +6 -6
- machineconfig/scripts/python/devops_add_identity.py +8 -6
- machineconfig/scripts/python/devops_add_ssh_key.py +18 -18
- machineconfig/scripts/python/devops_backup_retrieve.py +13 -13
- machineconfig/scripts/python/devops_devapps_install.py +3 -3
- machineconfig/scripts/python/devops_update_repos.py +1 -1
- machineconfig/scripts/python/dotfile.py +2 -2
- machineconfig/scripts/python/fire_agents.py +183 -41
- machineconfig/scripts/python/fire_jobs.py +17 -17
- machineconfig/scripts/python/ftpx.py +2 -2
- machineconfig/scripts/python/gh_models.py +94 -94
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/cloud_helpers.py +3 -3
- machineconfig/scripts/python/helpers/helpers2.py +1 -1
- machineconfig/scripts/python/helpers/helpers4.py +8 -6
- machineconfig/scripts/python/helpers/helpers5.py +7 -7
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +1 -1
- machineconfig/scripts/python/mount_nfs.py +3 -2
- machineconfig/scripts/python/mount_nw_drive.py +4 -4
- machineconfig/scripts/python/mount_ssh.py +3 -2
- machineconfig/scripts/python/repos.py +8 -8
- machineconfig/scripts/python/scheduler.py +1 -1
- machineconfig/scripts/python/start_slidev.py +8 -7
- machineconfig/scripts/python/start_terminals.py +1 -1
- machineconfig/scripts/python/viewer.py +40 -40
- machineconfig/scripts/python/wifi_conn.py +65 -66
- machineconfig/scripts/python/wsl_windows_transfer.py +1 -1
- machineconfig/scripts/windows/mcinit.ps1 +1 -1
- machineconfig/settings/linters/.ruff.toml +2 -2
- machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +71 -71
- machineconfig/settings/shells/wt/settings.json +8 -8
- machineconfig/setup_linux/web_shortcuts/tmp.sh +2 -0
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +10 -7
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +9 -7
- machineconfig/utils/ai/browser_user_wrapper.py +5 -5
- machineconfig/utils/ai/generate_file_checklist.py +11 -12
- machineconfig/utils/ai/url2md.py +1 -1
- machineconfig/utils/cloud/onedrive/setup_oauth.py +4 -4
- machineconfig/utils/cloud/onedrive/transaction.py +129 -129
- machineconfig/utils/code.py +13 -6
- machineconfig/utils/installer.py +51 -53
- machineconfig/utils/installer_utils/installer_abc.py +21 -10
- machineconfig/utils/installer_utils/installer_class.py +42 -16
- machineconfig/utils/io_save.py +3 -15
- machineconfig/utils/options.py +10 -3
- machineconfig/utils/path.py +5 -0
- machineconfig/utils/path_reduced.py +201 -149
- machineconfig/utils/procs.py +23 -23
- machineconfig/utils/scheduling.py +11 -12
- machineconfig/utils/ssh.py +270 -0
- machineconfig/utils/terminal.py +180 -0
- machineconfig/utils/utils.py +1 -2
- machineconfig/utils/utils2.py +43 -0
- machineconfig/utils/utils5.py +163 -34
- machineconfig/utils/ve.py +2 -2
- {machineconfig-1.97.dist-info → machineconfig-2.0.dist-info}/METADATA +13 -8
- {machineconfig-1.97.dist-info → machineconfig-2.0.dist-info}/RECORD +163 -149
- machineconfig/cluster/self_ssh.py +0 -57
- machineconfig/scripts/python/ai/init.py +0 -56
- machineconfig/scripts/python/ai/rules/python/dev.md +0 -31
- {machineconfig-1.97.dist-info → machineconfig-2.0.dist-info}/WHEEL +0 -0
- {machineconfig-1.97.dist-info → machineconfig-2.0.dist-info}/top_level.txt +0 -0
|
@@ -26,16 +26,19 @@ def install_nerd_fonts():
|
|
|
26
26
|
# Step 1: download the required fonts that has all the glyphs and install them.
|
|
27
27
|
print("🔍 Downloading Nerd Fonts package...")
|
|
28
28
|
folder, _version_to_be_installed = Installer.from_dict(d=nerd_fonts, name="nerd_fonts").download(version=None)
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
print("🧹 Cleaning up unnecessary files...")
|
|
31
|
-
folder.search("*Windows*")
|
|
32
|
-
folder.search("*readme*")
|
|
33
|
-
folder.search("*LICENSE*")
|
|
34
|
-
|
|
31
|
+
[p.delete(sure=True) for p in folder.search("*Windows*")]
|
|
32
|
+
[p.delete(sure=True) for p in folder.search("*readme*")]
|
|
33
|
+
[p.delete(sure=True) for p in folder.search("*LICENSE*")]
|
|
34
|
+
|
|
35
35
|
print("⚙️ Installing fonts via PowerShell...")
|
|
36
|
-
file = PathExtended.tmpfile(suffix=".ps1")
|
|
36
|
+
file = PathExtended.tmpfile(suffix=".ps1")
|
|
37
|
+
file.parent.mkdir(parents=True, exist_ok=True)
|
|
38
|
+
content = LIBRARY_ROOT.joinpath("setup_windows/wt_and_pwsh/install_fonts.ps1").read_text(encoding="utf-8").replace(r".\fonts-to-be-installed", str(folder))
|
|
39
|
+
file.write_text(content, encoding="utf-8")
|
|
37
40
|
subprocess.run(rf"powershell.exe -executionpolicy Bypass -nologo -noninteractive -File {str(file)}", check=True)
|
|
38
|
-
|
|
41
|
+
|
|
39
42
|
print("🗑️ Cleaning up temporary files...")
|
|
40
43
|
folder.delete(sure=True)
|
|
41
44
|
print(f"\n✅ Nerd Fonts installation complete! ✅\n{'='*80}")
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
from machineconfig.utils.utils2 import randstr, read_json
|
|
5
5
|
from machineconfig.utils.path_reduced import P as PathExtended
|
|
6
6
|
from machineconfig.utils.io_save import save_json
|
|
7
|
-
import
|
|
7
|
+
import platform
|
|
8
8
|
from machineconfig.utils.utils import LIBRARY_ROOT
|
|
9
9
|
from uuid import uuid4
|
|
10
10
|
import os
|
|
@@ -24,7 +24,9 @@ All settings are available on GitHub: https://aka.ms/terminal-profiles-schema
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
console = Console()
|
|
27
|
-
|
|
27
|
+
system = platform.system() # Linux or Windows
|
|
28
|
+
|
|
29
|
+
assert system == 'Windows', 'This script is only for Windows.'
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
class TerminalSettings(object):
|
|
@@ -79,7 +81,7 @@ class TerminalSettings(object):
|
|
|
79
81
|
if nerd_font:
|
|
80
82
|
print("🔤 Setting PowerShell font to CaskaydiaCove Nerd Font...")
|
|
81
83
|
pwsh["font"] = dict(face="CaskaydiaCove Nerd Font") # because oh-my-posh uses glyphs from this font.
|
|
82
|
-
|
|
84
|
+
|
|
83
85
|
for idx, item in enumerate(self.profs):
|
|
84
86
|
if item["name"] == "PowerShell":
|
|
85
87
|
self.profs[idx].update(pwsh)
|
|
@@ -95,7 +97,7 @@ class TerminalSettings(object):
|
|
|
95
97
|
self.dat["defaultProfile"] = profile["guid"]
|
|
96
98
|
console.print(Panel("✅ PowerShell is now the default profile!", title="[bold blue]Terminal Settings[/bold blue]", border_style="blue"))
|
|
97
99
|
break
|
|
98
|
-
else:
|
|
100
|
+
else:
|
|
99
101
|
console.print(Panel("❌ PowerShell profile was not found in the list of profiles and therefore was not made the default.", title="[bold red]Terminal Settings[/bold red]", border_style="red"))
|
|
100
102
|
|
|
101
103
|
def add_croshell(self):
|
|
@@ -113,7 +115,7 @@ class TerminalSettings(object):
|
|
|
113
115
|
profile.update(croshell)
|
|
114
116
|
console.print(Panel("✅ Updated existing croshell profile", title="[bold blue]Terminal Settings[/bold blue]", border_style="blue"))
|
|
115
117
|
break
|
|
116
|
-
else:
|
|
118
|
+
else:
|
|
117
119
|
self.profs.append(croshell)
|
|
118
120
|
console.print(Panel("✅ Added new croshell profile", title="[bold blue]Terminal Settings[/bold blue]", border_style="blue"))
|
|
119
121
|
|
|
@@ -163,10 +165,10 @@ def main():
|
|
|
163
165
|
ts.add_croshell()
|
|
164
166
|
ts.add_ubuntu()
|
|
165
167
|
ts.standardize_profiles_order()
|
|
166
|
-
|
|
168
|
+
|
|
167
169
|
print("⌨️ Adding keyboard shortcut for pane zoom (ctrl+shift+z)...")
|
|
168
170
|
ts.dat['actions'].append({'command': 'togglePaneZoom', 'keys': 'ctrl+shift+z'})
|
|
169
|
-
|
|
171
|
+
|
|
170
172
|
ts.save_terminal_settings()
|
|
171
173
|
print(f"\n{'='*80}\n✨ WINDOWS TERMINAL SETUP COMPLETE ✨\n{'='*80}")
|
|
172
174
|
else:
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
|
|
18
18
|
# def _get_padding(text: str, padding_before: int = 2, padding_after: int = 1) -> str:
|
|
19
19
|
# """Calculate the padding needed to align the box correctly.
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
# Args:
|
|
22
22
|
# text: The text to pad
|
|
23
23
|
# padding_before: The space taken before the text (usually "║ ")
|
|
24
24
|
# padding_after: The space needed after the text (usually " ║")
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
# Returns:
|
|
27
27
|
# A string of spaces for padding
|
|
28
28
|
# """
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
# rprint("🔄 Initializing LLM model (llama3.1:8b)...")
|
|
42
42
|
# llm = ChatOllama(model="llama3.1:8b")
|
|
43
43
|
# rprint("✅ LLM model initialized")
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
# task_line1 = "🤖 Task: Open https://chat.openai.com/ and ask how many r's in"
|
|
46
46
|
# task_line2 = "rrraaararewey, use Thinking Button and type the answer"
|
|
47
47
|
# task_content = f"{task_line1}\n{task_line2}"
|
|
48
48
|
# rprint(Panel(task_content, title="Task", width=BOX_WIDTH))
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
# rprint("🚀 Creating and launching browser agent...")
|
|
51
51
|
# agent = Agent(
|
|
52
52
|
# task="open https://chat.openai.com/ and ask how many r's in rrraaararewey, use Thinking Button and type the answer",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
# rprint("🏃♂️ Running agent task...")
|
|
57
57
|
# await agent.run()
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
# # footer success box
|
|
60
60
|
# title = "✅ Browser automation task completed"
|
|
61
61
|
# rprint(Panel(title, title="Status", width=BOX_WIDTH))
|
|
@@ -18,50 +18,49 @@ def generate_file_checklist(repo_root: Union[str, Path], exclude_dirs: Optional[
|
|
|
18
18
|
if any(excl in filepath.parts for excl in actual_exclude_dirs) or any(filepath.match(f"**/{excl}/**") for excl in actual_exclude_dirs) or filepath.name == "__init__.py":
|
|
19
19
|
continue
|
|
20
20
|
py_files.append(filepath.relative_to(repo_root))
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
sh_files: List[Path] = []
|
|
23
23
|
for filepath in repo_root.glob('**/*.sh'):
|
|
24
24
|
if any(excl in filepath.parts for excl in actual_exclude_dirs) or any(filepath.match(f"**/{excl}/**") for excl in actual_exclude_dirs):
|
|
25
25
|
continue
|
|
26
26
|
sh_files.append(filepath.relative_to(repo_root))
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
py_files.sort()
|
|
29
29
|
sh_files.sort()
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
markdown_content: str = "# File Checklist\n\n"
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
markdown_content += "## Python Files\n\n"
|
|
34
34
|
for py_file in py_files:
|
|
35
35
|
markdown_content += f"- [ ] {py_file}\n"
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
markdown_content += "\n## Shell Script Files\n\n"
|
|
38
38
|
for sh_file in sh_files:
|
|
39
39
|
markdown_content += f"- [ ] {sh_file}\n"
|
|
40
40
|
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
Path(output_path).write_text(markdown_content, encoding="utf-8")
|
|
42
|
+
|
|
44
43
|
print(f"📋 Checklist generated at: {output_path}")
|
|
45
44
|
return output_path
|
|
46
45
|
|
|
47
46
|
|
|
48
47
|
def main() -> None:
|
|
49
48
|
import argparse
|
|
50
|
-
|
|
49
|
+
|
|
51
50
|
parser = argparse.ArgumentParser(description='Generate a markdown file with checkboxes for all .py and .sh files.')
|
|
52
51
|
parser.add_argument('--repo', '-r', type=str, default=str(Path.cwd()), help='Repository root path. Defaults to current working directory.')
|
|
53
52
|
parser.add_argument('--exclude', '-e', nargs='+', type=str,
|
|
54
53
|
help='Additional directories to exclude (by default excludes .venv, .git, __pycache__, build, dist, *.egg-info)')
|
|
55
|
-
|
|
54
|
+
|
|
56
55
|
args = parser.parse_args()
|
|
57
|
-
|
|
56
|
+
|
|
58
57
|
exclude_dirs: List[str] = ['.venv', '.git', '__pycache__', 'build', 'dist', '*.egg-info']
|
|
59
58
|
if args.exclude:
|
|
60
59
|
exclude_dirs.extend(args.exclude)
|
|
61
60
|
if args.repo == '':
|
|
62
61
|
print("Error: Repository path cannot be empty.")
|
|
63
62
|
return
|
|
64
|
-
|
|
63
|
+
|
|
65
64
|
output_path = generate_file_checklist(args.repo, exclude_dirs)
|
|
66
65
|
console = Console()
|
|
67
66
|
console.print(Panel(f"✅ SUCCESS | Markdown checklist generated successfully!\n📄 File Location: {output_path}", border_style="bold blue", expand=False))
|
machineconfig/utils/ai/url2md.py
CHANGED
|
@@ -38,7 +38,7 @@ except KeyboardInterrupt:
|
|
|
38
38
|
print("\n❌ Process interrupted by user, no URLs found.")
|
|
39
39
|
exit(1)
|
|
40
40
|
|
|
41
|
-
all_urls = urls_file.read_text().splitlines()
|
|
41
|
+
all_urls = urls_file.read_text(encoding="utf-8").splitlines()
|
|
42
42
|
relevant_urls = list(set(all_urls)) # remove duplicates
|
|
43
43
|
relevant_urls = [a_url for a_url in relevant_urls if not a_url.endswith(".css") and not a_url.endswith(".js") and not a_url.endswith(".png") and not a_url.endswith(".jpg") and not a_url.endswith(".jpeg") and not a_url.endswith(".gif")]
|
|
44
44
|
|
|
@@ -19,7 +19,7 @@ def main():
|
|
|
19
19
|
"""Main setup function."""
|
|
20
20
|
print("🔧 OneDrive OAuth Setup")
|
|
21
21
|
print("=" * 40)
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
# Check if environment variables are set
|
|
24
24
|
if CLIENT_ID == "your_client_id_here":
|
|
25
25
|
print("\n❌ ONEDRIVE_CLIENT_ID environment variable not set!")
|
|
@@ -42,15 +42,15 @@ def main():
|
|
|
42
42
|
print(" export ONEDRIVE_REDIRECT_URI='http://localhost:8080/callback'")
|
|
43
43
|
print("\n🔄 Then run this script again.")
|
|
44
44
|
return
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
print(f"✅ Client ID: {CLIENT_ID}")
|
|
47
47
|
print(f"✅ Redirect URI: {REDIRECT_URI}")
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
if CLIENT_SECRET and CLIENT_SECRET != "your_client_secret_here":
|
|
50
50
|
print("✅ Client Secret: [SET]")
|
|
51
51
|
else:
|
|
52
52
|
print("ℹ️ Client Secret: [NOT SET - Using public client mode]")
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
print("\n🚀 Starting OAuth setup...")
|
|
55
55
|
setup_oauth_authentication()
|
|
56
56
|
|