Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update available products #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sidefx-web --setup
```bash
sidefx-web list-builds -h # Print help message
sidefx-web list-builds houdini
sidefx-web list-builds houdini-qt4 --only-production # Filter only production builds
sidefx-web list-builds houdini-py3 --only-production # Filter only production builds
sidefx-web list-builds houdini --version 16.5 # Filter version e.g. 16.5, 17.0
sidefx-web list-builds houdini --platform linux # Filter platform: linux, macos, win64
```
Expand Down
24 changes: 18 additions & 6 deletions sidefx_web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
CONFIG_DIR = '/'.join([str(pathlib.Path.home()), '.config', 'sidefx-web'])
CONFIG_FILE = '/'.join([CONFIG_DIR, 'config.ini'])

PRODUCT_CHOICES = [
'houdini',
'houdini-py3',
'sidefxlabs',
'docker',
'sidefxlabs',
'houdini-launcher',
'houdini-launcher-py3',
'launcher-iso',
'launcher-iso-py3'
]


def cli():
parser = argparse.ArgumentParser()
Expand All @@ -59,8 +71,8 @@ def cli():
download_parser = subparsers.add_parser(
'download', help='Download a SideFX product.')
download_parser.add_argument(
'product', type=str, choices=['houdini', 'houdini-qt4'],
help='Product to list: houdini, houdini-qt4')
'product', type=str, choices=PRODUCT_CHOICES,
help='Product to list: {}'.format(", ".join(PRODUCT_CHOICES)))
download_parser.add_argument(
'version', type=str,
help='The major version of Houdini. e.g. 16.5, 17.0.')
Expand All @@ -69,20 +81,20 @@ def cli():
help=('Either a specific build number, e.g. 382, or the string '
'"production" to get the latest production build'))
download_parser.add_argument(
'platform', type=str, choices=['win64', 'macos', 'linux'],
'platform', type=str, choices=['win64', 'macos', 'linux', ''],
help='The operating system to install Houdini on: win64, macos, linux')
download_parser.set_defaults(func='download')

list_builds_parser = subparsers.add_parser(
'list-builds', help='List SideFX products available for download.')
list_builds_parser.add_argument(
'product', type=str, choices=['houdini', 'houdini-qt4'],
help='Product to list: houdini, houdini-qt4')
'product', type=str, choices=PRODUCT_CHOICES,
help='Product to list: {}'.format(", ".join(PRODUCT_CHOICES)))
list_builds_parser.add_argument(
'--version', type=str,
help='The major version of Houdini. e.g. 16.5, 17.0.')
list_builds_parser.add_argument(
'--platform', type=str, choices=['win64', 'macos', 'linux'],
'--platform', type=str, choices=['win64', 'macos', 'linux', ''],
help='The operating system to install Houdini on: win64, macos, linux')
list_builds_parser.add_argument(
'--only-production', action='store_true',
Expand Down