vappman 0.8__tar.gz → 0.9.1__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.
- {vappman-0.8/src/vappman.egg-info → vappman-0.9.1}/PKG-INFO +6 -5
- {vappman-0.8 → vappman-0.9.1}/README.md +5 -4
- {vappman-0.8 → vappman-0.9.1}/pyproject.toml +1 -1
- {vappman-0.8 → vappman-0.9.1}/src/vappman/main.py +26 -11
- {vappman-0.8 → vappman-0.9.1/src/vappman.egg-info}/PKG-INFO +6 -5
- {vappman-0.8 → vappman-0.9.1}/LICENSE +0 -0
- {vappman-0.8 → vappman-0.9.1}/setup.cfg +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman/PowerWindow.py +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman/__init__.py +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman.egg-info/SOURCES.txt +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman.egg-info/dependency_links.txt +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman.egg-info/entry_points.txt +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman.egg-info/requires.txt +0 -0
- {vappman-0.8 → vappman-0.9.1}/src/vappman.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vappman
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.1
|
|
4
4
|
Summary: A visual wrapper for appman
|
|
5
5
|
Author-email: Joe Defen <joedef@google.com>
|
|
6
6
|
License: MIT
|
|
@@ -69,12 +69,13 @@ But it does NOT cover:
|
|
|
69
69
|
* Use `i` to install apps, and `r` to remove apps. When you install or remove an app, `appman` drops out of `curses` mode, runs the `appman` command so you can see the result, and then prompts your to hit ENTER to return to `vappman.
|
|
70
70
|
* Use `t` to "test" an installed app. This launches a terminal emulator and then the app so you can see issues. This is not for daily use obviously, but for after install or when having unknown issues and you wish to start the investigation.
|
|
71
71
|
|
|
72
|
-
## Example Screenshot (of v0.
|
|
72
|
+
## Example Screenshot (of v0.9 ... current release will vary slightly)
|
|
73
73
|
.
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
77
77
|
NOTES: in this example:
|
|
78
|
+
* keys to the left of `❚` apply to the highlighted app; keys to the right apply globally.
|
|
78
79
|
* the filter is `card` so it shows app lines with words starting with `card`.
|
|
79
80
|
* the reverse video, current position is on `glabels`;
|
|
80
81
|
thus if `i` (or ENTER) is typed, `appman install glabels` is run.
|
|
@@ -82,8 +83,8 @@ NOTES: in this example:
|
|
|
82
83
|
all the filtered apps; otherwise, the decoration suggests where you are in the
|
|
83
84
|
partial view of the filtered apps.
|
|
84
85
|
* the matching installed app has the '✔✔✔' prefix.
|
|
85
|
-
* the fixed top line shows
|
|
86
|
+
* the fixed top line shows mos of the available action keys (e.g., `q` quits the app)
|
|
86
87
|
* use `?` to open the help screen describing all keys (including navigation)
|
|
87
88
|
|
|
88
|
-
## Screen Recording (Intro to vappman based on v0.
|
|
89
|
-
[](https://
|
|
89
|
+
## Screen Recording (Intro to vappman based on v0.9)
|
|
90
|
+
[](https://www.youtube.com/watch?v=fC2EYMMcMQk)
|
|
@@ -51,12 +51,13 @@ But it does NOT cover:
|
|
|
51
51
|
* Use `i` to install apps, and `r` to remove apps. When you install or remove an app, `appman` drops out of `curses` mode, runs the `appman` command so you can see the result, and then prompts your to hit ENTER to return to `vappman.
|
|
52
52
|
* Use `t` to "test" an installed app. This launches a terminal emulator and then the app so you can see issues. This is not for daily use obviously, but for after install or when having unknown issues and you wish to start the investigation.
|
|
53
53
|
|
|
54
|
-
## Example Screenshot (of v0.
|
|
54
|
+
## Example Screenshot (of v0.9 ... current release will vary slightly)
|
|
55
55
|
.
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
59
|
NOTES: in this example:
|
|
60
|
+
* keys to the left of `❚` apply to the highlighted app; keys to the right apply globally.
|
|
60
61
|
* the filter is `card` so it shows app lines with words starting with `card`.
|
|
61
62
|
* the reverse video, current position is on `glabels`;
|
|
62
63
|
thus if `i` (or ENTER) is typed, `appman install glabels` is run.
|
|
@@ -64,8 +65,8 @@ NOTES: in this example:
|
|
|
64
65
|
all the filtered apps; otherwise, the decoration suggests where you are in the
|
|
65
66
|
partial view of the filtered apps.
|
|
66
67
|
* the matching installed app has the '✔✔✔' prefix.
|
|
67
|
-
* the fixed top line shows
|
|
68
|
+
* the fixed top line shows mos of the available action keys (e.g., `q` quits the app)
|
|
68
69
|
* use `?` to open the help screen describing all keys (including navigation)
|
|
69
70
|
|
|
70
|
-
## Screen Recording (Intro to vappman based on v0.
|
|
71
|
-
[](https://
|
|
71
|
+
## Screen Recording (Intro to vappman based on v0.9)
|
|
72
|
+
[](https://www.youtube.com/watch?v=fC2EYMMcMQk)
|
|
@@ -72,16 +72,28 @@ class Vappman:
|
|
|
72
72
|
if not ok:
|
|
73
73
|
sys.exit(1)
|
|
74
74
|
|
|
75
|
-
def cmd_dict(self, cmd, start='
|
|
76
|
-
""" Get lines with the given start
|
|
75
|
+
def cmd_dict(self, cmd, start=r'\s*◆\s'):
|
|
76
|
+
""" Get lines with the given start put into a dict keyed by the
|
|
77
|
+
1st word.
|
|
78
|
+
"""
|
|
77
79
|
# Define the command to run
|
|
78
80
|
command = cmd.split()
|
|
79
81
|
# Run the command and capture the output
|
|
80
|
-
|
|
82
|
+
try:
|
|
83
|
+
result = subprocess.run(command, stdout=subprocess.PIPE, text=True, check=False)
|
|
84
|
+
except Exception as exc:
|
|
85
|
+
Window.stop_curses()
|
|
86
|
+
print(f'FAILED: {command}: {exc}')
|
|
87
|
+
sys.exit(1)
|
|
88
|
+
|
|
89
|
+
if result.returncode != 0:
|
|
90
|
+
print(f'WARNING: {command}: {result.returncode=}')
|
|
81
91
|
lines = result.stdout.splitlines()
|
|
92
|
+
ansi_escape_pattern = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
|
|
82
93
|
rv = {}
|
|
83
94
|
for line in lines:
|
|
84
|
-
|
|
95
|
+
line = ansi_escape_pattern.sub('', line).strip() # get clean text
|
|
96
|
+
if re.match(start, line):
|
|
85
97
|
wd1 = self.get_word1(line)
|
|
86
98
|
if wd1:
|
|
87
99
|
rv[wd1] = line
|
|
@@ -147,21 +159,21 @@ class Vappman:
|
|
|
147
159
|
# EXPAND
|
|
148
160
|
lines = [
|
|
149
161
|
'ALWAYS AVAILABLE:',
|
|
150
|
-
' q or x - quit program (CTL-C disabled)',
|
|
151
162
|
' a - about (more info about app)',
|
|
152
163
|
' s - sync (update appman itself)',
|
|
153
164
|
' c - clean (remove unneeded files/folters)',
|
|
154
165
|
' U - update ALL installed apps',
|
|
155
|
-
'
|
|
156
|
-
'
|
|
166
|
+
' q or x - quit program (CTL-C disabled)',
|
|
167
|
+
' / - filter apps by keywords or regex',
|
|
157
168
|
' ESC = clear filter and jump to top',
|
|
169
|
+
' ENTER = install, remove, or return from help',
|
|
158
170
|
'CONTEXT SENSITIVE:',
|
|
159
171
|
' i - install uninstalled app',
|
|
160
172
|
' r - remove installed app',
|
|
161
|
-
' b - backup installed app',
|
|
162
173
|
' u - update installed app',
|
|
163
|
-
'
|
|
174
|
+
' b - backup installed app',
|
|
164
175
|
' o - overwrite app from its backup',
|
|
176
|
+
' t - test by opening a terminal emulator and launching the app',
|
|
165
177
|
|
|
166
178
|
]
|
|
167
179
|
for line in lines:
|
|
@@ -203,7 +215,7 @@ class Vappman:
|
|
|
203
215
|
else:
|
|
204
216
|
line += f' {key}:{verb}'
|
|
205
217
|
# or EXPAND
|
|
206
|
-
line += f'
|
|
218
|
+
line += f' about ❚ sync clean Upd quit ?:help /{self.prev_filter} '
|
|
207
219
|
# for action in self.actions:
|
|
208
220
|
# line += f' {action[0]}:{action}'
|
|
209
221
|
return line[1:]
|
|
@@ -219,9 +231,9 @@ class Vappman:
|
|
|
219
231
|
# EXPAND
|
|
220
232
|
if self.pick_is_installed:
|
|
221
233
|
actions['r'] = 'rmv'
|
|
234
|
+
actions['u'] = 'upd'
|
|
222
235
|
actions['b'] = 'bkup'
|
|
223
236
|
actions['o'] = 'overwr'
|
|
224
|
-
actions['u'] = 'upd'
|
|
225
237
|
actions['t'] = 'test'
|
|
226
238
|
else:
|
|
227
239
|
actions['i'] = 'install'
|
|
@@ -241,6 +253,9 @@ class Vappman:
|
|
|
241
253
|
wds = parts[0].split()
|
|
242
254
|
this.win.head.pad.move(0, 0)
|
|
243
255
|
for wd in wds:
|
|
256
|
+
if wd[0]in ('<', '|', '❚'):
|
|
257
|
+
this.win.add_header(wd + ' ', resume=True)
|
|
258
|
+
continue
|
|
244
259
|
if wd:
|
|
245
260
|
this.win.add_header(wd[0], attr=cs.A_BOLD|cs.A_UNDERLINE, resume=True)
|
|
246
261
|
if wd[1:]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vappman
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.1
|
|
4
4
|
Summary: A visual wrapper for appman
|
|
5
5
|
Author-email: Joe Defen <joedef@google.com>
|
|
6
6
|
License: MIT
|
|
@@ -69,12 +69,13 @@ But it does NOT cover:
|
|
|
69
69
|
* Use `i` to install apps, and `r` to remove apps. When you install or remove an app, `appman` drops out of `curses` mode, runs the `appman` command so you can see the result, and then prompts your to hit ENTER to return to `vappman.
|
|
70
70
|
* Use `t` to "test" an installed app. This launches a terminal emulator and then the app so you can see issues. This is not for daily use obviously, but for after install or when having unknown issues and you wish to start the investigation.
|
|
71
71
|
|
|
72
|
-
## Example Screenshot (of v0.
|
|
72
|
+
## Example Screenshot (of v0.9 ... current release will vary slightly)
|
|
73
73
|
.
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
77
77
|
NOTES: in this example:
|
|
78
|
+
* keys to the left of `❚` apply to the highlighted app; keys to the right apply globally.
|
|
78
79
|
* the filter is `card` so it shows app lines with words starting with `card`.
|
|
79
80
|
* the reverse video, current position is on `glabels`;
|
|
80
81
|
thus if `i` (or ENTER) is typed, `appman install glabels` is run.
|
|
@@ -82,8 +83,8 @@ NOTES: in this example:
|
|
|
82
83
|
all the filtered apps; otherwise, the decoration suggests where you are in the
|
|
83
84
|
partial view of the filtered apps.
|
|
84
85
|
* the matching installed app has the '✔✔✔' prefix.
|
|
85
|
-
* the fixed top line shows
|
|
86
|
+
* the fixed top line shows mos of the available action keys (e.g., `q` quits the app)
|
|
86
87
|
* use `?` to open the help screen describing all keys (including navigation)
|
|
87
88
|
|
|
88
|
-
## Screen Recording (Intro to vappman based on v0.
|
|
89
|
-
[](https://
|
|
89
|
+
## Screen Recording (Intro to vappman based on v0.9)
|
|
90
|
+
[](https://www.youtube.com/watch?v=fC2EYMMcMQk)
|
|
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
|