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

[Feature Request] Add customization to allow user to choose PC part. #5

Open
brianrudolf opened this issue Nov 23, 2020 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@brianrudolf
Copy link
Collaborator

It seems that this functionality can be added with minimal changes. It would be a good addition if the user could add one or more command line arguments such as:
--component = 3080
or
--component = RTX3080

I'm not sure if the parts would need to be on an internal list to match syntax properly. If the URL needs "RTX 3080" vs "RTX_3080", the user won't know and likely won't care to know.

The argparse library would be a very good option to implement the command line use for the user.

Thoughts on the use of this feature @wandersonca @ChiffX ? I can start the work on this over the next few days.

@brianrudolf brianrudolf added the enhancement New feature or request label Nov 23, 2020
@wandersonca
Copy link
Contributor

Yes, that would work. I've also seen people use docopt. You write out the help in a special way and the parser is generated. I don't have a lot of experience with either.

That or we continue using environment variables, it lends itself well to Docker. docker run -e component=3080 followed with a os.getenv("component").

@wandersonca
Copy link
Contributor

Regarding the components, you can maintain a manifest in YAML like so. This way it's easily updatable.

3080:
  canada-computers:
    - https://www.canadacomputers.com/product_info.php?cPath=43_557_559&item_id=181376
    - https://www.canadacomputers.com/product_info.php?cPath=43_557_559&item_id=181375
    - etc
  memory-express:
    - https://www.memoryexpress.com/Products/MX00114003
    - https://www.memoryexpress.com/Products/MX00113957
    - etc...
6800XT:
  canada-computers:
    - https://www.canadacomputers.com/product_info.php?cPath=43_557_559&item_id=181376
    - https://www.canadacomputers.com/product_info.php?cPath=43_557_559&item_id=181375
    - etc
  memory-express:
    - https://www.memoryexpress.com/Products/MX00114003
    - https://www.memoryexpress.com/Products/MX00113957
    - etc...

@brianrudolf
Copy link
Collaborator Author

Interesting, I haven't heard of docopt before but I do have experience with argparse. I am a fan of Docker so I would support a design that allows easy use of it.

I have also wanted to move the search addresses into some form of constants file, I like the look of that YAML file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants