vappman 0.9__tar.gz → 0.9.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vappman
3
- Version: 0.9
3
+ Version: 0.9.2
4
4
  Summary: A visual wrapper for appman
5
5
  Author-email: Joe Defen <joedef@google.com>
6
6
  License: MIT
@@ -69,7 +69,7 @@ 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.7 ... current release will vary slightly)
72
+ ## Example Screenshot (of v0.9 ... current release will vary slightly)
73
73
  ![vappman-with-filter](https://github.com/joedefen/vappman/blob/main/images/vappman-with-filter.png?raw=true).
74
74
 
75
75
  ---
@@ -86,5 +86,5 @@ NOTES: in this example:
86
86
  * the fixed top line shows mos of the available action keys (e.g., `q` quits the app)
87
87
  * use `?` to open the help screen describing all keys (including navigation)
88
88
 
89
- ## Screen Recording (Intro to vappman based on v0.7)
90
- [![Screen Recording](https://i9.ytimg.com/vi_webp/NUHYN9_DZtA/mq3.webp?sqp=CMTu4LMG-oaymwEmCMACELQB8quKqQMa8AEB-AHqBYAC4AOKAgwIABABGEogZShRMA8=&rs=AOn4CLBaBrOpAhJkRIQQNNdCzYaqpOYl-Q)](https://youtu.be/NUHYN9_DZtA)
89
+ ## Screen Recording (Intro to vappman based on v0.9)
90
+ [![Screen Recording](https://i9.ytimg.com/vi_webp/NUHYN9_DZtA/mq3.webp?sqp=CMTu4LMG-oaymwEmCMACELQB8quKqQMa8AEB-AHqBYAC4AOKAgwIABABGEogZShRMA8=&rs=AOn4CLBaBrOpAhJkRIQQNNdCzYaqpOYl-Q)](https://www.youtube.com/watch?v=fC2EYMMcMQk)
@@ -51,7 +51,7 @@ 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.7 ... current release will vary slightly)
54
+ ## Example Screenshot (of v0.9 ... current release will vary slightly)
55
55
  ![vappman-with-filter](https://github.com/joedefen/vappman/blob/main/images/vappman-with-filter.png?raw=true).
56
56
 
57
57
  ---
@@ -68,5 +68,5 @@ NOTES: in this example:
68
68
  * the fixed top line shows mos of the available action keys (e.g., `q` quits the app)
69
69
  * use `?` to open the help screen describing all keys (including navigation)
70
70
 
71
- ## Screen Recording (Intro to vappman based on v0.7)
72
- [![Screen Recording](https://i9.ytimg.com/vi_webp/NUHYN9_DZtA/mq3.webp?sqp=CMTu4LMG-oaymwEmCMACELQB8quKqQMa8AEB-AHqBYAC4AOKAgwIABABGEogZShRMA8=&rs=AOn4CLBaBrOpAhJkRIQQNNdCzYaqpOYl-Q)](https://youtu.be/NUHYN9_DZtA)
71
+ ## Screen Recording (Intro to vappman based on v0.9)
72
+ [![Screen Recording](https://i9.ytimg.com/vi_webp/NUHYN9_DZtA/mq3.webp?sqp=CMTu4LMG-oaymwEmCMACELQB8quKqQMa8AEB-AHqBYAC4AOKAgwIABABGEogZShRMA8=&rs=AOn4CLBaBrOpAhJkRIQQNNdCzYaqpOYl-Q)](https://www.youtube.com/watch?v=fC2EYMMcMQk)
@@ -20,7 +20,6 @@
20
20
  # - deactivate # to deactivate
21
21
  #
22
22
  # rm -rf ./dist && python3 -m build && pip install -e . --break-system-packages
23
- # pip-tray
24
23
  #
25
24
  # -OR-
26
25
  # python3 -m vappman.main
@@ -37,17 +36,17 @@
37
36
  # rm -rf dist; python3 -m build; ls dist/.
38
37
  # python3 -m twine upload dist/* # keyring --disable # may be required
39
38
  # ## Enter __token__ and the saved TOKEN (in bitwarden)
40
- # pipx upgrade pwr-tray || pipx install pwr-tray # >= python3.11
41
- # --OR-- sudo python3 -m pip install pwr-tray # <= python3.10
42
- # ## VISIT https://pypi.org/project/pwr-tray and delete old versions
39
+ # pipx upgrade vappman || pipx install vappman # >= python3.11
40
+ # --OR-- sudo python3 -m pip install vappman # <= python3.10
41
+ # ## VISIT https://pypi.org/project/vappman and delete old versions
43
42
  #
44
43
  # TEST Build and test (from project directory):
45
44
  # ## BUMP the version (below in [project])
46
45
  # rm -r dist; python3 -m build
47
46
  # python3 -m twine upload --repository testpypi dist/* # keyring --disable # may be required
48
47
  # ## Enter __token__ and the saved TOKEN (in bitwarden)
49
- # sudo python3 -m pip install --upgrade --index-url https://test.pypi.org/simple/ --no-deps --break-system-packages my-sna
50
- # ## VISIT https://test.pypi.org/project/pwr-tray and delete old versions
48
+ # sudo python3 -m pip install --upgrade --index-url https://test.pypi.org/simple/ --no-deps --break-system-packages vappman
49
+ # ## VISIT https://test.pypi.org/project/vappman and delete old versions
51
50
 
52
51
  [build-system]
53
52
  requires = ["setuptools>=42", "wheel"]
@@ -55,7 +54,7 @@ build-backend = "setuptools.build_meta"
55
54
 
56
55
  [project]
57
56
  name = "vappman"
58
- version = "0.9"
57
+ version = "0.9.2"
59
58
  description = "A visual wrapper for appman"
60
59
  authors = [
61
60
  { name = "Joe Defen", email = "joedef@google.com" }
@@ -72,19 +72,43 @@ 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
- result = subprocess.run(command, stdout=subprocess.PIPE, text=True, check=True)
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 = {}
94
+ prev_wd1 = None
83
95
  for line in lines:
84
- if line.startswith(start):
96
+ line = ansi_escape_pattern.sub('', line) # get clean text
97
+ if re.match(start, line):
98
+ line = line.strip()
85
99
  wd1 = self.get_word1(line)
86
100
  if wd1:
87
101
  rv[wd1] = line
102
+ prev_wd1 = wd1
103
+ elif prev_wd1 and line.startswith(' '):
104
+ line = line.strip()
105
+ if line:
106
+ rv[prev_wd1] += ' ' + line
107
+ else:
108
+ prev_wd1 = None
109
+ else:
110
+ prev_wd1 = None
111
+
88
112
  return rv
89
113
 
90
114
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vappman
3
- Version: 0.9
3
+ Version: 0.9.2
4
4
  Summary: A visual wrapper for appman
5
5
  Author-email: Joe Defen <joedef@google.com>
6
6
  License: MIT
@@ -69,7 +69,7 @@ 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.7 ... current release will vary slightly)
72
+ ## Example Screenshot (of v0.9 ... current release will vary slightly)
73
73
  ![vappman-with-filter](https://github.com/joedefen/vappman/blob/main/images/vappman-with-filter.png?raw=true).
74
74
 
75
75
  ---
@@ -86,5 +86,5 @@ NOTES: in this example:
86
86
  * the fixed top line shows mos of the available action keys (e.g., `q` quits the app)
87
87
  * use `?` to open the help screen describing all keys (including navigation)
88
88
 
89
- ## Screen Recording (Intro to vappman based on v0.7)
90
- [![Screen Recording](https://i9.ytimg.com/vi_webp/NUHYN9_DZtA/mq3.webp?sqp=CMTu4LMG-oaymwEmCMACELQB8quKqQMa8AEB-AHqBYAC4AOKAgwIABABGEogZShRMA8=&rs=AOn4CLBaBrOpAhJkRIQQNNdCzYaqpOYl-Q)](https://youtu.be/NUHYN9_DZtA)
89
+ ## Screen Recording (Intro to vappman based on v0.9)
90
+ [![Screen Recording](https://i9.ytimg.com/vi_webp/NUHYN9_DZtA/mq3.webp?sqp=CMTu4LMG-oaymwEmCMACELQB8quKqQMa8AEB-AHqBYAC4AOKAgwIABABGEogZShRMA8=&rs=AOn4CLBaBrOpAhJkRIQQNNdCzYaqpOYl-Q)](https://www.youtube.com/watch?v=fC2EYMMcMQk)
File without changes
File without changes
File without changes