This commit is contained in:
2026-04-27 01:30:33 +02:00
parent 9e29b8b096
commit 49e7930541
80 changed files with 924 additions and 703 deletions

View File

@@ -1,7 +1,39 @@
%rec: example
%key: filename
%type: note line
filename: default.service
bin: systemd
usage: mv {{filename}} /usr/lib/systemd/system/
+ systemctl daemon-reload
+ systemctl enable --now {{filename}}
note: Basic systemd service file
content: [Unit]
+
+ Description={{script}}
+
+ [Service]
+
+ ExecStart=/home/{{user}}/.local/bin/{{script}}.sh
+
+ Restart=always
+
+ Type=simple
+
+ User={{user}}
+
+ Group={{group}}
+
+ [Install]
+
+ WantedBy=multi-user.target
+
+ Alias=test.service
+
filename: food.sc
bin: sc-im
usage: {{bin}} {{filename}}
note: Basic sc-im example of adding and averaging
content: # This data file was generated by the Spreadsheet Calculator Improvised (sc-im)
+ # You almost certainly shouldn't edit it.
@@ -48,3 +80,43 @@ content: # This data file was generated by the Spreadsheet Calculator Improvised
+ pad 2 B6
+ pad 4 A10
+ goto A10
filename: lowdown.mk
bin: make
usage: {{bin}} -f {{filename}}
content: output: all
+
+ .PHONY: example
+ example: html/foot.html html/head.html
+ mkdir -p articles/
+ fortune > articles/fort_1.md
+ fortune > articles/fort_2.md
+
+ HTML = $(patsubst articles/%.md,public/%.html,$(wildcard articles/*.md))
+
+ $(HTML): public/ articles/ $(wildcard html/*)
+
+ html/head.html:
+ @mkdir $(@D)
+ echo '<head> Something about CSS probably </head>' > $@
+ echo '<body>' >> $@
+
+ html/foot.html: html/head.html
+ echo '</body>' >> $@
+
+ public/%.html : articles/%.md
+ cat html/head.html > $@
+ lowdown $< >> $@
+ cat html/foot.html >> $@
+
+ .PHONY: all
+ all : $(HTML)
+
+ articles/:
+ mkdir $@
+
+ public/:
+ mkdir $@
+
+ clean :
+ rm -rf public html