-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples recommend using 1password-cli
- Loading branch information
Showing
2 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
PYTHON := ../.venv/bin/python | ||
PYTHON := .venv/bin/python | ||
|
||
venv: | ||
python3 -m venv .venv | ||
|
||
install: venv | ||
${PYTHON} -m pip install .. | ||
|
||
# I'm using 1password-cli to inject environment variables to the python | ||
# process. You can do without 1password by preparing `.env` file and task: | ||
# `env $$(cat ".env") ${PYTHON} script-file.py` | ||
invoice: | ||
${PYTHON} main.py consensius.yml | ||
op run --env-file op.env \ | ||
${PYTHON} main.py consensius.yml | ||
|
||
check-month: | ||
@env $$(cat ".env") ${PYTHON} check_accounting_month.py | ||
op run --env-file op.env \ | ||
${PYTHON} check_accounting_month.py | ||
|
||
list-invoices: | ||
@env $$(cat ".env") ${PYTHON} list_invoices.py | ||
op run --env-file op.env \ | ||
${PYTHON} list_invoices.py | ||
|
||
clean: | ||
rm -rf .venv | ||
|
||
clean-env: | ||
rm .env | ||
@echo "unset IFIRMA_API_KEY IFIRMA_abonent_API_KEY IFIRMA_API_USERNAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
IFIRMA_API_USERNAME="op://devops/ifirma-my-api-tokens/api_user" | ||
IFIRMA_API_KEY="op://devops/ifirma-my-api-tokens/api_key" | ||
IFIRMA_abonent_API_KEY="op://devops/ifirma-my-api-tokens/abonent_api_key" |