From 2488421f0a91bcca89ce3b1e4302550f50ea6b54 Mon Sep 17 00:00:00 2001 From: Never Gude Date: Sun, 4 Jan 2026 20:59:52 +0100 Subject: [PATCH] update Makefile and directory structure --- Makefile | 48 +++ about.html | 66 ++++ .../eh/eh/eh/eh-eh/about.md => about.md | 0 .../eh/eh-eh/articles.json => articles.json | 8 + .../random-linux-utils-2.html | 29 +- articles/random-linux-utils-2.md | 20 ++ .../random-linux-utils.html | 29 +- .../random-linux-utils.md | 0 .../eh/eh-eh/pandoc => images}/cups_left.svg | 0 .../pandoc => images}/cups_left_dark.svg | 0 .../eh/eh-eh/pandoc => images}/cups_logo.svg | 0 .../pandoc => images}/cups_logo_dark.svg | 0 .../eh/eh-eh/pandoc => images}/cups_right.svg | 0 .../pandoc => images}/cups_right_dark.svg | 0 .../eh/eh/eh-eh/pandoc => images}/favicon.png | Bin .../eh/eh-eh/pandoc => images}/recursion.gif | Bin .../eh/eh/eh/eh-eh/pandoc => images}/sand.png | Bin index.html | 88 +++++ .../eh/eh/eh/eh-eh/index.md => index.md | 0 .../pandoc => pandoc}/meta-json-template.txt | 0 .../eh/eh-eh/pandoc => pandoc}/template.html | 6 +- public_html/eh/eh/eh/eh-eh/Makefile | 27 -- public_html/eh/eh/eh/eh-eh/about.html | 10 +- public_html/eh/eh/eh/eh-eh/article.json.tmp.0 | 1 - public_html/eh/eh/eh/eh-eh/article.json.tmp.1 | 8 - public_html/eh/eh/eh/eh-eh/articles.json.tmp | 12 - .../eh/eh/eh/eh-eh/images/cups_left.svg | 79 +++++ .../eh/eh/eh/eh-eh/images/cups_left_dark.svg | 101 ++++++ .../eh/eh/eh/eh-eh/images/cups_logo.svg | 103 ++++++ .../eh/eh/eh/eh-eh/images/cups_logo_dark.svg | 34 ++ .../eh/eh/eh/eh-eh/images/cups_right.svg | 79 +++++ .../eh/eh/eh/eh-eh/images/cups_right_dark.svg | 101 ++++++ public_html/eh/eh/eh/eh-eh/images/favicon.png | Bin 0 -> 3760 bytes .../eh/eh/eh/eh-eh/images/recursion.gif | Bin 0 -> 11512892 bytes public_html/eh/eh/eh/eh-eh/images/sand.png | Bin 0 -> 251794 bytes public_html/eh/eh/eh/eh-eh/index.html | 18 +- .../eh/eh/eh/eh-eh/random-linux-utils-2.html | 145 ++++++++ .../eh/eh/eh/eh-eh/random-linux-utils.html | 13 +- .../eh/eh/eh/eh-eh/{pandoc => }/style.css | 27 +- style.css | 323 ++++++++++++++++++ 40 files changed, 1260 insertions(+), 115 deletions(-) create mode 100644 Makefile create mode 100644 about.html rename public_html/eh/eh/eh/eh-eh/about.md => about.md (100%) rename public_html/eh/eh/eh/eh-eh/articles.json => articles.json (51%) rename public_html/eh/eh/eh/eh-eh/article-2.html => articles/random-linux-utils-2.html (75%) create mode 100644 articles/random-linux-utils-2.md rename public_html/eh/eh/eh/eh-eh/article-1.html => articles/random-linux-utils.html (75%) rename {public_html/eh/eh/eh/eh-eh/articles => articles}/random-linux-utils.md (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/cups_left.svg (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/cups_left_dark.svg (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/cups_logo.svg (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/cups_logo_dark.svg (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/cups_right.svg (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/cups_right_dark.svg (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/favicon.png (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/recursion.gif (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => images}/sand.png (100%) create mode 100644 index.html rename public_html/eh/eh/eh/eh-eh/index.md => index.md (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => pandoc}/meta-json-template.txt (100%) rename {public_html/eh/eh/eh/eh-eh/pandoc => pandoc}/template.html (94%) delete mode 100644 public_html/eh/eh/eh/eh-eh/Makefile delete mode 100644 public_html/eh/eh/eh/eh-eh/article.json.tmp.0 delete mode 100644 public_html/eh/eh/eh/eh-eh/article.json.tmp.1 delete mode 100644 public_html/eh/eh/eh/eh-eh/articles.json.tmp create mode 100644 public_html/eh/eh/eh/eh-eh/images/cups_left.svg create mode 100644 public_html/eh/eh/eh/eh-eh/images/cups_left_dark.svg create mode 100644 public_html/eh/eh/eh/eh-eh/images/cups_logo.svg create mode 100644 public_html/eh/eh/eh/eh-eh/images/cups_logo_dark.svg create mode 100644 public_html/eh/eh/eh/eh-eh/images/cups_right.svg create mode 100644 public_html/eh/eh/eh/eh-eh/images/cups_right_dark.svg create mode 100644 public_html/eh/eh/eh/eh-eh/images/favicon.png create mode 100644 public_html/eh/eh/eh/eh-eh/images/recursion.gif create mode 100644 public_html/eh/eh/eh/eh-eh/images/sand.png create mode 100644 public_html/eh/eh/eh/eh-eh/random-linux-utils-2.html rename public_html/eh/eh/eh/eh-eh/{pandoc => }/style.css (92%) create mode 100644 style.css diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1f3faf4 --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +SHELL = /bin/sh +INSTALLDIR := ./public_html/eh/eh/eh/eh-eh/ + +# The name of the stylesheet. This needs to be copied to any directory containing html files that use it. +style := style.css +images := images + +# Main html template that pandoc uses to generate .html from .md files +template := pandoc/template.html + +# Template for extracting metadata of .md files in json format +list_template := pandoc/meta-json-template.txt + +# List of articles with their metadata to be used in the creation of the article list in index.html +article_list := articles.json + +# article targets +articles := $(patsubst %.md,%.html,$(wildcard articles/*.md)) + +all: index.html about.html + +install: + cp -r index.html about.html $(articles) $(style) $(images) $(INSTALLDIR); \ + +clean: + echo '{"articles": []}' > $(article_list); \ + rm index.html about.html $(articles); + +$(articles): %.html: %.md + # Build articles using pandoc + pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $@; \ + + # Extract metadata from .md file + # pandoc $< --template $(list_template) > article.json.tmp.0; \ + + # Append filename field to article object. This is used to link to the article from index.html. + # pandoc $< --template $(list_template) | jq '. += {"filename": "$(notdir $@)"}' > article.json.tmp; \ + + # Append article object to the article list + jq '.articles += [$(shell pandoc $< --template $(list_template) | jq '. += {"filename": "$(notdir $@)"}' )]' $(article_list) > articles.json.tmp; \ + mv ./articles.json.tmp $(article_list); \ + +index.html: index.md $(articles) + # Build index.html with metadata injected from articles_list + pandoc $< --template $(template) --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@; \ + +about.html: about.md + pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $@ diff --git a/about.html b/about.html new file mode 100644 index 0000000..58eca52 --- /dev/null +++ b/about.html @@ -0,0 +1,66 @@ + + + + + + + About + + + + + + +
+

About

+
+
+ +
+

Stuff

+

i=1ki=k(k+1)2 \sum_{i=1}^k i = \frac{k(k+1)}{2}

+
+ +
+ + + diff --git a/public_html/eh/eh/eh/eh-eh/about.md b/about.md similarity index 100% rename from public_html/eh/eh/eh/eh-eh/about.md rename to about.md diff --git a/public_html/eh/eh/eh/eh-eh/articles.json b/articles.json similarity index 51% rename from public_html/eh/eh/eh/eh-eh/articles.json rename to articles.json index 6981602..1d75dc1 100644 --- a/public_html/eh/eh/eh/eh-eh/articles.json +++ b/articles.json @@ -1,5 +1,13 @@ { "articles": [ + { + "author": "Never Gude", + "date": "4.1.2026", + "subtitle": "Neat things I picked up along the way", + "summary": "Tricks and tools I learned about, while tweaking my Linux sytem or trying to do productive things.", + "title": "Random linux utilities 2", + "filename": "random-linux-utils-2.html" + }, { "author": "Never Gude", "date": "25.7.2025", diff --git a/public_html/eh/eh/eh/eh-eh/article-2.html b/articles/random-linux-utils-2.html similarity index 75% rename from public_html/eh/eh/eh/eh-eh/article-2.html rename to articles/random-linux-utils-2.html index 74154d2..9a137d4 100644 --- a/public_html/eh/eh/eh/eh-eh/article-2.html +++ b/articles/random-linux-utils-2.html @@ -5,7 +5,7 @@ - Article 1 + Random linux utilities 2 - +
-

Article 1

-

Just testimg

+

Random linux utilities 2

+

Neat things I picked up along the way

Never Gude

-

10.12.2025

+

4.1.2026

diff --git a/articles/random-linux-utils-2.md b/articles/random-linux-utils-2.md new file mode 100644 index 0000000..36e276b --- /dev/null +++ b/articles/random-linux-utils-2.md @@ -0,0 +1,20 @@ +--- +title: Random linux utilities 2 +subtitle: Neat things I picked up along the way +author: Never Gude +date: 4.1.2026 +summary: Tricks and tools I learned about, while tweaking my Linux sytem or trying to do productive things. +--- + +## Merge pdfs +### Using Ghostscript +Ghostscript has a feature to merge multiple pdf files into one. +Although ImageMagick also has this feature, I prefer this one, as it doesn't rasterize and scales down +the pdf files. + +```bash +gs -dNOPAUSE -sDEVICE=pdfwrite \ + -sOUTPUTFILE=output.pdf \ + -dBATCH 1.pdf 2.pdf +``` + diff --git a/public_html/eh/eh/eh/eh-eh/article-1.html b/articles/random-linux-utils.html similarity index 75% rename from public_html/eh/eh/eh/eh-eh/article-1.html rename to articles/random-linux-utils.html index 7600495..cad423f 100644 --- a/public_html/eh/eh/eh/eh-eh/article-1.html +++ b/articles/random-linux-utils.html @@ -5,7 +5,7 @@ - Article DSADASD + Random linux utilities - +
-

Article DSADASD

-

Just testimg too

+

Random linux utilities

+

Neat things I picked up along the way

Never Gude

-

10.12.2025

+

25.7.2025

diff --git a/public_html/eh/eh/eh/eh-eh/articles/random-linux-utils.md b/articles/random-linux-utils.md similarity index 100% rename from public_html/eh/eh/eh/eh-eh/articles/random-linux-utils.md rename to articles/random-linux-utils.md diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/cups_left.svg b/images/cups_left.svg similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/cups_left.svg rename to images/cups_left.svg diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/cups_left_dark.svg b/images/cups_left_dark.svg similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/cups_left_dark.svg rename to images/cups_left_dark.svg diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/cups_logo.svg b/images/cups_logo.svg similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/cups_logo.svg rename to images/cups_logo.svg diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/cups_logo_dark.svg b/images/cups_logo_dark.svg similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/cups_logo_dark.svg rename to images/cups_logo_dark.svg diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/cups_right.svg b/images/cups_right.svg similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/cups_right.svg rename to images/cups_right.svg diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/cups_right_dark.svg b/images/cups_right_dark.svg similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/cups_right_dark.svg rename to images/cups_right_dark.svg diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/favicon.png b/images/favicon.png similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/favicon.png rename to images/favicon.png diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/recursion.gif b/images/recursion.gif similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/recursion.gif rename to images/recursion.gif diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/sand.png b/images/sand.png similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/sand.png rename to images/sand.png diff --git a/index.html b/index.html new file mode 100644 index 0000000..8e2bfe0 --- /dev/null +++ b/index.html @@ -0,0 +1,88 @@ + + + + + + + Home + + + + + + +
+

Home

+
+
+ +
+ +
+ + +
+ + + diff --git a/public_html/eh/eh/eh/eh-eh/index.md b/index.md similarity index 100% rename from public_html/eh/eh/eh/eh-eh/index.md rename to index.md diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/meta-json-template.txt b/pandoc/meta-json-template.txt similarity index 100% rename from public_html/eh/eh/eh/eh-eh/pandoc/meta-json-template.txt rename to pandoc/meta-json-template.txt diff --git a/public_html/eh/eh/eh/eh-eh/pandoc/template.html b/pandoc/template.html similarity index 94% rename from public_html/eh/eh/eh/eh-eh/pandoc/template.html rename to pandoc/template.html index 851f94f..6c96ec4 100644 --- a/public_html/eh/eh/eh/eh-eh/pandoc/template.html +++ b/pandoc/template.html @@ -117,9 +117,9 @@ $endfor$ diff --git a/public_html/eh/eh/eh/eh-eh/Makefile b/public_html/eh/eh/eh/eh-eh/Makefile deleted file mode 100644 index 2b72293..0000000 --- a/public_html/eh/eh/eh/eh-eh/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -template := pandoc/template.html -style := pandoc/style.css - -article_list := articles.json -list_template := pandoc/meta-json-template.txt - -articles := $(patsubst %.md,%.html,$(wildcard articles/*.md)) - -all: index.html about.html - -clean: - echo '{"articles": []}' > $(article_list); \ - # rm $(notdir $(articles)); \ - rm ./index.html ./about.html ./articles.json.tmp; - -$(articles): %.html: %.md - pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $(notdir $@); \ - pandoc $< --template $(list_template) > article.json.tmp.0; \ - jq '. += {"filename": "$(notdir $@)"}' article.json.tmp.0 > article.json.tmp.1; \ - jq '.articles += [$(shell cat article.json.tmp.1)]' $(article_list) > articles.json.tmp; \ - cat ./articles.json.tmp > ./articles.json; - -index.html: index.md $(articles) - pandoc $< --template $(template) --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@ - -about.html: about.md - pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $@ diff --git a/public_html/eh/eh/eh/eh-eh/about.html b/public_html/eh/eh/eh/eh-eh/about.html index cd61b34..58eca52 100644 --- a/public_html/eh/eh/eh/eh-eh/about.html +++ b/public_html/eh/eh/eh/eh-eh/about.html @@ -22,7 +22,7 @@ vertical-align: middle; } - +