From c42a973a2bb12f7c006b6fc72f1af2051b3b1c3f Mon Sep 17 00:00:00 2001 From: vince Date: Fri, 7 Jan 2022 20:18:17 +0100 Subject: [PATCH] =?UTF-8?q?ajoute=20la=20g=C3=A9n=C3=A9ration=20automatiqu?= =?UTF-8?q?e=20des=20actualit=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ Makefile | 17 +++++++++++++++-- README.md | 11 +++++++++-- agendadulibre.xsl | 27 +++++++++++++++++++++++++++ template.html | 1 + 5 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 agendadulibre.xsl diff --git a/.gitignore b/.gitignore index 9776e96..e1209d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ web !web/.gitkeep + +agendadulibre.xml +news.md diff --git a/Makefile b/Makefile index b8d942c..907da72 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,22 @@ TEMPLATE = template.html -all: web/style.css web/index.html web/contact.html web/legal.html web/about.html web/services.html +PANOC_BIN = pandoc +WGET_BIN = wget +XSLTPROC_BIN = xsltproc + +all: web/style.css web/index.html web/contact.html web/legal.html web/about.html web/services.html web/news.html + +clean: + rm agendadulibre.xml news.md web/style.css: style.css cp $< $@ web/%.html: %.md $(TEMPLATE) - pandoc --from markdown $< --output $@ --standalone --template $(TEMPLATE) + $(PANOC_BIN) --from markdown $< --output $@ --standalone --template $(TEMPLATE) + +agendadulibre.xml: + $(WGET_BIN) --output-document=$@ 'https://www.agendadulibre.org/events.xml?tag=cagull&future=false' + +news.md: agendadulibre.xsl agendadulibre.xml + $(XSLTPROC_BIN) $^ > $@ diff --git a/README.md b/README.md index f5dedfa..08fdd6f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ Projet git de la page d'accueil -Pour générer : +Pour générer le site statique dans le dossier `web` : + +``` +make all +``` + +Pour régénérer aussi la page d'actualités depuis l'Agenda du libre : + ``` -pandoc --from markdown index.md --output index.html --standalone --template template.html +make clean all ``` diff --git a/agendadulibre.xsl b/agendadulibre.xsl new file mode 100644 index 0000000..0528d90 --- /dev/null +++ b/agendadulibre.xsl @@ -0,0 +1,27 @@ + + + + + --- title: Actualités --- Les événements liés à l'association sont publiés sur [l'Agenda du libre](https://www.agendadulibre.org). + + + + ## + + + **Date:** + + + **Lieu:** + + * + + à + + * + + + + + + diff --git a/template.html b/template.html index 3a1dd46..7a6d069 100644 --- a/template.html +++ b/template.html @@ -16,6 +16,7 @@