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.
- {pywebexec-1.1.6/pywebexec.egg-info → pywebexec-1.1.8}/PKG-INFO +8 -6
- {pywebexec-1.1.6 → pywebexec-1.1.8}/README.md +7 -5
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/pywebexec.py +2 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/css/style.css +9 -3
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/templates/index.html +1 -1
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/version.py +2 -2
- {pywebexec-1.1.6 → pywebexec-1.1.8/pywebexec.egg-info}/PKG-INFO +8 -6
- {pywebexec-1.1.6 → pywebexec-1.1.8}/.github/workflows/python-publish.yml +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/.gitignore +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/LICENSE +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pyproject.toml +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/__init__.py +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/aborted.svg +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/copy.svg +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/copy_ok.svg +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/failed.svg +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/favicon.svg +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/running.gif +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/images/success.svg +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/static/js/script.js +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec/templates/__init__.py +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/SOURCES.txt +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/dependency_links.txt +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/entry_points.txt +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/requires.txt +0 -0
- {pywebexec-1.1.6 → pywebexec-1.1.8}/pywebexec.egg-info/top_level.txt +0 -0
- {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.
|
|
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
|
-

|
|
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
|
-
*
|
|
103
|
-
*
|
|
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
|
|
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", "
|
|
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
|
-

|
|
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
|
-
*
|
|
41
|
-
*
|
|
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
|
|
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", "
|
|
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: #
|
|
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:
|
|
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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pywebexec
|
|
3
|
-
Version: 1.1.
|
|
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
|
-

|
|
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
|
-
*
|
|
103
|
-
*
|
|
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
|
|
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", "
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|