-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
46 lines (35 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.PHONY: install create-env activate-env telegram-notify telegram-subscriber build-tranlsations extract-translations lint-check
install:
@echo "Installing requirements..."
pip install -r requirements.txt
create-env:
@echo "Creating virtual environment..."
python -m venv solax-cloud-notifier
@echo "Activate it using 'source solax-cloud-notifier/bin/activate'"
activate-env:
@echo "Activating virtual environment..."
./solax-cloud-notifier/bin/activate
telegram-notify:
@echo "Running Telegram notifier..."
python ./src/telegram-notifier.py
telegram-subscriber:
@echo "Running Telegram subscriber..."
python ./src/telegram-subscriber.py
build-tranlsations:
@echo "Building translations..."
msgfmt src/locales/uk/LC_MESSAGES/messages.po -o src/locales/uk/LC_MESSAGES/messages.mo
msgfmt src/locales/en/LC_MESSAGES/messages.po -o src/locales/en/LC_MESSAGES/messages.mo
extract-translations:
@echo "Extracting translations..."
xgettext --from-code=UTF-8 -o src/locales/messages.pot src/**.py
msgmerge --update src/locales/uk/LC_MESSAGES/messages.po src/locales/messages.pot
msgmerge --update src/locales/en/LC_MESSAGES/messages.po src/locales/messages.pot
@echo "Translations extracted and updated."
lint-check:
@echo "Running lint checks..."
python -m black --check src/
python -m flake8 --quiet --verbose src/
lint:
@echo "Running and applying lint checks..."
python -m black src/
python -m flake8 src/