machineconfig 3.95__py3-none-any.whl → 3.97__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.

@@ -240,28 +240,18 @@ def execute_installations(selected_options: list[str]) -> None:
240
240
  def main() -> None:
241
241
  """Main function to run the interactive installation."""
242
242
  display_header()
243
-
244
- # Get user selections
245
- selected_options = get_installation_choices()
246
-
243
+ selected_options = get_installation_choices()
247
244
  if not selected_options:
248
245
  console.print("❌ No options selected. Exiting...", style="bold red")
249
246
  sys.exit(0)
250
-
251
247
  console.print(f"\n✅ Selected options: {', '.join(selected_options)}", style="bold green")
252
-
253
- # Confirm before proceeding
254
- proceed = questionary.confirm("🚀 Proceed with installation?", default=True).ask()
255
-
248
+ proceed = questionary.confirm("🚀 Proceed with installation?", default=True).ask()
256
249
  if not proceed:
257
250
  console.print("❌ Installation cancelled.", style="bold red")
258
251
  sys.exit(0)
259
-
260
- # Execute installations
261
- execute_installations(selected_options)
262
-
252
+ execute_installations(selected_options)
263
253
  display_completion_message()
264
254
 
265
255
 
266
256
  if __name__ == "__main__":
267
- main()
257
+ pass
@@ -2,10 +2,15 @@
2
2
 
3
3
  from pathlib import Path
4
4
  from typing import Optional
5
- # import typer
5
+ import typer
6
+ from rich.console import Console
7
+ from rich.panel import Panel
8
+ from rich.text import Text
9
+ from rich.align import Align
6
10
 
7
11
 
8
12
  """
13
+ uv run --python 3.13 --with machineconfig
9
14
  reference:
10
15
  # https://github.com/tsl0922/ttyd/wiki/Serving-web-fonts
11
16
  # -t "fontFamily=CaskaydiaCove" bash
@@ -14,7 +19,36 @@ reference:
14
19
  """
15
20
 
16
21
 
17
- def share_terminal(port: int, password: Optional[str]) -> None:
22
+ def display_terminal_url(local_ip_v4: str, port: int) -> None:
23
+ """Display a flashy, unmissable terminal URL announcement."""
24
+ console = Console()
25
+
26
+ # Create the main message with styling
27
+ url_text = Text(f"http://{local_ip_v4}:{port}", style="bold bright_cyan underline")
28
+ message = Text.assemble(
29
+ ("🚀 ", "bright_red"),
30
+ ("Terminal is now accessible at: ", "bright_white bold"),
31
+ url_text,
32
+ (" 🚀", "bright_red")
33
+ )
34
+
35
+ # Create a fancy panel with borders and styling
36
+ panel = Panel(
37
+ Align.center(message),
38
+ title="[bold bright_green]🌐 WEB TERMINAL READY 🌐[/bold bright_green]",
39
+ subtitle="[italic bright_yellow]⚡ Click the link above to access your terminal! ⚡[/italic bright_yellow]",
40
+ border_style="bright_magenta",
41
+ padding=(1, 2),
42
+ expand=False
43
+ )
44
+
45
+ # Print with extra spacing and attention-grabbing elements
46
+ console.print("\n" + "🔥" * 60 + "\n", style="bright_red bold")
47
+ console.print(panel)
48
+ console.print("🔥" * 60 + "\n", style="bright_red bold")
49
+
50
+
51
+ def main(port: Optional[int]=None, password: Optional[str]=None) -> None:
18
52
  if password is None:
19
53
  pwd_path = Path.home().joinpath("dotfiles/creds/passwords/quick_password")
20
54
  if pwd_path.exists():
@@ -22,20 +56,30 @@ def share_terminal(port: int, password: Optional[str]) -> None:
22
56
  else:
23
57
  raise ValueError("Password not provided and default password file does not exist.")
24
58
 
59
+ if port is None:
60
+ port = 7681 # Default port for ttyd
61
+
25
62
  import socket
26
63
  s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
27
64
  s.connect(('8.8.8.8',80))
28
65
  local_ip_v4 = s.getsockname()[0]
29
66
  s.close()
30
67
 
31
- print(f"\n🌐 Access your terminal at: http://{local_ip_v4}:{port}\n")
68
+ # Display the flashy terminal announcement
69
+ display_terminal_url(local_ip_v4, port)
32
70
 
33
71
  code = f"""
34
72
  #!/bin/bash
35
73
  uv run --python 3.13 --with machineconfig install -ttyd
36
-
37
74
  ttyd --writable -t enableSixel=true --port {port} --credential "$USER:{password}" -t 'theme={"background": "black"}' bash
38
-
39
75
  """
40
76
  import subprocess
41
77
  subprocess.run(code, shell=True, check=True)
78
+
79
+
80
+ def main_with_parser():
81
+ typer.run(main)
82
+
83
+
84
+ if __name__ == "__main__":
85
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 3.95
3
+ Version: 3.97
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -162,6 +162,7 @@ machineconfig/scripts/python/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_
162
162
  machineconfig/scripts/python/ftpx.py,sha256=l_gdJS0QB2wVZErubtZvm4HJD9HZAJxSP68sbY73xwo,10278
163
163
  machineconfig/scripts/python/get_zellij_cmd.py,sha256=e35-18hoXM9N3PFbvbizfkNY_-63iMicieWE3TbGcCQ,576
164
164
  machineconfig/scripts/python/gh_models.py,sha256=3BLfW25mBRiPO5VKtVm-nMlKLv-PaZDw7mObajq6F6M,5538
165
+ machineconfig/scripts/python/interactive.py,sha256=wSGhhsVFFLd8ElaPqaLJzKgUoYolkvAVFk9I8oTptlk,11079
165
166
  machineconfig/scripts/python/mount_nfs.py,sha256=c8pWXimDWdgCkSskcnPgT-8ESPosil6Cvy2hGSaIBJE,3359
166
167
  machineconfig/scripts/python/mount_nw_drive.py,sha256=iru6AtnTyvyuk6WxlK5R4lDkuliVpPV5_uBTVVhXtjQ,1550
167
168
  machineconfig/scripts/python/mount_ssh.py,sha256=rGY2pgtlnWMi0Rrge1aCdjtfbULrj2cyaStDoX-y2w4,2236
@@ -173,7 +174,7 @@ machineconfig/scripts/python/repos_helper_clone.py,sha256=xW5YZEoNt3k7h9NIULhUhO
173
174
  machineconfig/scripts/python/repos_helper_record.py,sha256=YEEQORfEiLddOIIgePo5eEkyQUFruFg3kc8npMvRL-o,10927
174
175
  machineconfig/scripts/python/repos_helper_update.py,sha256=AYyKIB7eQ48yoYmFjydIhRI1lV39TBv_S4_LCa-oKuQ,11042
175
176
  machineconfig/scripts/python/scheduler.py,sha256=rKhssuxkD697EY6qaV6CSdNhxpAQLDWO4fE8GMCQ9FA,3061
176
- machineconfig/scripts/python/share_terminal.py,sha256=divO0lleaX1l90ta4muv_ogUB7zfdDCFxbTSmVIZqJw,1116
177
+ machineconfig/scripts/python/share_terminal.py,sha256=QkzxEqvGZG29heiFByB4JrT21UvG8qyYhwG2JIgR_hw,2551
177
178
  machineconfig/scripts/python/snapshot.py,sha256=aDvKeoniZaeTSNv9zWBUajaj2yagAxVdfuvO1_tgq5Y,1026
178
179
  machineconfig/scripts/python/start_slidev.py,sha256=U5ujAL7R5Gd5CzFReTsnF2SThjY91aFBg0Qz_MMl6U4,4573
179
180
  machineconfig/scripts/python/start_terminals.py,sha256=DRWbMZumhPmL0DvvsCsbRNFL5AVQn1SgaziafTio3YQ,6149
