Skip to content

Commit

Permalink
README specified requirements (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdeneklapes authored Aug 26, 2023
1 parent fbe5665 commit 97e32be
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 27 deletions.
18 changes: 3 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
# IDe
.idea/

tokens/
others/
logs/

# Caches
.cache/
__pycache__/
*.pytest_cache/
.ruff_cache/
dist/

# Virtualenv
venv/
.venv/

# Python
*.egg-info/

.DS_Store
*.cache
*.pkl

# env
*.env

# Ctags
tags

# Macos
.DS_Store
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Current functionality supports removing and adding items to bazos.cz, bazos.sk,
Create full-featured API for bazos.cz, bazos.sk, bazos.at and bazos.pl.

## Installation
### Requirements
- Python 3.10+
- chromedriver 116.0.5845.96+

```shell
pip3 install bazos
Expand Down Expand Up @@ -77,7 +80,6 @@ Your sentences2.
```



## Contribution and Development

Every contribution is welcome!
Expand All @@ -92,11 +94,16 @@ Before creating pull request, please run `pre-commit run --all-files` to check i
pre-commit install
```

### Create virtual environment and install dependencies
### Create virtual environment + install dependencies

```shell
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -e .

# Try run
python3 bazos --help
```

You are good to go!
40 changes: 31 additions & 9 deletions bazos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,41 @@
import sys
from typing import Dict, Any

from bazos.bazos import bazos as bz
from bazos.main import bazos as bz


def parse_cli_argument() -> Dict[str, Any]:
parser = argparse.ArgumentParser()
parser.add_argument('-b', '--bazos', action='store_true', help='Use bazos')
parser.add_argument('--add-only', action='store_true',
help='Add only new products, not remove old ones')
parser.add_argument('--print-rubrics',
action='store_true', help='Print rubrics')
parser.add_argument('--country', nargs="+",
help="What bazos country to use", default=['cz', 'sk'])
parser.add_argument('-p', '--path', help='Path to products directory')
parser.add_argument(
'-b', '--bazos',
action='store_true',
help='Use bazos'
)
parser.add_argument(
'--add-only',
action='store_true',
help='Add only new products, not remove old ones'
)
parser.add_argument(
'--print-rubrics',
action='store_true',
help='Print rubrics'
)
parser.add_argument(
'--country',
nargs="+",
help="What bazos country to use",
default=['cz', 'sk']
)
parser.add_argument(
'-p', '--path',
help='Path to products directory'
)
parser.add_argument(
"--update-credentials",
action='store_true',
help='Update credentials'
)
cli_args = vars(parser.parse_args())
return cli_args

Expand Down
2 changes: 2 additions & 0 deletions bazos/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from bazos.__init__ import main
main()
File renamed without changes.
Empty file removed bazos/tests/__init__.py
Empty file.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
bandit==1.7.5
bazos==0.0.1
colorama==0.4.6
currencyconverter==0.17.9
forex-python==1.8
Expand Down

0 comments on commit 97e32be

Please sign in to comment.