diff --git a/README.md b/README.md index 18f3a130..888677cf 100644 --- a/README.md +++ b/README.md @@ -285,7 +285,7 @@ To visualize your data, just run main.py with the ```-v``` or ```--visualize``` - ```-c [ [ ...]]``` or ```--category [ [ ...]]``` to visualize all products in one or more categories - ```--id [ [ ...]]``` to visualize one or more products with the specified id(s) - ```-n [ [ ...]]``` or ```--name [ ...]]``` to visualize one or more products with the specified name(s) -- ```--compare``` to compare two or more products with the specified id(s), name(s) and/or category(s) on one graph. Use with ```--id```, ```--name``` and/or ```--category``` +- ```--compare``` to compare two or more products with the specified id(s), name(s) and/or category(s) or all products on one graph. Use with ```--id```, ```--name```, ```--category``` and/or ```--all``` ### Example graph ![](https://user-images.githubusercontent.com/57172157/171033112-908f6420-6c7a-44ef-ba67-8a4a73bbd96e.png) @@ -359,7 +359,7 @@ python3 main.py -v -c -utd **Compare two products** -To compare two products on one graph, use the flag ```--compare``` with flag ```--id```, ```--name``` and/or ```--category``` , like so: +To compare two products on one graph, use the flag ```--compare``` with flag ```--id```, ```--name```, ```--category``` and/or ```--all```, like so: ``` python3 main.py -v --compare --id ``` @@ -372,5 +372,8 @@ python3 main.py -v --compare --category ``` python3 main.py -v --compare --id --name --category ``` +``` +python3 main.py -v --compare --all +``` ***OBS** when using ```--name``` or ```--category``` multiple products can be visualized* diff --git a/scraper/arguments.py b/scraper/arguments.py index 57c00862..f75c22d8 100644 --- a/scraper/arguments.py +++ b/scraper/arguments.py @@ -157,9 +157,9 @@ def validate_arguments(parser: argparse.ArgumentParser) -> argparse.Namespace: parser.error( "When using --visualize, then one of the following is required: --all, --category, --id, --name, --compare" ) - if args.compare and not any([args.id, args.name, args.category]): + if args.compare and not any([args.id, args.name, args.category, args.all]): parser.error( - "When using --visualize and --compare, then one of the following is required: --id, --name, --category" + "When using --visualize and --compare, then one of the following is required: --id, --name, --category, --all" ) if args.latest_datapoint: