pywebexec 1.2.4__py3-none-any.whl → 1.2.6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pywebexec/pywebexec.py CHANGED
@@ -277,6 +277,8 @@ def parseargs():
277
277
  sys.exit(1)
278
278
  if not os.path.exists(COMMAND_STATUS_DIR):
279
279
  os.makedirs(COMMAND_STATUS_DIR)
280
+ if not os.path.exists(CONFDIR):
281
+ os.mkdir(CONFDIR, mode=0o700)
280
282
  if args.gencert:
281
283
  hostname = resolve_hostname(gethostname())
282
284
  args.cert = args.cert or f"{CONFDIR}/pywebexec.crt"
@@ -531,7 +533,7 @@ def list_commands():
531
533
  status = read_command_status(command_id)
532
534
  if status:
533
535
  try:
534
- params = shlex.join(status['params'])
536
+ params = shlex.join(status.get('params', []))
535
537
  except AttributeError:
536
538
  params = " ".join([shlex.quote(p) if " " in p else p for p in status['params']])
537
539
  command = status.get('command', '-') + ' ' + params
@@ -582,8 +584,6 @@ def list_executables():
582
584
 
583
585
  def main():
584
586
  basef = f"{CONFDIR}/pywebexec_{args.listen}:{args.port}"
585
- if not os.path.exists(CONFDIR):
586
- os.mkdir(CONFDIR, mode=0o700)
587
587
  if args.action == "start":
588
588
  return start_gunicorn(daemon=True, baselog=basef)
589
589
  if args.action:
@@ -40,12 +40,11 @@ select { /* Safari bug */
40
40
  background: #111;
41
41
  padding: 10px;
42
42
  border: 1px solid #ccc;
43
- font-family: monospace;
44
43
  border-radius: 10px;
45
44
  overflow-y: hidden;
46
45
  }
47
46
  .copy-icon { cursor: pointer; }
48
- .monospace { font-family: monospace; }
47
+ .monospace { font-family: Consolas NF, monospace; }
49
48
  .copied { color: green; margin-left: 5px; }
