Skip to content

Commit

Permalink
Merge pull request #251 from Crinibus/rename-argument-print-all-products
Browse files Browse the repository at this point in the history
Rename argument 'print-all-products' to 'list-products'
  • Loading branch information
Crinibus authored Jul 13, 2024
2 parents 96ea871 + 49a821d commit 4db2745
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ LOGITECH Z533


## View all products <a name="view-all-products"></a>
To view all the products you have scraped, you can use the argument ```--print-all-products```.
To view all the products you have scraped, you can use the argument ```--list-products```.

Example:
```
python3 main.py --print-all-products
python3 main.py --list-products
```

This will print all the products in the following format:
This will list all the products in the following format:

```
CATEGORY
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main() -> None:
if args.latest_datapoint:
scraper.print_latest_datapoints(args.name, args.id, args.category)

if args.print_all_products:
if args.list_products:
scraper.print_all_products()

if args.delete:
Expand Down
6 changes: 3 additions & 3 deletions scraper/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def argparse_setup() -> argparse.Namespace:
)

parser.add_argument(
"--print-all-products",
help="print the names, websites and ids of all products",
dest="print_all_products",
"--list-products",
help="lists the names, websites and ids of all products",
dest="list_products",
action="store_true",
)

Expand Down

0 comments on commit 4db2745

Please sign in to comment.