pywebexec 1.1.6__tar.gz → 1.1.8__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 (27) hide show
  1. {pywebexec-1.1.6/pywebexec.egg-info → pywebexec-1.1.8}/PKG-INFO +8 -6
  2. {pywebexec-1.1.6 → pywebexec-1.1.8}/README.md +7 -5
  3. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/pywebexec.py +2 -0
  4. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/css/style.css +9 -3
  5. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/templates/index.html +1 -1
  6. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/version.py +2 -2
  7. {pywebexec-1.1.6 → pywebexec-1.1.8/pywebexec.egg-info}/PKG-INFO +8 -6
  8. {pywebexec-1.1.6 → pywebexec-1.1.8}/.github/workflows/python-publish.yml +0 -0
  9. {pywebexec-1.1.6 → pywebexec-1.1.8}/.gitignore +0 -0
  10. {pywebexec-1.1.6 → pywebexec-1.1.8}/LICENSE +0 -0
  11. {pywebexec-1.1.6 → pywebexec-1.1.8}/pyproject.toml +0 -0
  12. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/__init__.py +0 -0
  13. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/aborted.svg +0 -0
  14. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/copy.svg +0 -0
  15. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/copy_ok.svg +0 -0
  16. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/failed.svg +0 -0
  17. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/favicon.svg +0 -0
  18. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/running.gif +0 -0
  19. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/success.svg +0 -0
  20. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/js/script.js +0 -0
  21. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/templates/__init__.py +0 -0
  22. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/SOURCES.txt +0 -0
  23. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/dependency_links.txt +0 -0
  24. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/entry_points.txt +0 -0
  25. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/requires.txt +0 -0
  26. {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/top_level.txt +0 -0
  27. {pywebexec-1.1.6 → pywebexec-1.1.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.1.6
3
+ Version: 1.1.8
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
- ![pywebexec](https://github.com/user-attachments/assets/d352cc23-1552-4b79-a6ff-f02f05cf328e)
86
+ ![pywebexecnew](https://github.com/user-attachments/assets/06290b5e-284e-4e41-b32a-0f5aad074658)
87
87
 
88
88
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
89
89
 
@@ -99,8 +99,8 @@ all commands output / statuses are available in the executables directory in sub
99
99
  * Basic Auth
100
100
  * LDAP(S)
101
101
  * Can be started as a daemon (POSIX)
102
- * uses gunicorn to serve http/https
103
- * compatible Linux/MacOS
102
+ * Uses gunicorn to serve http/https
103
+ * Linux/MacOS compatible
104
104
 
105
105
  ## Customize server
106
106
  ```shell
@@ -148,12 +148,14 @@ $ pywebexec start
148
148
  $ pywebexec status
149
149
  $ pywebexec stop
150
150
  ```
151
- * log of server are stored in directory `[.config/].pywebexec/pywebexec_<listen>:<port>.log`
151
+ * log of server are stored in directory `~/[.config/].pywebexec/pywebexec_<listen>:<port>.log`
152
152
 
153
153
  ## Launch command through API
154
154
 
155
155
  ```shell
156
- $ curl http://myhost:8080/run_script -H 'Content-Type: application/json' -X POST -d '{ "script_name":"myscript", "param":["param1", ...]}
156
+ $ curl http://myhost:8080/run_script -H 'Content-Type: application/json' -X POST -d '{ "script_name":"myscript", "params":["param1", ...]}
157
+ $ curl http://myhost:8080/command_status/<command_id>
158
+ $ curl http://myhost:8080/command_output/<command_id> -H "Accept: text/plain"
157
159
  ```
158
160
 
159
161
  ## API reference
@@ -21,7 +21,7 @@ $ pywebexec
21
21
  ```
22
22
 
23
23
  * Launch commands with params/view live output/Status using browser
24
- ![pywebexec](https://github.com/user-attachments/assets/d352cc23-1552-4b79-a6ff-f02f05cf328e)
24
+ ![pywebexecnew](https://github.com/user-attachments/assets/06290b5e-284e-4e41-b32a-0f5aad074658)
25
25
 
26
26
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
27
27
 
@@ -37,8 +37,8 @@ all commands output / statuses are available in the executables directory in sub
37
37
  * Basic Auth
38
38
  * LDAP(S)
39
39
  * Can be started as a daemon (POSIX)
40
- * uses gunicorn to serve http/https
41
- * compatible Linux/MacOS
40
+ * Uses gunicorn to serve http/https
41
+ * Linux/MacOS compatible
42
42
 
43
43
  ## Customize server
44
44
  ```shell
@@ -86,12 +86,14 @@ $ pywebexec start
86
86
  $ pywebexec status
87
87
  $ pywebexec stop
88
88
  ```
89
- * log of server are stored in directory `[.config/].pywebexec/pywebexec_<listen>:<port>.log`
89
+ * log of server are stored in directory `~/[.config/].pywebexec/pywebexec_<listen>:<port>.log`
90
90
 
91
91
  ## Launch command through API
92
92
 
93
93
  ```shell
94
- $ curl http://myhost:8080/run_script -H 'Content-Type: application/json' -X POST -d '{ "script_name":"myscript", "param":["param1", ...]}
94
+ $ curl http://myhost:8080/run_script -H 'Content-Type: application/json' -X POST -d '{ "script_name":"myscript", "params":["param1", ...]}
95
+ $ curl http://myhost:8080/command_status/<command_id>
96
+ $ curl http://myhost:8080/command_output/<command_id> -H "Accept: text/plain"
95
97
  ```
96
98
 
97
99
  ## API reference
@@ -541,6 +541,8 @@ def get_command_output(command_id):
541
541
  with open(output_file_path, 'r') as output_file:
542
542
  output = output_file.read()
543
543
  status_data = read_command_status(command_id) or {}
544
+ if request.headers.get('Accept') == 'text/plain':
545
+ return f"{output}\nstatus: {status_data.get('status')}", 200, {'Content-Type': 'text/plain'}
544
546
  return jsonify({'output': output, 'status': status_data.get("status")})
545
547
  return jsonify({'error': 'Invalid command_id'}), 404
546
548
 
@@ -7,6 +7,7 @@ body {
7
7
  position: relative;
8
8
  border-radius: 10px;
9
9
  border: 1px solid #aaa;
10
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.30);
10
11
  }
11
12
  table {
12
13
  width: 100%;
@@ -19,7 +20,8 @@ th, td {
19
20
  white-space: nowrap;
20
21
  }
21
22
  th {
22
- background-color: #f2f2f2;
23
+ background-color: #444;
24
+ color: #eee;
23
25
  position: sticky;
24
26
  top: 0;
25
27
  z-index: 1;
@@ -49,7 +51,6 @@ button {
49
51
  -webkit-border-radius: none;
50
52
  appearance: none;
51
53
  border-radius: 15px;
52
- padding: 3px;
53
54
  padding-right: 13px;
54
55
  border: 1px #555 solid;
55
56
  height: 22px;
@@ -70,6 +71,11 @@ form {
70
71
  background-repeat: no-repeat;
71
72
  vertical-align: middle;
72
73
  }
74
+ .title-icon {
75
+ width: 30px;
76
+ height: 30px;
77
+ background-image: url("/static/images/favicon.svg")
78
+ }
73
79
  .status-running {
74
80
  background-image: url("/static/images/running.gif")
75
81
  }
@@ -108,7 +114,7 @@ input {
108
114
  height: 15px;
109
115
  font-size: 15px;
110
116
  outline: none;
111
- text-indent: 10px;
117
+ text-indent: 5px;
112
118
  background-color: white;
113
119
  }
114
120
  .currentcommand {
@@ -7,7 +7,7 @@
7
7
  <link rel="stylesheet" href="/static/css/style.css">
8
8
  </head>
9
9
  <body>
10
- <h2>{{ title }}</h2>
10
+ <h2><span class="status-icon title-icon"></span>{{ title }}</h2>
11
11
  <form id="launchForm">
12
12
  <label for="commandName">Command</label>
13
13
  <select id="commandName" name="commandName"></select>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.1.6'
16
- __version_tuple__ = version_tuple = (1, 1, 6)
15
+ __version__ = version = '1.1.8'
16
+ __version_tuple__ = version_tuple = (1, 1, 8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.1.6
3
+ Version: 1.1.8
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
- ![pywebexec](https://github.com/user-attachments/assets/d352cc23-1552-4b79-a6ff-f02f05cf328e)
86
+ ![pywebexecnew](https://github.com/user-attachments/assets/06290b5e-284e-4e41-b32a-0f5aad074658)
87
87
 
88
88
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
89
89
 
@@ -99,8 +99,8 @@ all commands output / statuses are available in the executables directory in sub
99
99
  * Basic Auth
100
100
  * LDAP(S)
101
101
  * Can be started as a daemon (POSIX)
102
- * uses gunicorn to serve http/https
103
- * compatible Linux/MacOS
102
+ * Uses gunicorn to serve http/https
103
+ * Linux/MacOS compatible
104
104
 
105
105
  ## Customize server
106
106
  ```shell
@@ -148,12 +148,14 @@ $ pywebexec start
148
148
  $ pywebexec status
149
149
  $ pywebexec stop
150
150
  ```
151
- * log of server are stored in directory `[.config/].pywebexec/pywebexec_<listen>:<port>.log`
151
+ * log of server are stored in directory `~/[.config/].pywebexec/pywebexec_<listen>:<port>.log`
152
152
 
153
153
  ## Launch command through API
154
154
 
155
155
  ```shell
156
- $ curl http://myhost:8080/run_script -H 'Content-Type: application/json' -X POST -d '{ "script_name":"myscript", "param":["param1", ...]}
156
+ $ curl http://myhost:8080/run_script -H 'Content-Type: application/json' -X POST -d '{ "script_name":"myscript", "params":["param1", ...]}
157
+ $ curl http://myhost:8080/command_status/<command_id>
158
+ $ curl http://myhost:8080/command_output/<command_id> -H "Accept: text/plain"
157
159
  ```
158
160
 
159
161
  ## API reference
File without changes
File without changes
File without changes
File without changes