From 0e6e710e526df15ff9a627f177233df1b25a545e Mon Sep 17 00:00:00 2001 From: n4al Date: Wed, 2 Feb 2022 04:51:51 +0000 Subject: [PATCH] Updating README.md to reflect the project file structure (#633) * Updating README.md to reflect the changes made to the project file structure * Added corrections as per comments Co-authored-by: Nemanja Lukic --- python/web/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/web/README.md b/python/web/README.md index 0ebca37b..4e88c239 100644 --- a/python/web/README.md +++ b/python/web/README.md @@ -3,6 +3,8 @@ ## Setup local dev env ```bash +# Change to python/web/src +$ cd python/web # Make a virtual env named venv $ python3 -m venv venv # Use that virtual env in this shell @@ -10,7 +12,7 @@ $ source venv/bin/activate # Install requirements $ pip install -r requirements.txt # Use mocks and a temp dir - start the web server -$ BASE_DIR=/tmp/images/ PATH=$PATH:`pwd`/mock/bin/ cd src && python3 web.py +$ BASE_DIR=/tmp/images/ PATH=$PATH:`pwd`/mock/bin/ cd python/web && PYTHON_COMMON_PATH=$(dirname $PWD)/common/src PYTHONPATH=$PWD/src:${PYTHON_COMMON_PATH} python3 src/web.py ``` ### Mocks for local development @@ -43,7 +45,7 @@ We use the Flask-Babel library and Flask/Jinja2 extension for i18n. It uses the 'pybabel' command line tool for extracting and compiling localizations. Activate the Python venv in src/web/ to use it: ``` -$ cd src/web/ +$ cd python/web $ source venv/bin/activate $ pybabel --help ``` @@ -94,7 +96,7 @@ msgstr "" Install the gettext package and use msgfmt to see the translation progress. ``` $ sudo apt install gettext -$ cd src/web/ +$ cd python/web/src $ msgfmt --statistics translations/sv/LC_MESSAGES/messages.po 215 translated messages, 1 untranslated message. ```