This is a gentle fork from https://framagit.org/marienfressinaud/photos.marienfressinaud.fr with a responsive and optimized mindset. https://media.larlet.fr/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 948B

12345678910111213141516171819202122232425262728293031323334
  1. .DEFAULT_GOAL := help
  2. include .env
  3. SERVER_OUTPUT = $(TARGET_SERVER_OUTPUT) # user@server.url:/path/to/website
  4. .PHONY: install
  5. install: ## Install the dependencies to build the website
  6. python -m pip install -r requirements.txt
  7. .PHONY: build
  8. build: ## Build the website
  9. python revelateur.py
  10. .PHONY: ulid
  11. ulid: ## Generate a ULID (useful for passwords)
  12. @python -c 'from ulid import ULID;print(str(ULID()))'
  13. .PHONY: clean
  14. clean: ## Clean output files
  15. rm -rf ./output ./__pycache__
  16. .PHONY: serve
  17. serve: build ## Serve the website (development)
  18. cd output && python -m http.server 8080
  19. .PHONY: publish
  20. publish: build ## Publish the website online (rsync)
  21. # With rsync 3.1.0 you can use `--info=progress2`
  22. rsync -P -rzc --stats --cvs-exclude --delete ./output/ $(SERVER_OUTPUT)
  23. .PHONY: help
  24. help:
  25. @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'