@@ -358,7 +359,6 @@ machineconfig/setup_linux/others/openssh-server_add_pub_key.sh,sha256=UiJcD1o4Ue
358
359
  machineconfig/setup_linux/web_shortcuts/android.sh,sha256=gzep6bBhK7FCBvGcXK0fdJCtkSfBOftt0aFyDZq_eMs,68
359
360
  machineconfig/setup_linux/web_shortcuts/ascii_art.sh,sha256=RWcxH_Db7WHH37PclYmc92o6zAS557wGZxcYTuyTUZ0,3550
360
361
  machineconfig/setup_linux/web_shortcuts/croshell.sh,sha256=X9-B1cVptbaFWaWTA-2ELNQx_2ktxu7ZVe48RvpCmkU,316
361
- machineconfig/setup_linux/web_shortcuts/interactive.py,sha256=z7-ZymdiQ5X3LLcB9KVxAsWqKsRf6R4e_gTAHXtbRQc,11189
362
362
  machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=DOv0iYsDgavKrBkzTZm6hcuwfYok_isg6KDNr5h3fjk,2178
363
363
  machineconfig/setup_linux/web_shortcuts/ssh.sh,sha256=k6BAY-zAWsi1beOMiZODxw4VOjZCTABZu__gxSET1eU,1924
364
364
  machineconfig/setup_windows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -401,8 +401,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=CCs5ebomW1ac
401
401
  machineconfig/utils/schemas/installer/installer_types.py,sha256=DLagmIe0G5-xg7HZ9VrlFCDk1gIbwvX7O4gZjwq0wh0,1326
402
402
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=M1ZFCz_kjRZPhxM19rIYUDR5lDDpwa09odR_ihtIFq0,1932
403
403
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
404
- machineconfig-3.95.dist-info/METADATA,sha256=hl-2jtRwoZ8Zbv9_cXqrzcoH_1_HMQ5ytRfxhI0dRoc,7032
405
- machineconfig-3.95.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
406
- machineconfig-3.95.dist-info/entry_points.txt,sha256=rSx_9gXd2stziS1OkNy__jF647hrRxRiF6zolLUELc4,1153
407
- machineconfig-3.95.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
408
- machineconfig-3.95.dist-info/RECORD,,
404
+ machineconfig-3.97.dist-info/METADATA,sha256=41d56Jx9vgeCV42fom4BZPQrRIj-yV3CRoMJondht1c,7032
405
+ machineconfig-3.97.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
406
+ machineconfig-3.97.dist-info/entry_points.txt,sha256=94GY2PC5gimDHncsCsa2RM-xDRVbWsp8a01p4YGDb2M,1282
407
+ machineconfig-3.97.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
408
+ machineconfig-3.97.dist-info/RECORD,,
@@ -9,11 +9,13 @@ devops = machineconfig.scripts.python.devops:args_parser
9
9
  fire = machineconfig.scripts.python.fire_jobs:main_from_parser
10
10
  fire_agents = machineconfig.scripts.python.fire_agents:main
11
11
  ftpx = machineconfig.scripts.python.ftpx:main_from_parser
12
+ ia = machineconfig.scripts.python.interactive:main
12
13
  initai = machineconfig.scripts.python.ai.initai:main
13
14
  install = machineconfig.scripts.python.devops_devapps_install:main_with_parser
14
15
  kill_process = machineconfig.utils.procs:main
15
16
  mount_nfs = machineconfig.scripts.python.mount_nfs:main
16
17
  mount_nw_drive = machineconfig.scripts.python.mount_nw_drive:main
17
18
  repos = machineconfig.scripts.python.repos:main_from_parser
19
+ share_terminal = machineconfig.scripts.python.share_terminal:main_with_parser
18
20
  start_slidev = machineconfig.scripts.python.start_slidev:arg_parser
19
21
  wifi_conn = machineconfig.scripts.python.wifi_conn:arg_parser