pywebexec 1.5.8__tar.gz → 1.5.9__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 (47) hide show
  1. {pywebexec-1.5.8/pywebexec.egg-info → pywebexec-1.5.9}/PKG-INFO +1 -1
  2. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/popup.js +14 -4
  3. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/script.js +12 -0
  4. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/templates/popup.html +1 -1
  5. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/version.py +2 -2
  6. {pywebexec-1.5.8 → pywebexec-1.5.9/pywebexec.egg-info}/PKG-INFO +1 -1
  7. {pywebexec-1.5.8 → pywebexec-1.5.9}/.github/workflows/python-publish.yml +0 -0
  8. {pywebexec-1.5.8 → pywebexec-1.5.9}/.gitignore +0 -0
  9. {pywebexec-1.5.8 → pywebexec-1.5.9}/LICENSE +0 -0
  10. {pywebexec-1.5.8 → pywebexec-1.5.9}/README.md +0 -0
  11. {pywebexec-1.5.8 → pywebexec-1.5.9}/pyproject.toml +0 -0
  12. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/__init__.py +0 -0
  13. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/pywebexec.py +0 -0
  14. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/css/Consolas NF.ttf +0 -0
  15. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/css/style.css +0 -0
  16. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/css/xterm.css +0 -0
  17. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/aborted.svg +0 -0
  18. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/copy.svg +0 -0
  19. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/copy_ok.svg +0 -0
  20. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/down-arrow.svg +0 -0
  21. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/failed.svg +0 -0
  22. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/favicon.svg +0 -0
  23. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/font-decrease.svg +0 -0
  24. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/font-increase.svg +0 -0
  25. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/pause.svg +0 -0
  26. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/popup.svg +0 -0
  27. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/resume.svg +0 -0
  28. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/running.gif +0 -0
  29. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/images/success.svg +0 -0
  30. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/commands.js +0 -0
  31. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/LICENSE +0 -0
  32. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/addon-canvas.js +0 -0
  33. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/addon-canvas.js.map +0 -0
  34. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/addon-fit.js +0 -0
  35. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/addon-fit.js.map +0 -0
  36. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/addon-unicode11.js +0 -0
  37. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/addon-unicode11.js.map +0 -0
  38. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/xterm.js +0 -0
  39. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/static/js/xterm/xterm.js.map +0 -0
  40. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/templates/__init__.py +0 -0
  41. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec/templates/index.html +0 -0
  42. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec.egg-info/SOURCES.txt +0 -0
  43. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec.egg-info/dependency_links.txt +0 -0
  44. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec.egg-info/entry_points.txt +0 -0
  45. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec.egg-info/requires.txt +0 -0
  46. {pywebexec-1.5.8 → pywebexec-1.5.9}/pywebexec.egg-info/top_level.txt +0 -0
  47. {pywebexec-1.5.8 → pywebexec-1.5.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.5.8
3
+ Version: 1.5.9
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -61,7 +61,6 @@ let outputInterval = null;
61
61
  let nextOutputLink = null;
62
62
  let fullOutput = '';
63
63
  let outputLength = 0;
64
- let title = null;
65
64
  let slider = null;
66
65
  let isPaused = false;
67
66
  const toggleButton = document.getElementById('toggleFetch');
@@ -73,6 +72,14 @@ function getTokenParam() {
73
72
  }
74
73
  const urlToken = getTokenParam();
75
74
 
75
+ function extractTitle(output) {
76
+ const titleindex = output.lastIndexOf('\x1b]0;');
77
+ if (titleindex < 0) return null;
78
+ const endindex = output.slice(titleindex+4).indexOf('\x07');
79
+ if (endindex < 0) return null;
80
+ return output.slice(titleindex+4, titleindex+4+endindex);
81
+ }
82
+
76
83
  async function fetchOutput(url) {
77
84
  if (isPaused) return;
78
85
  try {
@@ -102,11 +109,15 @@ async function fetchOutput(url) {
102
109
  }
103
110
  nextOutputLink = data.links.next;
104
111
  if (data.status != 'running') {
105
- title.innerText = `${data.status} ${title.innerText.split(' ').slice(1).join(' ')}`;
112
+ document.title = document.title.replace('[running]',`[${data.status}]`);
106
113
  clearInterval(outputInterval);
107
114
  toggleButton.style.display = 'none';
108
115
  } else {
109
116
  toggleButton.style.display = 'block';
117
+ const title = extractTitle(data.output);
118
+ if (title) {
119
+ document.title = `${title} - [running]`;
120
+ }
110
121
  }
111
122
  }
112
123
  } catch (error) {
@@ -130,7 +141,7 @@ async function viewOutput(command_id) {
130
141
  return;
131
142
  }
132
143
  const data = await response.json();
133
- title.innerText = `${data.status} ${data.command} ${data.params.join(' ')}`;
144
+ document.title = `${data.command} ${data.params.join(' ')} - [${data.status}]`;
134
145
  if (data.command == 'term')
135
146
  terminal.options.cursorInactiveStyle = 'outline';
136
147
  else
@@ -195,7 +206,6 @@ toggleButton.addEventListener('click', toggleFetchOutput);
195
206
 
196
207
  window.addEventListener('resize', adjustOutputHeight);
197
208
  window.addEventListener('load', () => {
198
- title = document.getElementById('outputTitle');
199
209
  slider = document.getElementById('outputSlider');
200
210
  slider.addEventListener('input', sliderUpdateOutput);
201
211
  const commandId = window.location.pathname.split('/').slice(-1)[0];
@@ -159,6 +159,14 @@ async function fetchCommands() {
159
159
  }
160
160
  }
161
161
 
162
+ function extractTitle(output) {
163
+ const titleindex = output.lastIndexOf('\x1b]0;');
164
+ if (titleindex < 0) return null;
165
+ const endindex = output.slice(titleindex+4).indexOf('\x07');
166
+ if (endindex < 0) return null;
167
+ return output.slice(titleindex+4, titleindex+4+endindex);
168
+ }
169
+
162
170
  async function fetchOutput(url) {
163
171
  if (isPaused) return;
164
172
  try {
@@ -190,6 +198,10 @@ async function fetchOutput(url) {
190
198
  toggleButton.style.display = 'none';
191
199
  } else {
192
200
  toggleButton.style.display = 'block';
201
+ /*const title = extractTitle(data.output);
202
+ if (title) {
203
+ document.title = title;
204
+ }*/
193
205
  }
194
206
  }
195
207
  } catch (error) {
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <link rel="icon" href="/static/images/favicon.svg" type="image/svg+xml">
6
- <title id="outputTitle">Command Output</title>
6
+ <title>Command Output</title>
7
7
  <link rel="stylesheet" href="/static/css/style.css">
8
8
  <link rel="stylesheet" href="/static/css/xterm.css">
9
9
  </head>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.5.8'
16
- __version_tuple__ = version_tuple = (1, 5, 8)
15
+ __version__ = version = '1.5.9'
16
+ __version_tuple__ = version_tuple = (1, 5, 9)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.5.8
3
+ Version: 1.5.9
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
File without changes
File without changes
File without changes
File without changes
File without changes