50
49
  button {
51
50
  -webkit-appearance: none;
@@ -73,8 +73,7 @@ async function fetchCommands() {
73
73
  <td>${formatTime(command.start_time)}</td>
74
74
  <td>${command.status === 'running' ? formatDuration(command.start_time, new Date().toISOString()) : formatDuration(command.start_time, command.end_time)}</td>
75
75
  <td>${command.command.replace(/^\.\//, '')}</td>
76
- <td>${command.exit_code}</td>
77
- <td><span class="status-icon status-${command.status}"></span>${command.status}</td>
76
+ <td><span class="status-icon status-${command.status}"></span>${command.status}${command.status === 'failed' ? ` (${command.exit_code})` : ''}</td>
78
77
  <td>
79
78
  ${command.status === 'running' ? `<button onclick="stopCommand('${command.command_id}')">Stop</button>` : `<button onclick="relaunchCommand('${command.command_id}')">Run</button>`}
80
79
  </td>
@@ -27,7 +27,6 @@
27
27
  <th>Start Time</th>
28
28
  <th>Duration</th>
29
29
  <th>Command</th>
30
- <th>Exit</th>
31
30
  <th>Status</th>
32
31
  <th>Action</th>
33
32
  <th>Output</th>
pywebexec/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.2.4'
16
- __version_tuple__ = version_tuple = (1, 2, 4)
15
+ __version__ = version = '1.2.6'
16
+ __version_tuple__ = version_tuple = (1, 2, 6)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.2.4
3
+ Version: 1.2.6
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -83,7 +83,7 @@ $ pywebexec
83
83
  ```
84
84
 
85
85
  * Launch commands with params/view live output/Status using browser
86
- ![pywebexecnew4](https://github.com/user-attachments/assets/55e9058c-d2d9-470e-b3ea-60b10dfc7fce)
86
+ ![pywebexecnew5](https://github.com/user-attachments/assets/cb443a6f-e364-4302-98de-f0330d763289)
87
87
 
88
88
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
89
89
 
@@ -1,7 +1,7 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
- pywebexec/pywebexec.py,sha256=fEa7BPsra8ALJSPHj9z4Keyfv4r_zUBqE2hTmH4Njmk,22657
3
- pywebexec/version.py,sha256=DFpsAdSrahcTSWRccxC8nEJpgcmby0LdmRoAddZy2zA,411
4
- pywebexec/static/css/style.css,sha256=nvZ6RJ-0PGYDzA2ZnNN__C1oONYkEao_XkNgdRXQ1lM,3607
2
+ pywebexec/pywebexec.py,sha256=nVc6fm5jGgPLc4bv4EMVaR84qJN-yy8q9teFOD_LcRE,22665
3
+ pywebexec/version.py,sha256=lMW_5tymyxUCLB-4LUHlm-nxaXdxL9eMN-CPoWJeaIw,411
4
+ pywebexec/static/css/style.css,sha256=mKatR7_j_byear3GNtYMC_4e9XtXirZDL9yGeZRsDQ0,3592
5
5
  pywebexec/static/css/xterm.css,sha256=gy8_LGA7Q61DUf8ElwFQzHqHMBQnbbEmpgZcbdgeSHI,5383
6
6
  pywebexec/static/images/aborted.svg,sha256=_mP43hU5QdRLFZIknBgjx-dIXrHgQG23-QV27ApXK2A,381
7
7
  pywebexec/static/images/copy.svg,sha256=d9OwtGh5GzzZHzYcDrLfNxZYLth1Q64x7bRyYxu4Px0,622
@@ -10,16 +10,16 @@ pywebexec/static/images/failed.svg,sha256=ADZ7IKrUyOXtqpivnz3VcH0-Wru-I5MOi3OJAk
10
10
  pywebexec/static/images/favicon.svg,sha256=ti80IfuDZwIvQcmJxkOeUaB1iMsiyOPmQmVO-h0y1IU,1126
11
11
  pywebexec/static/images/running.gif,sha256=iYuzQGkMxrakSIwt6gPieKCImGZoSAHmU5MUNZa7cpw,25696
12
12
  pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
13
- pywebexec/static/js/script.js,sha256=zdvM_4BxNr4hfsJ6B2PZJshtI8kErVgQEeaaSO8QlTA,9962
13
+ pywebexec/static/js/script.js,sha256=rvAXV7z1kzThVyeAdX55a7ss7Eemr6ibAdvOV0cFukI,9979
14
14
  pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
15
15
  pywebexec/static/js/xterm/ansi_up.min.js,sha256=KNGV0vEr30hNqKQimTAvGVy-icD5A1JqMQTtvYtKR2Y,13203
16
16
  pywebexec/static/js/xterm/xterm-addon-fit.js,sha256=Pprm9pZe4SadVXS5Bc8b9VnC9Ex4QlWwA0pxOH53Gck,1460
17
17
  pywebexec/static/js/xterm/xterm.js,sha256=Bzka76jZwEhVt_LlS0e0qMw7ryGa1p5qfxFyeohphBo,283371
18
18
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- pywebexec/templates/index.html,sha256=8dGO5qKZsAjbmsnrSbhrPN2I2_Jaxle7F3GTOcfkaLM,1689
20
- pywebexec-1.2.4.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
21
- pywebexec-1.2.4.dist-info/METADATA,sha256=gJn5WOV_Fgcxu2ax9krThpXbPDVv0LV1WfhWlvg1D0Y,6936
22
- pywebexec-1.2.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
23
- pywebexec-1.2.4.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
24
- pywebexec-1.2.4.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
25
- pywebexec-1.2.4.dist-info/RECORD,,
19
+ pywebexec/templates/index.html,sha256=3tQwVTcyK_r5BW1gHViuza59Gh-4pUZQQl7jqfvjNMY,1655
20
+ pywebexec-1.2.6.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
21
+ pywebexec-1.2.6.dist-info/METADATA,sha256=F2qZ480h1eB7Y3qnkF3MCgxsbzQLHr0wlDH6wS8EziE,6936
22
+ pywebexec-1.2.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
23
+ pywebexec-1.2.6.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
24
+ pywebexec-1.2.6.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
25
+ pywebexec-1.2.6.dist-info/RECORD,,