airobo 0.1.11__tar.gz → 0.1.13__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.4
2
2
  Name: airobo
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
  Summary: A CLI tool for Airobo tasks
5
5
  Author-email: Joshua Morvant <joshua@aiarobo.com>
6
6
  Requires-Python: >=3.7
@@ -0,0 +1,44 @@
1
+ """
2
+ airobo/cli.py
3
+
4
+ CLI for the airobo tool.
5
+ """
6
+ import argparse
7
+ from airobo.api import publish, version
8
+
9
+ commands = {
10
+ "publish": publish,
11
+ "version": version,
12
+ }
13
+
14
+
15
+ #---------------------------------------------------------------------------------------------------------
16
+
17
+ def main():
18
+ parser = argparse.ArgumentParser(prog='airobo')
19
+ subparsers = parser.add_subparsers(dest='command', help='Available commands')
20
+
21
+ # Create publish subparser with optional platform argument
22
+ publish_parser = subparsers.add_parser('publish', help='Publish app to stores')
23
+ publish_parser.add_argument('platform', nargs='?', choices=['ios', 'android'],
24
+ help='Platform to publish to (optional, defaults to both)')
25
+
26
+ # Create version subparser
27
+ subparsers.add_parser('version', help='Show version')
28
+
29
+ args = parser.parse_args()
30
+
31
+ # Handle commands
32
+ if args.command == 'publish':
33
+ # Pass the platform argument to publish function
34
+ platform = getattr(args, 'platform', None)
35
+ publish(platform)
36
+ elif args.command == 'version':
37
+ version()
38
+ else:
39
+ parser.print_help()
40
+
41
+ #---------------------------------------
42
+
43
+ if __name__ == "__main__":
44
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airobo
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
  Summary: A CLI tool for Airobo tasks
5
5
  Author-email: Joshua Morvant <joshua@aiarobo.com>
6
6
  Requires-Python: >=3.7
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "airobo"
7
- version = "0.1.11"
7
+ version = "0.1.13"
8
8
  description = "A CLI tool for Airobo tasks"
9
9
  authors = [
10
10
  { name="Joshua Morvant", email="joshua@aiarobo.com" }
@@ -1,37 +0,0 @@
1
- """
2
- airobo/cli.py
3
-
4
- CLI for the airobo tool.
5
- """
6
- import argparse
7
- from airobo.api import publish, version
8
-
9
- commands = {
10
- "publish": publish,
11
- "version": version,
12
- }
13
-
14
-
15
- #---------------------------------------------------------------------------------------------------------
16
-
17
- def main():
18
- parser = argparse.ArgumentParser(prog='airobo')
19
- subparsers = parser.add_subparsers(dest='command', help='Available commands')
20
-
21
- # Dynamically create subparsers for each command in the commands dictionary
22
- for command_name in commands.keys():
23
- subparsers.add_parser(command_name, help=f'Run {command_name} command')
24
-
25
- args = parser.parse_args()
26
-
27
- # Iterate through commands dictionary to find matching key and execute callback
28
- if args.command in commands:
29
- callback = commands[args.command]
30
- callback()
31
- else:
32
- parser.print_help()
33
-
34
- #---------------------------------------
35
-
36
- if __name__ == "__main__":
37
- main()
File without changes
File without changes
File without changes