vappman 0.4__tar.gz → 0.5__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.4/src/vappman.egg-info → vappman-0.5}/PKG-INFO +21 -7
- {vappman-0.4 → vappman-0.5}/README.md +20 -6
- {vappman-0.4 → vappman-0.5}/pyproject.toml +1 -1
- {vappman-0.4 → vappman-0.5}/src/vappman/main.py +61 -16
- {vappman-0.4 → vappman-0.5/src/vappman.egg-info}/PKG-INFO +21 -7
- {vappman-0.4 → vappman-0.5}/LICENSE +0 -0
- {vappman-0.4 → vappman-0.5}/setup.cfg +0 -0
- {vappman-0.4 → vappman-0.5}/src/vappman/PowerWindow.py +0 -0
- {vappman-0.4 → vappman-0.5}/src/vappman/__init__.py +0 -0
- {vappman-0.4 → vappman-0.5}/src/vappman.egg-info/SOURCES.txt +0 -0
- {vappman-0.4 → vappman-0.5}/src/vappman.egg-info/dependency_links.txt +0 -0
- {vappman-0.4 → vappman-0.5}/src/vappman.egg-info/entry_points.txt +0 -0
- {vappman-0.4 → vappman-0.5}/src/vappman.egg-info/requires.txt +0 -0
- {vappman-0.4 → vappman-0.5}/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.5
|
|
4
4
|
Summary: A visual wrapper for appman
|
|
5
5
|
Author-email: Joe Defen <joedef@google.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,11 +22,25 @@ Requires-Dist: psutil>=5.9
|
|
|
22
22
|
* Install `vappman` using `pipx install vappman`, or however you do so.
|
|
23
23
|
* Prerequisites: install [ivan-hc/AppMan: AppImage package manager to install, update (for real) and manage ALL of them locally thanks to "AM", the ever-growing AUR-inspired database listing (for now) 1900+ portable apps and programs for GNU/Linux. Manage your AppImages with the ease of APT and the power of PacMan.](https://github.com/ivan-hc/AppMan) and all of its prerequisites.
|
|
24
24
|
|
|
25
|
-
NOTE: `vappman`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* installing
|
|
29
|
-
* removing installed apps
|
|
25
|
+
NOTE: `vappman` covers many capabilities of appman:
|
|
26
|
+
* implicitly, (-f) files (or show installed), (-l) list available apps,
|
|
27
|
+
and (-q) search the app list
|
|
28
|
+
* (-i) installing uninstalled apps
|
|
29
|
+
* (-r) removing installed apps
|
|
30
|
+
* (-b) backup / (-o) overwrite of installed apps
|
|
31
|
+
* (-a) about (i.e., more info) for all apps
|
|
32
|
+
* (-c) clean to remove unneeded files and directories
|
|
33
|
+
* (-u) update installed apps; and `vappman` uses "U" for update
|
|
34
|
+
all installed apps
|
|
35
|
+
|
|
36
|
+
But it does NOT cover:
|
|
37
|
+
* (-d) download install script
|
|
38
|
+
* (-h) help or full help for appman
|
|
39
|
+
* (-H) home or set $HOME directory for apps
|
|
40
|
+
* (-t) template for custom install template
|
|
41
|
+
* (-v) version of appman
|
|
42
|
+
* --force-latest to get the most recent stable release AND
|
|
43
|
+
all other options and unmentioned commands.
|
|
30
44
|
|
|
31
45
|
## Usage
|
|
32
46
|
* Run `vappman` from the command line.
|
|
@@ -46,7 +60,7 @@ but it implements the most needed, basic functionality:
|
|
|
46
60
|
|
|
47
61
|
---
|
|
48
62
|
|
|
49
|
-
NOTES:
|
|
63
|
+
NOTES: in this example:
|
|
50
64
|
* the filter is `card` so it shows apps with words starting with `card`.
|
|
51
65
|
* the current position is on `glabels`; thus if `i` is typed, `appman install glabels` is run.
|
|
52
66
|
* if the horizontal line (second line show) has no decorations, then you are looking
|
|
@@ -4,11 +4,25 @@
|
|
|
4
4
|
* Install `vappman` using `pipx install vappman`, or however you do so.
|
|
5
5
|
* Prerequisites: install [ivan-hc/AppMan: AppImage package manager to install, update (for real) and manage ALL of them locally thanks to "AM", the ever-growing AUR-inspired database listing (for now) 1900+ portable apps and programs for GNU/Linux. Manage your AppImages with the ease of APT and the power of PacMan.](https://github.com/ivan-hc/AppMan) and all of its prerequisites.
|
|
6
6
|
|
|
7
|
-
NOTE: `vappman`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* installing
|
|
11
|
-
* removing installed apps
|
|
7
|
+
NOTE: `vappman` covers many capabilities of appman:
|
|
8
|
+
* implicitly, (-f) files (or show installed), (-l) list available apps,
|
|
9
|
+
and (-q) search the app list
|
|
10
|
+
* (-i) installing uninstalled apps
|
|
11
|
+
* (-r) removing installed apps
|
|
12
|
+
* (-b) backup / (-o) overwrite of installed apps
|
|
13
|
+
* (-a) about (i.e., more info) for all apps
|
|
14
|
+
* (-c) clean to remove unneeded files and directories
|
|
15
|
+
* (-u) update installed apps; and `vappman` uses "U" for update
|
|
16
|
+
all installed apps
|
|
17
|
+
|
|
18
|
+
But it does NOT cover:
|
|
19
|
+
* (-d) download install script
|
|
20
|
+
* (-h) help or full help for appman
|
|
21
|
+
* (-H) home or set $HOME directory for apps
|
|
22
|
+
* (-t) template for custom install template
|
|
23
|
+
* (-v) version of appman
|
|
24
|
+
* --force-latest to get the most recent stable release AND
|
|
25
|
+
all other options and unmentioned commands.
|
|
12
26
|
|
|
13
27
|
## Usage
|
|
14
28
|
* Run `vappman` from the command line.
|
|
@@ -28,7 +42,7 @@ but it implements the most needed, basic functionality:
|
|
|
28
42
|
|
|
29
43
|
---
|
|
30
44
|
|
|
31
|
-
NOTES:
|
|
45
|
+
NOTES: in this example:
|
|
32
46
|
* the filter is `card` so it shows apps with words starting with `card`.
|
|
33
47
|
* the current position is on `glabels`; thus if `i` is typed, `appman install glabels` is run.
|
|
34
48
|
* if the horizontal line (second line show) has no decorations, then you are looking
|
|
@@ -14,6 +14,7 @@ Interactive, visual thin layer atop appman
|
|
|
14
14
|
import os
|
|
15
15
|
import sys
|
|
16
16
|
import re
|
|
17
|
+
import shutil
|
|
17
18
|
import subprocess
|
|
18
19
|
import traceback
|
|
19
20
|
import copy
|
|
@@ -38,7 +39,8 @@ class Vappman:
|
|
|
38
39
|
spin = self.spin = OptionSpinner()
|
|
39
40
|
spin.add_key('help_mode', '? - toggle help screen', vals=[False, True])
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
# EXPAND
|
|
43
|
+
other = 'airbou/qscU'
|
|
42
44
|
other_keys = set(ord(x) for x in other)
|
|
43
45
|
self.opts = spin.default_obj
|
|
44
46
|
|
|
@@ -48,11 +50,27 @@ class Vappman:
|
|
|
48
50
|
# self.verbs = {'i': 'install', 'r': 'remove', 'v': 'view',}
|
|
49
51
|
self.prev_filter = '' # string
|
|
50
52
|
self.filter = None # compiled pattern
|
|
53
|
+
self.check_preqreqs()
|
|
51
54
|
self.apps = self.cmd_dict('appman list')
|
|
52
55
|
self.installs = self.get_installed() # dict keyed by app
|
|
53
56
|
self.win = Window(head_line=True, body_rows=len(self.apps)+20, head_rows=10,
|
|
54
57
|
keys=spin.keys ^ other_keys, mod_pick=self.mod_pick)
|
|
55
58
|
|
|
59
|
+
@staticmethod
|
|
60
|
+
def check_preqreqs():
|
|
61
|
+
""" Check that needed programs are installed. """
|
|
62
|
+
ok = True
|
|
63
|
+
for prog in 'curl grep jq sed wget appman'.split():
|
|
64
|
+
if shutil.which(prog) is None:
|
|
65
|
+
ok = False
|
|
66
|
+
print(f'ERROR: cannot find {prog!r} on $PATH')
|
|
67
|
+
if prog == 'appman':
|
|
68
|
+
print('Install appman with:')
|
|
69
|
+
print("""mkdir -p ~/.local/bin && cd /tmp &&"""
|
|
70
|
+
""" wget https://raw.githubusercontent.com/ivan-hc/AM/main/APP-MANAGER"""
|
|
71
|
+
""" -O appman && chmod a+x ./appman && mv ./appman ~/.local/bin/appman""")
|
|
72
|
+
if not ok:
|
|
73
|
+
sys.exit(1)
|
|
56
74
|
|
|
57
75
|
def cmd_dict(self, cmd, start='◆ '):
|
|
58
76
|
""" Get lines with the given start."""
|
|
@@ -89,13 +107,22 @@ class Vappman:
|
|
|
89
107
|
self.win.set_pick_mode(False)
|
|
90
108
|
self.spin.show_help_nav_keys(self.win)
|
|
91
109
|
self.spin.show_help_body(self.win)
|
|
110
|
+
# EXPAND
|
|
92
111
|
lines = [
|
|
93
112
|
'ALWAYS AVAILABLE:',
|
|
94
|
-
' / - filter apps',
|
|
95
113
|
' q - quit program (CTL-C disabled)',
|
|
114
|
+
' a - about (more info about app)',
|
|
115
|
+
' s - sync (update appman itself)',
|
|
116
|
+
' c - clean (remove unneeded files/folters)',
|
|
117
|
+
' U - update ALL installed apps',
|
|
118
|
+
' / - filter apps',
|
|
96
119
|
'CONTEXT SENSITIVE:',
|
|
97
120
|
' i - install uninstalled app',
|
|
98
121
|
' r - remove installed app',
|
|
122
|
+
' b - backup installed app',
|
|
123
|
+
' u - update installed app',
|
|
124
|
+
' o - overwrite app from its backup',
|
|
125
|
+
|
|
99
126
|
]
|
|
100
127
|
for line in lines:
|
|
101
128
|
self.win.put_body(line)
|
|
@@ -122,11 +149,13 @@ class Vappman:
|
|
|
122
149
|
|
|
123
150
|
def get_keys_line(self):
|
|
124
151
|
""" TBD """
|
|
152
|
+
# EXPAND
|
|
125
153
|
filt = self.prev_filter if self.prev_filter else '{No-Filt}'
|
|
126
154
|
line = 'KEYS:'
|
|
127
155
|
for key, verb in self.actions.items():
|
|
128
156
|
line += f' {key}:{verb}'
|
|
129
|
-
|
|
157
|
+
# or EXPAND
|
|
158
|
+
line += f' ?:help q:quit a:about s:sync c:clean U:upd /{filt} '
|
|
130
159
|
# for action in self.actions:
|
|
131
160
|
# line += f' {action[0]}:{action}'
|
|
132
161
|
return line
|
|
@@ -139,8 +168,12 @@ class Vappman:
|
|
|
139
168
|
line = lines[self.win.pick_pos]
|
|
140
169
|
app = self.get_word1(line)
|
|
141
170
|
self.pick_is_installed = bool(app in self.installs)
|
|
171
|
+
# EXPAND
|
|
142
172
|
if self.pick_is_installed:
|
|
143
|
-
actions['r'] = '
|
|
173
|
+
actions['r'] = 'rmv'
|
|
174
|
+
actions['b'] = 'bkup'
|
|
175
|
+
actions['o'] = 'overwr'
|
|
176
|
+
actions['u'] = 'upd'
|
|
144
177
|
else:
|
|
145
178
|
actions['i'] = 'install'
|
|
146
179
|
|
|
@@ -170,6 +203,12 @@ class Vappman:
|
|
|
170
203
|
# line = line[0:-over]
|
|
171
204
|
|
|
172
205
|
# return line + suffix
|
|
206
|
+
def run_appman(self, cmd):
|
|
207
|
+
Window.stop_curses()
|
|
208
|
+
os.system(f'clear; stty sane; {cmd};'
|
|
209
|
+
+ ' echo -e "\n\nHit ENTER to return to menu"; read FOO')
|
|
210
|
+
self.installs = self.get_installed()
|
|
211
|
+
Window._start_curses()
|
|
173
212
|
|
|
174
213
|
def do_key(self, key):
|
|
175
214
|
""" TBD """
|
|
@@ -201,23 +240,29 @@ class Vappman:
|
|
|
201
240
|
sys.exit(0)
|
|
202
241
|
|
|
203
242
|
if key == ord('i') and not self.pick_is_installed:
|
|
204
|
-
|
|
205
|
-
Window.stop_curses()
|
|
206
|
-
os.system(f'clear; stty sane; appman install {self.pick_app};'
|
|
207
|
-
+ ' echo -e "\n\nHit ENTER to return to menu"; read FOO')
|
|
208
|
-
self.installs = self.get_installed()
|
|
209
|
-
Window._start_curses()
|
|
243
|
+
self.run_appman(f'appman install {self.pick_app}')
|
|
210
244
|
return None
|
|
211
245
|
|
|
212
246
|
if key == ord('r') and self.pick_is_installed:
|
|
213
|
-
|
|
214
|
-
Window.stop_curses()
|
|
215
|
-
os.system(f'clear; stty sane; appman remove {self.pick_app};'
|
|
216
|
-
+ ' echo -e "\n\nHit ENTER to return to menu"; read FOO')
|
|
217
|
-
self.installs = self.get_installed() # dict keyed by app
|
|
218
|
-
Window._start_curses()
|
|
247
|
+
self.run_appman(f'appman remove {self.pick_app}')
|
|
219
248
|
return None
|
|
220
249
|
|
|
250
|
+
if key == ord('s'):
|
|
251
|
+
self.run_appman('appman sync')
|
|
252
|
+
if key == ord('c'):
|
|
253
|
+
self.run_appman('appman clean')
|
|
254
|
+
if key == ord('b'):
|
|
255
|
+
self.run_appman(f'appman backup {self.pick_app}')
|
|
256
|
+
if key == ord('o'):
|
|
257
|
+
self.run_appman(f'appman overwrite {self.pick_app}')
|
|
258
|
+
if key == ord('a'):
|
|
259
|
+
self.run_appman(f'appman about {self.pick_app}')
|
|
260
|
+
if key == ord('u'):
|
|
261
|
+
self.run_appman(f'appman update {self.pick_app}')
|
|
262
|
+
if key == ord('U'):
|
|
263
|
+
self.run_appman(f'appman update')
|
|
264
|
+
# EXPAND
|
|
265
|
+
|
|
221
266
|
if key == ord('/'):
|
|
222
267
|
# pylint: disable=protected-access
|
|
223
268
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vappman
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5
|
|
4
4
|
Summary: A visual wrapper for appman
|
|
5
5
|
Author-email: Joe Defen <joedef@google.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,11 +22,25 @@ Requires-Dist: psutil>=5.9
|
|
|
22
22
|
* Install `vappman` using `pipx install vappman`, or however you do so.
|
|
23
23
|
* Prerequisites: install [ivan-hc/AppMan: AppImage package manager to install, update (for real) and manage ALL of them locally thanks to "AM", the ever-growing AUR-inspired database listing (for now) 1900+ portable apps and programs for GNU/Linux. Manage your AppImages with the ease of APT and the power of PacMan.](https://github.com/ivan-hc/AppMan) and all of its prerequisites.
|
|
24
24
|
|
|
25
|
-
NOTE: `vappman`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* installing
|
|
29
|
-
* removing installed apps
|
|
25
|
+
NOTE: `vappman` covers many capabilities of appman:
|
|
26
|
+
* implicitly, (-f) files (or show installed), (-l) list available apps,
|
|
27
|
+
and (-q) search the app list
|
|
28
|
+
* (-i) installing uninstalled apps
|
|
29
|
+
* (-r) removing installed apps
|
|
30
|
+
* (-b) backup / (-o) overwrite of installed apps
|
|
31
|
+
* (-a) about (i.e., more info) for all apps
|
|
32
|
+
* (-c) clean to remove unneeded files and directories
|
|
33
|
+
* (-u) update installed apps; and `vappman` uses "U" for update
|
|
34
|
+
all installed apps
|
|
35
|
+
|
|
36
|
+
But it does NOT cover:
|
|
37
|
+
* (-d) download install script
|
|
38
|
+
* (-h) help or full help for appman
|
|
39
|
+
* (-H) home or set $HOME directory for apps
|
|
40
|
+
* (-t) template for custom install template
|
|
41
|
+
* (-v) version of appman
|
|
42
|
+
* --force-latest to get the most recent stable release AND
|
|
43
|
+
all other options and unmentioned commands.
|
|
30
44
|
|
|
31
45
|
## Usage
|
|
32
46
|
* Run `vappman` from the command line.
|
|
@@ -46,7 +60,7 @@ but it implements the most needed, basic functionality:
|
|
|
46
60
|
|
|
47
61
|
---
|
|
48
62
|
|
|
49
|
-
NOTES:
|
|
63
|
+
NOTES: in this example:
|
|
50
64
|
* the filter is `card` so it shows apps with words starting with `card`.
|
|
51
65
|
* the current position is on `glabels`; thus if `i` is typed, `appman install glabels` is run.
|
|
52
66
|
* if the horizontal line (second line show) has no decorations, then you are looking
|
|
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
|