pywebexec 1.4.12__tar.gz → 1.4.13__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.
Files changed (38) hide show
  1. {pywebexec-1.4.12/pywebexec.egg-info → pywebexec-1.4.13}/PKG-INFO +9 -3
  2. {pywebexec-1.4.12 → pywebexec-1.4.13}/README.md +8 -2
  3. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/pywebexec.py +6 -5
  4. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/css/style.css +3 -5
  5. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/script.js +1 -3
  6. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/version.py +2 -2
  7. {pywebexec-1.4.12 → pywebexec-1.4.13/pywebexec.egg-info}/PKG-INFO +9 -3
  8. {pywebexec-1.4.12 → pywebexec-1.4.13}/.github/workflows/python-publish.yml +0 -0
  9. {pywebexec-1.4.12 → pywebexec-1.4.13}/.gitignore +0 -0
  10. {pywebexec-1.4.12 → pywebexec-1.4.13}/LICENSE +0 -0
  11. {pywebexec-1.4.12 → pywebexec-1.4.13}/pyproject.toml +0 -0
  12. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/__init__.py +0 -0
  13. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/css/Consolas NF.ttf +0 -0
  14. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/css/xterm.css +0 -0
  15. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/aborted.svg +0 -0
  16. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/copy.svg +0 -0
  17. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/copy_ok.svg +0 -0
  18. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/down-arrow.svg +0 -0
  19. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/failed.svg +0 -0
  20. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/favicon.svg +0 -0
  21. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/popup.svg +0 -0
  22. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/running.gif +0 -0
  23. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/images/success.svg +0 -0
  24. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/commands.js +0 -0
  25. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/popup.js +0 -0
  26. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/xterm/LICENSE +0 -0
  27. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/xterm/ansi_up.min.js +0 -0
  28. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/xterm/xterm-addon-fit.js +0 -0
  29. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/static/js/xterm/xterm.js +0 -0
  30. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/templates/__init__.py +0 -0
  31. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/templates/index.html +0 -0
  32. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec/templates/popup.html +0 -0
  33. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec.egg-info/SOURCES.txt +0 -0
  34. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec.egg-info/dependency_links.txt +0 -0
  35. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec.egg-info/entry_points.txt +0 -0
  36. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec.egg-info/requires.txt +0 -0
  37. {pywebexec-1.4.12 → pywebexec-1.4.13}/pywebexec.egg-info/top_level.txt +0 -0
  38. {pywebexec-1.4.12 → pywebexec-1.4.13}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.4.12
3
+ Version: 1.4.13
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -76,8 +76,14 @@ $ pip install pywebexec
76
76
 
77
77
  ## Quick start
78
78
 
79
- * put in a directory the scripts/commands/links to commands you want to expose
80
- * start http server serving current directory executables listening on 0.0.0.0 port 8080
79
+ * share terminal
80
+ ```shell
81
+ $ pywebexec shareterm
82
+ ```
83
+
84
+ * serve executables
85
+ * put in a directory the scripts/commands/links to commands you want to expose
86
+ * start http server serving current directory executables listening on 0.0.0.0 port 8080
81
87
  ```shell
82
88
  $ pywebexec -d <dir>
83
89
  ```
@@ -14,8 +14,14 @@ $ pip install pywebexec
14
14
 
15
15
  ## Quick start
16
16
 
17
- * put in a directory the scripts/commands/links to commands you want to expose
18
- * start http server serving current directory executables listening on 0.0.0.0 port 8080
17
+ * share terminal
18
+ ```shell
19
+ $ pywebexec shareterm
20
+ ```
21
+
22
+ * serve executables
23
+ * put in a directory the scripts/commands/links to commands you want to expose
24
+ * start http server serving current directory executables listening on 0.0.0.0 port 8080
19
25
  ```shell
20
26
  $ pywebexec -d <dir>
21
27
  ```
@@ -44,7 +44,7 @@ app.config['LDAP_BIND_PASSWORD'] = os.environ.get('PYWEBEXEC_LDAP_BIND_PASSWORD'
44
44
  # Directory to store the command status and output
45
45
  CWD = os.getcwd()
46
46
  COMMAND_STATUS_DIR = '.web_status'
47
- CONFDIR = os.path.expanduser("~/")
47
+ CONFDIR = os.path.expanduser("~/").rstrip('/')
48
48
  if os.path.isdir(f"{CONFDIR}/.config"):
49
49
  CONFDIR += '/.config'
50
50
  CONFDIR += "/.pywebexec"
@@ -311,7 +311,7 @@ def parseargs():
311
311
  "-p", "--port", type=int, default=8080, help="HTTP server listen port"
312
312
  )
313
313
  parser.add_argument(
314
- "-d", "--dir", type=str, default=os.getcwd(), help="Serve target directory"
314
+ "-d", "--dir", type=str, help=f"Serve target directory. default {CONFDIR}"
315
315
  )
316
316
  parser.add_argument(
317
317
  "-t",
@@ -328,6 +328,9 @@ def parseargs():
328
328
  choices=["start","stop","restart","status","shareterm", "term"])
329
329
 
330
330
  args = parser.parse_args()
331
+ if not os.path.exists(CONFDIR):
332
+ os.mkdir(CONFDIR, mode=0o700)
333
+ args.dir = args.dir or CONFDIR
331
334
  if os.path.isdir(args.dir):
332
335
  try:
333
336
  os.chdir(args.dir)
@@ -338,9 +341,7 @@ def parseargs():
338
341
  print(f"Error: {args.dir} not found", file=sys.stderr)
339
342
  sys.exit(1)
340
343
  if not os.path.exists(COMMAND_STATUS_DIR):
341
- os.makedirs(COMMAND_STATUS_DIR)
342
- if not os.path.exists(CONFDIR):
343
- os.mkdir(CONFDIR, mode=0o700)
344
+ os.mkdir(COMMAND_STATUS_DIR, mode=0o700)
344
345
  if args.action == "term":
345
346
  COMMAND_STATUS_DIR = f"{os.getcwd()}/{COMMAND_STATUS_DIR}"
346
347
  sys.exit(start_term())
@@ -267,14 +267,12 @@ span {
267
267
  width: 100%;
268
268
  }
269
269
  .popup-button {
270
- background: none;
271
- border: none;
270
+ background-color: transparent;
271
+ background-image: url("/static/images/popup.svg");
272
272
  cursor: pointer;
273
+ border: none;
273
274
  padding: 0;
274
- margin-left: 5px;
275
275
  vertical-align: middle;
276
- }
277
- .popup-button img {
278
276
  width: 16px;
279
277
  height: 16px;
280
278
  }
@@ -111,9 +111,7 @@ async function fetchCommands() {
111
111
  ${command.command.startsWith('term') ? '' : command.status === 'running' ? `<button onclick="stopCommand('${command.command_id}', event)">Stop</button>` : `<button onclick="relaunchCommand('${command.command_id}', event)">Run</button>`}
112
112
  </td>
113
113
  <td class="monospace outcol">
114
- <button class="popup-button" onclick="openPopup('${command.command_id}', event)">
115
- <img src="/static/images/popup.svg" alt="Popup">
116
- </button>
114
+ <button class="popup-button" onclick="openPopup('${command.command_id}', event)"></button>
117
115
  ${command.last_output_line || ''}
118
116
  </td>
119
117
  `;
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.4.12'
16
- __version_tuple__ = version_tuple = (1, 4, 12)
15
+ __version__ = version = '1.4.13'
16
+ __version_tuple__ = version_tuple = (1, 4, 13)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.4.12
3
+ Version: 1.4.13
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -76,8 +76,14 @@ $ pip install pywebexec
76
76
 
77
77
  ## Quick start
78
78
 
79
- * put in a directory the scripts/commands/links to commands you want to expose
80
- * start http server serving current directory executables listening on 0.0.0.0 port 8080
79
+ * share terminal
80
+ ```shell
81
+ $ pywebexec shareterm
82
+ ```
83
+
84
+ * serve executables
85
+ * put in a directory the scripts/commands/links to commands you want to expose
86
+ * start http server serving current directory executables listening on 0.0.0.0 port 8080
81
87
  ```shell
82
88
  $ pywebexec -d <dir>
83
89
  ```
File without changes
File without changes
File without changes
File without changes