Loading .gitignore +2 −1 Original line number Diff line number Diff line Loading @@ -11,3 +11,4 @@ huey.db huey.db-shm huey.db-wal poetry.lock meilisearch No newline at end of file Makefile 0 → 100644 +36 −0 Original line number Diff line number Diff line run-meilisearch: ## démarrage de l'index Meilisearch killall meilisearch || true poetry run python manage.py startmeilisearch & .PHONY: run-meilisearch meilisearch: curl -L https://install.meilisearch.com | sh install:meilisearch ## installation des paquets et dépendances poetry install poetry run python manage.py migrate poetry run python manage.py createsuperuser killall meilisearch || true poetry run python manage.py startmeilisearch & sleep 2 poetry run python manage.py meilisearchindex killall meilisearch || true .PHONY: install update: ## mise à jour des paquets et dépendances poetry update && poetry run python manage.py migrate .PHONY: update run:run-meilisearch ## démarrage de l'environnement de développement poetry run python manage.py runserver & poetry run python manage.py run_huey .PHONY: run format: ## Formatage des sources avec Black poetry run black ./ .PHONY: format help: ## Show this help @echo "\nChoisissez une commande. Les choix sont:\n" @grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[0;36m%-12s\033[m %s\n", $$1, $$2}' @echo "" .PHONY: help README.md +2 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ APIs et interfaces de stockage de médias. - Python >= 3.9 - PostgreSQL >= 11 - Meilisearch - exiftool - imagemagick (convert) - pdftoppm, pdftotext (poppler-utils) Loading @@ -27,6 +28,7 @@ APIs et interfaces de stockage de médias. export JAMA_FILES_DIR="" export JAMA_IIIF_ENDPOINT="http://localhost/iip/IIIF=" export JAMA_APPS="" export JAMA_MEILISEARCH_KEY="" > _Astuce_ : créer un fichier `.env` à la racine du projet avec l'ensemble des variables déclarées ```bash Loading jama/settings.py +3 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,9 @@ JAMA_IIIF_UPSCALING_PREFIX = os.getenv("JAMA_IIIF_UPSCALING_PREFIX") or "" IIIF_DIR = os.getenv("JAMA_IIIF_DIR") or "{}/{}".format(BASE_DIR, "iiif") IIIF_PATH_SEPARATOR = os.getenv("JAMA_IIIF_PATH_SEPARATOR") or os.path.sep # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ MEILISEARCH_URL = os.getenv("JAMA_MEILISEARCH_URL", "http://localhost:7700") MEILISEARCH_KEY = os.getenv("JAMA_MEILISEARCH_KEY", "") # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = ( Loading pyproject.toml +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ deskew = "^1.3.3" fusepy = "^3.0.1" django-auth-cli-certic = "^0.1.3" pydotplus = "^2.0.2" meilisearch = "^0.28.2" [tool.poetry.dev-dependencies] black = "^23.3.0" Loading Loading
.gitignore +2 −1 Original line number Diff line number Diff line Loading @@ -11,3 +11,4 @@ huey.db huey.db-shm huey.db-wal poetry.lock meilisearch No newline at end of file
Makefile 0 → 100644 +36 −0 Original line number Diff line number Diff line run-meilisearch: ## démarrage de l'index Meilisearch killall meilisearch || true poetry run python manage.py startmeilisearch & .PHONY: run-meilisearch meilisearch: curl -L https://install.meilisearch.com | sh install:meilisearch ## installation des paquets et dépendances poetry install poetry run python manage.py migrate poetry run python manage.py createsuperuser killall meilisearch || true poetry run python manage.py startmeilisearch & sleep 2 poetry run python manage.py meilisearchindex killall meilisearch || true .PHONY: install update: ## mise à jour des paquets et dépendances poetry update && poetry run python manage.py migrate .PHONY: update run:run-meilisearch ## démarrage de l'environnement de développement poetry run python manage.py runserver & poetry run python manage.py run_huey .PHONY: run format: ## Formatage des sources avec Black poetry run black ./ .PHONY: format help: ## Show this help @echo "\nChoisissez une commande. Les choix sont:\n" @grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[0;36m%-12s\033[m %s\n", $$1, $$2}' @echo "" .PHONY: help
README.md +2 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ APIs et interfaces de stockage de médias. - Python >= 3.9 - PostgreSQL >= 11 - Meilisearch - exiftool - imagemagick (convert) - pdftoppm, pdftotext (poppler-utils) Loading @@ -27,6 +28,7 @@ APIs et interfaces de stockage de médias. export JAMA_FILES_DIR="" export JAMA_IIIF_ENDPOINT="http://localhost/iip/IIIF=" export JAMA_APPS="" export JAMA_MEILISEARCH_KEY="" > _Astuce_ : créer un fichier `.env` à la racine du projet avec l'ensemble des variables déclarées ```bash Loading
jama/settings.py +3 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,9 @@ JAMA_IIIF_UPSCALING_PREFIX = os.getenv("JAMA_IIIF_UPSCALING_PREFIX") or "" IIIF_DIR = os.getenv("JAMA_IIIF_DIR") or "{}/{}".format(BASE_DIR, "iiif") IIIF_PATH_SEPARATOR = os.getenv("JAMA_IIIF_PATH_SEPARATOR") or os.path.sep # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ MEILISEARCH_URL = os.getenv("JAMA_MEILISEARCH_URL", "http://localhost:7700") MEILISEARCH_KEY = os.getenv("JAMA_MEILISEARCH_KEY", "") # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = ( Loading
pyproject.toml +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ deskew = "^1.3.3" fusepy = "^3.0.1" django-auth-cli-certic = "^0.1.3" pydotplus = "^2.0.2" meilisearch = "^0.28.2" [tool.poetry.dev-dependencies] black = "^23.3.0" Loading