summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-02-06 05:27:25 +0100
committerache <ache@ache.one>2018-02-06 05:27:25 +0100
commit2aea371b5eb5b473fbfb5cadeb24d0bdb6a5647d (patch)
treed983ecf67977f37100e3cc7102cf37c630ccda5d
parentNew format for the article (diff)
HTML5 compatible tools
-rw-r--r--article/duckduckgo_google_en_mieux.m40
-rw-r--r--article/duckduckgo_google_en_mieux_intro.html10
-rw-r--r--makefile12
3 files changed, 7 insertions, 15 deletions
diff --git a/article/duckduckgo_google_en_mieux.m4 b/article/duckduckgo_google_en_mieux.m4
deleted file mode 100644
index e69de29..0000000
--- a/article/duckduckgo_google_en_mieux.m4
+++ /dev/null
diff --git a/article/duckduckgo_google_en_mieux_intro.html b/article/duckduckgo_google_en_mieux_intro.html
deleted file mode 100644
index 1ad1bb9..0000000
--- a/article/duckduckgo_google_en_mieux_intro.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<article id="contenu" class="post hentry clearfix"><section>
-<h1>DuckDuckGo, Google en mieux ?</h1><p><img src="article/res/DuckDuckGo_Logo.svg" alt="Logo DuckDuckGo"></img></p><p>Depuis un certain temps déjà, Google ne se consacre plus entièrement à
-son moteur de recherche. En effet, la firme est déjà bien implentée dans
-la plupart des pays occidentaux où elle est le site le plus visité. Mais
-la concurrence, elle, s'est développée. Les moteurs de recherches tels
-que DuckDuckGo évoluent avec le temps, jusqu'à devenir plus pratique et
-ergonomique que Google.</p>
-</section>
-<a class="suite" href="article/duckduckgo_google_en_mieux.html">Lire la suite</a>
-</article>
diff --git a/makefile b/makefile
index bc50fb0..cbc1401 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,6 @@
+MD_CMD=remark --rc-path remarkrc
+CATCH_CMD=pup
BASE_HTML=left.htm headers.htm
ALL_ARTICLES=$(wildcard article/*.md)
ALL_ARTICLES_OUT=$(ALL_ARTICLES:.md=.html)
@@ -7,14 +9,14 @@ ALL_ARTICLES_INTRO_OUT=$(ALL_ARTICLES:.md=_intro.html)
all: $(ALL_ARTICLES_OUT) $(BASE_HTML) index.html contact/index.html
article/%.html: article/%.md $(BASE_HTML)
- cat $< | markdown > ${@:.html=.htm}
+ cat $< | ${MD_CMD} > ${@:.html=.htm}
m4 -D TITLE_TITLE="`echo Licornes, hérissons et renards`" headers.m4 > ${basename $@}_header.html
m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.md=} -D HEADER_HEADER=${basename $@}_header.html -D CANONIC="/$@" article/article.m4 > $@
article/%_intro.html: article/%.html
- cat $< | hxselect "h1" > ${@:.html=.htm}
- cat $< | hxselect "h1+p" | sed 's/res\//article\/res\//' >> ${@:.html=.htm}
- cat $< | hxselect "h1+p+p" >> ${@:.html=.htm}
+ cat $< | ${CATCH_CMD} "h1" > ${@:.html=.htm}
+ cat $< | ${CATCH_CMD} "h1 + p" | sed 's/res\//article\/res\//' >> ${@:.html=.htm}
+ cat $< | ${CATCH_CMD} "h1 + p + p" >> ${@:.html=.htm}
m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.html=} article/intro.m4 > $@
articles.htm: $(ALL_ARTICLES_INTRO_OUT)
@@ -28,7 +30,7 @@ index.html: index.m4 $(BASE_HTML) headers_index.htm articles.htm
m4 $< > $@
contact/index.html: contact/index.md
- markdown $< > ${@:.html=.htm}
+ ${MD_CMD} $< > ${@:.html=.htm}
m4 -D TITLE_TITLE="`grep h1 ${@:.html=.htm} | cut -d'>' -f 2 | cut -d'<' -f 1`" headers.m4 > ${basename $@}_header.html
m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.md=} -D HEADER_HEADER=${basename $@}_header.html -D CANONIC="/contact" article/article.m4 > $@