From 9edcf7ec8a46ae7bda6fd7978d90456166cdaed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 24 Feb 2023 18:36:55 +0100 Subject: [PATCH] Remove all the fuss from this Makefile --- Makefile | 56 +++---------------- content/Journal/.ztr-directory | 1 - content/Journal/2012-10-04-brassage.md | 12 ++-- content/Technologie/2011-10-15-ihatemoney.md | 2 +- .../2012-10-22-cheese-and-code-result.md | 2 +- content/Technologie/2012-12-29-status.md | 2 +- .../Technologie/2013-02-04-cornice-cors.md | 2 +- requirements.txt | 1 + 8 files changed, 20 insertions(+), 58 deletions(-) delete mode 100644 content/Journal/.ztr-directory diff --git a/Makefile b/Makefile index bb4427f..49ddd9d 100644 --- a/Makefile +++ b/Makefile @@ -1,52 +1,14 @@ -PELICANOPTS= -BASEDIR=$(CURDIR) -INPUTDIR=$(BASEDIR)/content -OUTPUTDIR=$(BASEDIR)/output -CONFFILE=$(BASEDIR)/pelicanconf.py -PUBLISHCONF=$(BASEDIR)/publishconf.py - -VENV := $(shell echo $${VIRTUAL_ENV-$(shell pwd)/.venv}) -VIRTUALENV = python3 -m venv -INSTALL_STAMP = $(VENV)/.install.stamp - -PYTHON=$(VENV)/bin/python -PELICAN=$(VENV)/bin/pelican -PIP=$(VENV)/bin/pip -GIT=/usr/bin/git - -install: $(INSTALL_STAMP) -$(INSTALL_STAMP): $(PYTHON) requirements.txt - $(VENV)/bin/pip install -r requirements.txt - touch $(INSTALL_STAMP) +install: + python3 -m venv .v + .v/bin/pip install -r requirements.txt mkdir output -virtualenv: $(PYTHON) -$(PYTHON): - $(VIRTUALENV) $(VENV) - -html: install - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) - -clean: - [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) - rm -rf $(VENV) - -serve: install - $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) - regenerate: - cd $(OUTPUTDIR) && $(PYTHON) -m pelican.server & - $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + .v/bin/pelican -lr -publish: install - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) - echo "blog.notmyidea.org" > $(OUTPUTDIR)/CNAME - -github: publish - ghp-import -n $(OUTPUTDIR) - $(GIT) push origin gh-pages - -up: - $(GIT) add content/* && $(GIT) commit -am "Update blog" && $(GIT) push && make github -.PHONY: html clean serve devserver publish +publish: + .v/bin/pelican -s publishconf.py + echo "blog.notmyidea.org" > output/CNAME + .v/bin/ghp-import -n output + git push origin gh-pages diff --git a/content/Journal/.ztr-directory b/content/Journal/.ztr-directory deleted file mode 100644 index 2f1101d..0000000 --- a/content/Journal/.ztr-directory +++ /dev/null @@ -1 +0,0 @@ -{"sorting":"name-down","virtualDirectories":[]} \ No newline at end of file diff --git a/content/Journal/2012-10-04-brassage.md b/content/Journal/2012-10-04-brassage.md index 847cb13..6a0a272 100644 --- a/content/Journal/2012-10-04-brassage.md +++ b/content/Journal/2012-10-04-brassage.md @@ -36,7 +36,7 @@ Première étape: **le concassage**. On avait 6kg d'orge maltée à concasser (plus exactement 6kg de malt pâle *7EDC* et 500g de malt cara *50EDC*). -![Image de concassage.](images/concassage.jpg) +![Image de concassage.](Blog/output/images/concassage.jpg) Attention, pas trop fin dis donc \! On ne veut pas de la poudre, on veut simplement permettre à l'amidon de se dissoudre dans l'eau. Si on @@ -52,7 +52,7 @@ se relayer sur le moulin, parce que nos petits muscles fatiguaient assez vite; vous pouvez envisager de faire ça tout seul si vous êtes un tennisman). -![C'est dur \!](images/concasse.jpg) +![C'est dur \!](Blog/output/images/concasse.jpg) La seconde étape, **l'empatage**. Il s'agit de faire chauffer notre orge maltée à différentes températures. Les fois précédentes, on avait @@ -66,7 +66,7 @@ pas loin de 3h30, inertie quand tu nous tiens\! On se rends compte de la taille de la marmite un peu là: -![Une grosse marmite](images/marmite.jpg) +![Une grosse marmite](Blog/output/images/marmite.jpg) Une fois l'eau à température (54°C), il faut ajouter le malt et le laisser durant 30mn à cette température, puis augmenter jusqu'à 65°C @@ -80,7 +80,7 @@ comptant sur le fait qu'elle perdra de sa température (20°C à peu près) en étant utilisée. On a filtré deux fois pour être sûr de ne rien perdre. -![Filtrage filtrage...](images/filtrage.jpg) +![Filtrage filtrage...](Blog/output/images/filtrage.jpg) L'étape d'après (la quatrième, vous suivez), c'est **le houblonnage**. On va faire infuser notre "solution aqueuse" (wouah, on dirait de la @@ -92,13 +92,13 @@ comme ça, mais en fait ça ne l'est pas tant que ça: il faut réussir à passer notre liquide qui était en ébullition à 54°C en un temps acceptable. Pour ça, on a utilisé un serpentin confectionné main. -![Notre refroidisseur fait main par Fred.](images/refroidisseur.jpg) +![Notre refroidisseur fait main par Fred.](Blog/output/images/refroidisseur.jpg) Ça nous a permis de passer de 100°C à 54°C en… 35 minutes quand même \! (Nous avions essayé les fois précédentes de gérer ça à coup de baignoire et de glaçons, les temps n'étaient absolument pas au rendez-vous). -![Décidement pas.](images/refroidissement.jpg) +![Décidement pas.](Blog/output/images/refroidissement.jpg) Je disais dernière étape, mais il ne faut pas oublier de rajouter les levures, qui elles vont faire tout le travail et transformer tout ça en… diff --git a/content/Technologie/2011-10-15-ihatemoney.md b/content/Technologie/2011-10-15-ihatemoney.md index 9e93901..5fe28f6 100644 --- a/content/Technologie/2011-10-15-ihatemoney.md +++ b/content/Technologie/2011-10-15-ihatemoney.md @@ -33,7 +33,7 @@ There is no need to register for an account or whatnot, just enter a project name, a secret code and a contact email, invite friends and that's it (this was inspired by doodle)\! -![Capture d'écran du site.](images/ihatemoney.png) +![Capture d'écran du site.](Blog/output/images/ihatemoney.png) You can try the project at for now, and the code lives at . diff --git a/content/Technologie/2012-10-22-cheese-and-code-result.md b/content/Technologie/2012-10-22-cheese-and-code-result.md index 950dec5..3138ca9 100644 --- a/content/Technologie/2012-10-22-cheese-and-code-result.md +++ b/content/Technologie/2012-10-22-cheese-and-code-result.md @@ -22,7 +22,7 @@ In case you wonder, daybed is effectively the name of a couch. We chose this name because of the similarities (in the sound) with **db**, and because we're using **CouchDB** as a backend. -![Daybed is a big couch\!](images/daybed.jpg) +![Daybed is a big couch\!](Blog/output/images/daybed.jpg) We mainly hacked on daybed and are pretty close to the release of the first version, meaning that we have something working. diff --git a/content/Technologie/2012-12-29-status.md b/content/Technologie/2012-12-29-status.md index aeff99f..b052bef 100644 --- a/content/Technologie/2012-12-29-status.md +++ b/content/Technologie/2012-12-29-status.md @@ -16,7 +16,7 @@ donner naissance à [whiskerboard](https://github.com/bfirsh/whiskerboard) (la planche moustachue, pour les non anglophones). -![Capture d'écran du site.](images/status_board.png) +![Capture d'écran du site.](Blog/output/images/status_board.png) ## Vérifier le statut des services diff --git a/content/Technologie/2013-02-04-cornice-cors.md b/content/Technologie/2013-02-04-cornice-cors.md index f958e19..25fab48 100644 --- a/content/Technologie/2013-02-04-cornice-cors.md +++ b/content/Technologie/2013-02-04-cornice-cors.md @@ -44,7 +44,7 @@ OPTIONS call. The server answers, and tell what is available and what isn't: -![The CORS flow (from the HTML5 CORS tutorial)](images/cors_flow.png) +![The CORS flow (from the HTML5 CORS tutorial)](Blog/output/images/cors_flow.png) - 1a. The User-Agent, rather than doing the call directly, asks the server, the API, the permission to do the request. It does so with diff --git a/requirements.txt b/requirements.txt index 3ba845f..6862400 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pelican markdown datefinder typogrify +ghp-import