From 54a933c83a4cf779b0933e38a0e4bc8d7f3ef113 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 8 May 2018 17:25:41 +0200 Subject: [PATCH] change approach, too much m4 --- Makefile | 36 --- build.sh | 23 ++ default.css | 7 + index.footer | 3 + index.m4 => index.header | 14 +- index.html | 272 ++++-------------- m4/indexTOCEntry.m4 | 4 - m4/macros.m4 | 11 - m4/mkfile.mk | 0 m4/post.m4 | 3 - m4/posts.mk | 8 - pages/impressum/article.m4 | 14 - pages/keys/article.m4 | 4 - plain/Makefile | 12 - plain/logfile.m4 | 63 ---- posts/2013-06-26.01/article.html | 30 +- posts/2013-06-26.01/article.m4 | 42 --- posts/2013-06-27.01/article.html | 22 +- posts/2013-06-27.01/article.m4 | 46 --- posts/2013-06-27.02/article.html | 21 +- posts/2013-06-27.02/article.m4 | 35 --- posts/2013-07-01.01/article.html | 23 +- posts/2013-07-01.01/article.m4 | 126 -------- posts/2013-07-24.01/article.html | 21 +- posts/2013-07-24.01/article.m4 | 78 ----- posts/2013-09-09.01/article.html | 21 +- posts/2013-09-09.01/article.m4 | 110 ------- posts/2013-09-10.01/article.html | 25 +- posts/2013-09-10.01/article.m4 | 116 -------- posts/2013-09-11.01/article.html | 21 +- posts/2013-09-11.01/article.m4 | 74 ----- posts/2013-09-21.01/article.html | 23 +- posts/2013-09-21.01/article.m4 | 17 -- posts/2013-11-07.01/article.html | 25 +- posts/2013-11-07.01/article.m4 | 67 ----- posts/2013-11-08.01/article.html | 21 +- posts/2013-11-08.01/article.m4 | 47 --- posts/2014-01-08.01/article.html | 21 +- posts/2014-01-08.01/article.m4 | 30 -- posts/2014-01-08.02/article.html | 21 +- posts/2014-01-08.02/article.m4 | 94 ------ posts/2014-01-14.01/article.html | 21 +- posts/2014-01-14.01/article.m4 | 11 - posts/2014-01-15.01/article.html | 21 +- posts/2014-01-15.01/article.m4 | 22 -- posts/2014-01-18.01/article.html | 21 +- posts/2014-01-18.01/article.m4 | 44 --- posts/2014-01-22.01/article.html | 23 +- posts/2014-01-22.01/article.m4 | 33 --- posts/2014-02-08.01/article.html | 21 +- posts/2014-02-08.01/article.m4 | 25 -- posts/2014-02-13.01/article.html | 23 +- posts/2014-02-13.01/article.m4 | 15 - posts/2014-02-21.01/article.html | 21 +- posts/2014-02-21.01/article.m4 | 9 - posts/2014-03-09.01/article.html | 21 +- posts/2014-03-09.01/article.m4 | 17 -- posts/2014-03-11.01/article.html | 23 +- posts/2014-03-11.01/article.m4 | 32 --- .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 2 +- .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 posts/2015-06-05.01/article.html | 21 +- posts/2015-06-05.01/article.m4 | 7 - .../{article.m4 => article.html} | 4 +- .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 .../{article.m4 => article.html} | 0 toc.inc | 249 ++++------------ 87 files changed, 256 insertions(+), 2081 deletions(-) delete mode 100644 Makefile create mode 100755 build.sh create mode 100644 default.css create mode 100644 index.footer rename index.m4 => index.header (87%) delete mode 100644 m4/indexTOCEntry.m4 delete mode 100644 m4/macros.m4 delete mode 100644 m4/mkfile.mk delete mode 100644 m4/post.m4 delete mode 100644 m4/posts.mk delete mode 100644 pages/impressum/article.m4 delete mode 100644 pages/keys/article.m4 delete mode 100644 plain/Makefile delete mode 100644 plain/logfile.m4 delete mode 100644 posts/2013-06-26.01/article.m4 delete mode 100644 posts/2013-06-27.01/article.m4 delete mode 100644 posts/2013-06-27.02/article.m4 delete mode 100644 posts/2013-07-01.01/article.m4 delete mode 100644 posts/2013-07-24.01/article.m4 delete mode 100644 posts/2013-09-09.01/article.m4 delete mode 100644 posts/2013-09-10.01/article.m4 delete mode 100644 posts/2013-09-11.01/article.m4 delete mode 100644 posts/2013-09-21.01/article.m4 delete mode 100644 posts/2013-11-07.01/article.m4 delete mode 100644 posts/2013-11-08.01/article.m4 delete mode 100644 posts/2014-01-08.01/article.m4 delete mode 100644 posts/2014-01-08.02/article.m4 delete mode 100644 posts/2014-01-14.01/article.m4 delete mode 100644 posts/2014-01-15.01/article.m4 delete mode 100644 posts/2014-01-18.01/article.m4 delete mode 100644 posts/2014-01-22.01/article.m4 delete mode 100644 posts/2014-02-08.01/article.m4 delete mode 100644 posts/2014-02-13.01/article.m4 delete mode 100644 posts/2014-02-21.01/article.m4 delete mode 100644 posts/2014-03-09.01/article.m4 delete mode 100644 posts/2014-03-11.01/article.m4 rename posts/2014-04-07.01/{article.m4 => article.html} (100%) rename posts/2014-05-11.01/{article.m4 => article.html} (100%) rename posts/2014-05-11.02/{article.m4 => article.html} (100%) rename posts/2014-08-04.01/{article.m4 => article.html} (100%) rename posts/2014-10-04.01/{article.m4 => article.html} (100%) rename posts/2014-10-27.01/{article.m4 => article.html} (100%) rename posts/2014-12-11.01/{article.m4 => article.html} (96%) rename posts/2014-12-15.01/{article.m4 => article.html} (100%) rename posts/2015-01-01.01/{article.m4 => article.html} (100%) delete mode 100644 posts/2015-06-05.01/article.m4 rename posts/2015-06-05.02/{article.m4 => article.html} (80%) rename posts/2015-06-05.03/{article.m4 => article.html} (100%) rename posts/2015-06-05.04/{article.m4 => article.html} (100%) rename posts/2015-06-17.01/{article.m4 => article.html} (100%) rename posts/2015-09-14.01/{article.m4 => article.html} (100%) rename posts/2015-10-12.01/{article.m4 => article.html} (100%) rename posts/2016-03-03.01/{article.m4 => article.html} (100%) rename posts/2016-09-09.01/{article.m4 => article.html} (100%) rename posts/2016-09-12.01/{article.m4 => article.html} (100%) rename posts/2016-10-14.01/{article.m4 => article.html} (100%) rename posts/2016-11-02.01/{article.m4 => article.html} (100%) rename posts/2016-12-19.01/{article.m4 => article.html} (100%) rename posts/2017-07-04.01/{article.m4 => article.html} (100%) rename posts/2018-01-26.01/{article.m4 => article.html} (100%) rename posts/2018-02-22.01/{article.m4 => article.html} (100%) rename posts/2018-04-30.01/{article.m4 => article.html} (100%) diff --git a/Makefile b/Makefile deleted file mode 100644 index 165b060..0000000 --- a/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -POSTS = $(shell find ./posts -mindepth 1 -type d | sort -r) -PAGES = $(shell find ./pages -mindepth 1 -type d) - -.PHONY: all -all: - $(MAKE) index - -.PHONY: posts -posts: - for d in $(POSTS); do (echo $$d; cd $$d; $(MAKE) -f ../../m4/posts.mk); done - -.PHONY: pages -pages: - for d in $(PAGES); do (echo $$d; cd $$d; $(MAKE) -f ../../m4/posts.mk); done - -.PHONY: plain -plain: - cd ./plain; $(MAKE) - -.PHONY: clean -clean: - for d in $(POSTS); do (cd $$d; $(MAKE) -f ../../m4/posts.mk cleanposts); done - for d in $(PAGES); do (cd $$d; $(MAKE) -f ../../m4/posts.mk cleanposts); done - -rm -f toc.inc - -rm -f index.html - -.PHONY: index -index: posts pages plain - -rm -f toc.inc - for d in $(PAGES); do (cd $$d; m4 -D URL=$$d/article.html ../../m4/macros.m4 article.m4 ../../m4/indexTOCEntry.m4) >> toc.inc; done - for d in $(POSTS); do (cd $$d; m4 -D URL=$$d/article.html ../../m4/macros.m4 article.m4 ../../m4/indexTOCEntry.m4) >> toc.inc; done - m4 ./m4/macros.m4 index.m4 > index.html - -.PHONY: install -devinstall: index - rsync -av --delete --exclude-from excludes.lst . /var/www/html \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..62cc72b --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +POSTS=`find ./posts -mindepth 1 -type d | sort -r` +INDEX_TOC=`pwd`/toc.inc + + +rm -f $INDEX_TOC +for I in $POSTS; do + ( + echo $I; + cd $I; + TITLE=`cat article.html | grep '' | sed 's!^[[:space:]]*<title>\(.*\)!\1!'` + DATE=`cat article.html | grep '!\1!'` + PATH=`echo $I | sed 's!^\./!!'` + echo "
  • $DATE - $TITLE
  • " >> $INDEX_TOC + ) +done + +cat index.header toc.inc index.footer > index.html + + +rsync -av --delete --exclude-from excludes.lst . /var/www/html + diff --git a/default.css b/default.css new file mode 100644 index 0000000..23d9322 --- /dev/null +++ b/default.css @@ -0,0 +1,7 @@ +body { + background-color: white; + font-family: "verdana", sans-serif; + font-size: 16px; +} + + diff --git a/index.footer b/index.footer new file mode 100644 index 0000000..fc5f8c6 --- /dev/null +++ b/index.footer @@ -0,0 +1,3 @@ + + + diff --git a/index.m4 b/index.header similarity index 87% rename from index.m4 rename to index.header index 606a37b..687a814 100644 --- a/index.m4 +++ b/index.header @@ -1,6 +1,11 @@ -HEADER - -

    Projects - just for fun

    + + + Projects - just for fun + + + + +

    Projects - just for fun

    I moved my blog away from wordpress.com. Reason is simple: I've no clue of DSGVO and I don't want to spend any time in it. And since I don't know which date wordpress.com is collecting and processing I stopped using it. @@ -20,7 +25,4 @@ And: yes, I know, this homepage is soooo ugly. I'm sorry, no CSS yet.

    Overview

    -FOOTER \ No newline at end of file diff --git a/index.html b/index.html index 4c25cc7..de749d6 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,11 @@ - - - - - - Projects - just for fun - - - - -

    Projects - just for fun

    + + + Projects - just for fun + + + + +

    Projects - just for fun

    I moved my blog away from wordpress.com. Reason is simple: I've no clue of DSGVO and I don't want to spend any time in it. And since I don't know which date wordpress.com is collecting and processing I stopped using it. @@ -29,209 +26,54 @@ And: yes, I know, this homepage is soooo ugly. I'm sorry, no CSS yet.

    Overview

    - - - + diff --git a/m4/indexTOCEntry.m4 b/m4/indexTOCEntry.m4 deleted file mode 100644 index 1b8a718..0000000 --- a/m4/indexTOCEntry.m4 +++ /dev/null @@ -1,4 +0,0 @@ -
  • -ifdef(`DATE', `DATE -')TITLE
    -ifdef(`ABSTRACT', `ABSTRACT') -
  • diff --git a/m4/macros.m4 b/m4/macros.m4 deleted file mode 100644 index 05ce7d5..0000000 --- a/m4/macros.m4 +++ /dev/null @@ -1,11 +0,0 @@ -define(`HEADER', ` - - - Projects - just for fun - - -') -define(`FOOTER', ` - - -') diff --git a/m4/mkfile.mk b/m4/mkfile.mk deleted file mode 100644 index e69de29..0000000 diff --git a/m4/post.m4 b/m4/post.m4 deleted file mode 100644 index 92fab0a..0000000 --- a/m4/post.m4 +++ /dev/null @@ -1,3 +0,0 @@ -HEADER -CONTENT -FOOTER diff --git a/m4/posts.mk b/m4/posts.mk deleted file mode 100644 index 62f3028..0000000 --- a/m4/posts.mk +++ /dev/null @@ -1,8 +0,0 @@ -include ../../m4/mkfile.mk - -article.html: article.m4 - m4 ../../m4/macros.m4 article.m4 ../../m4/post.m4 > article.html - -.PHONY: cleanposts -cleanposts: - -rm -f article.html diff --git a/pages/impressum/article.m4 b/pages/impressum/article.m4 deleted file mode 100644 index 5d2a4be..0000000 --- a/pages/impressum/article.m4 +++ /dev/null @@ -1,14 +0,0 @@ -define(`TITLE', `Impressum') -define(`CONTENT', ` -Wolfgang Hottgenroth
    - -woho@hottis.de
    - -https://gitlab.com/wolutator
    - -https://www.xing.com/profile/Wolfgang_Hottgenroth
    - -https://twitter.com/wollud1969
    - -https://keybase.io/wolutator/
    -') \ No newline at end of file diff --git a/pages/keys/article.m4 b/pages/keys/article.m4 deleted file mode 100644 index 6bb9956..0000000 --- a/pages/keys/article.m4 +++ /dev/null @@ -1,4 +0,0 @@ -define(`TITLE', `Keys') -define(`CONTENT', ` -My public keys. -') \ No newline at end of file diff --git a/plain/Makefile b/plain/Makefile deleted file mode 100644 index 89ec687..0000000 --- a/plain/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -include ../m4/mkfile.mk - - -%.html : %.m4 - m4 ../m4/macros.m4 $< > $@ - - -logfile.html: logfile.m4 - -.PHONY: cleanplain -cleanplain: - -rm -f logfile.html diff --git a/plain/logfile.m4 b/plain/logfile.m4 deleted file mode 100644 index c2b1978..0000000 --- a/plain/logfile.m4 +++ /dev/null @@ -1,63 +0,0 @@ -HEADER - -

    -This homepage is hosted on a standard Debian Stretch installation with a standard Apache webserver running on it. -

    - -

    -The logfile is written using this configuration statement: - -

    -LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    -
    -

    - -

    -The meaning of the format string elements are: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    %hRemote hostname or IP address. This is your address.
    %lRemote logname, if provided by identd. This is usually empty and represented by a dash.
    %uRemote username if the request was authenticated. This is, what you would enter in a basic authentication dialog. The public part of this homepage has no authenticated areas.
    %tThe date and time of the request.
    %rThe first line of the request, usually contains the URL you are requesting.
    $>sThe final status code of this request.
    %OBytes sent including headers.
    %{Referer}iWhat your browser puts into the variable Referer of your request. This is usually the address of the page which sent you here, like a search engine (Google, ...).
    %{User-Agent}iWhat your browser puts into the variable User-Agent of your request, usually its own software identification.
    -

    - -

    -A typical log entry looks like this: - -

    -217.7.123.85 - - [02/May/2018:14:53:05 +0200] "GET / HTTP/1.1" 200 4984 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36"
    -
    -

    - -

    -For more information consult the Apache documentation at http://httpd.apache.org/docs/2.4/mod/mod_log_config.html. -

    - - -FOOTER \ No newline at end of file diff --git a/posts/2013-06-26.01/article.html b/posts/2013-06-26.01/article.html index cadc910..4ee79d6 100644 --- a/posts/2013-06-26.01/article.html +++ b/posts/2013-06-26.01/article.html @@ -1,18 +1,11 @@ - - - - - - - - - - Projects - just for fun - - - - -

    Ingredients:

    + + + A Web-controlled Picture Frame + + + + +

    Ingredients: