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

Rename argument 'print-all-products' to 'list-products' #251

Merged
merged 1 commit into from
Jul 13, 2024
Merged
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
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
Loading