vappman 0.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vappman
3
- Version: 0.9
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,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)
@@ -55,7 +55,7 @@ build-backend = "setuptools.build_meta"
55
55
 
56
56
  [project]
57
57
  name = "vappman"
58
- version = "0.9"
58
+ version = "0.9.1"
59
59
  description = "A visual wrapper for appman"
60
60
  authors = [
61
61
  { name = "Joe Defen", email = "joedef@google.com" }
@@ -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
- 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 = {}
83
94
  for line in lines:
84
- if line.startswith(start):
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vappman
3
- Version: 0.9
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,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