aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rw-r--r--content/pages/projects.fossil.md.part6
-rw-r--r--content/pages/projects.github.md.part2
-rw-r--r--content/pages/projects.md10
-rw-r--r--makext.mk46
-rw-r--r--static/projects/xmagnify.fossilbin225280 -> 225280 bytes
-rw-r--r--templates/page-no-title.html10
-rw-r--r--tools/fossil-projects.sh6
-rw-r--r--tools/github-projects.py2
9 files changed, 77 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index d0add7d..a76e77e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
1include makext.mk
2
3help: .help
4
1MAKEFLAGS+=-j2 5MAKEFLAGS+=-j2
2PROJECTS_FILENAME = content/pages/projects.md 6PROJECTS_FILENAME = content/pages/projects.md
3 7
4dev: watch server 8dev: watch server # Starts a development server
5 9
6watch: 10watch:
7 find . -type f \( -name "*.html" -o -name "*.js" -o -name "*.md" -o -name "*.yaml" -o -name "*.css" -o -name "*.xml" \) | entr jbmafp -b 11 find . -type f \( -name "*.html" -o -name "*.js" -o -name "*.md" -o -name "*.yaml" -o -name "*.css" -o -name "*.xml" \) | entr jbmafp -b
@@ -9,7 +13,7 @@ watch:
9server: 13server:
10 jbmafp -s 14 jbmafp -s
11 15
12update-projects: projects-header 16update-projects: projects-header # Update projects page
13 cat content/pages/projects.fossil.md.part \ 17 cat content/pages/projects.fossil.md.part \
14 content/pages/projects.github.md.part >> \ 18 content/pages/projects.github.md.part >> \
15 content/pages/projects.md 19 content/pages/projects.md
@@ -19,12 +23,12 @@ projects-header:
19 echo "title: Personal projects" >> $(PROJECTS_FILENAME) 23 echo "title: Personal projects" >> $(PROJECTS_FILENAME)
20 echo "date: 2024-10-21T12:00:00+02:00" >> $(PROJECTS_FILENAME) 24 echo "date: 2024-10-21T12:00:00+02:00" >> $(PROJECTS_FILENAME)
21 echo "url: projects.html" >> $(PROJECTS_FILENAME) 25 echo "url: projects.html" >> $(PROJECTS_FILENAME)
22 echo "type: page" >> $(PROJECTS_FILENAME) 26 echo "type: page-no-title" >> $(PROJECTS_FILENAME)
23 echo "draft: false" >> $(PROJECTS_FILENAME) 27 echo "draft: false" >> $(PROJECTS_FILENAME)
24 echo "---\n" >> $(PROJECTS_FILENAME) 28 echo "---\n" >> $(PROJECTS_FILENAME)
25 29
26update-fossil: 30update-fossil: # Update Fossil projects
27 cd tools && bash fossil-projects.sh 31 cd tools && bash fossil-projects.sh
28 32
29update-github: 33update-github: # Update GitHub projects
30 cd tools && python github-projects.py 34 cd tools && python github-projects.py
diff --git a/content/pages/projects.fossil.md.part b/content/pages/projects.fossil.md.part
index 796af87..1813dab 100644
--- a/content/pages/projects.fossil.md.part
+++ b/content/pages/projects.fossil.md.part
@@ -1,4 +1,4 @@
1## Fossil repositories 1# Fossil repositories
2 2
3- [pats.fossil](/projects/pats.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:24:05</small> 3- [pats.fossil](/projects/pats.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:30:23</small>
4- [xmagnify.fossil](/projects/xmagnify.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:24:05</small> 4- [xmagnify.fossil](/projects/xmagnify.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:37:02</small>
diff --git a/content/pages/projects.github.md.part b/content/pages/projects.github.md.part
index 92a8c74..bdc56f7 100644
--- a/content/pages/projects.github.md.part
+++ b/content/pages/projects.github.md.part
@@ -1,6 +1,6 @@
1 1
2 2
3## GitHub repositories 3# GitHub repositories
4 4
5<div class='project-list'> 5<div class='project-list'>
6 6
diff --git a/content/pages/projects.md b/content/pages/projects.md
index cc10185..cabde1d 100644
--- a/content/pages/projects.md
+++ b/content/pages/projects.md
@@ -2,17 +2,17 @@
2title: Personal projects 2title: Personal projects
3date: 2024-10-21T12:00:00+02:00 3date: 2024-10-21T12:00:00+02:00
4url: projects.html 4url: projects.html
5type: page 5type: page-no-title
6draft: false 6draft: false
7--- 7---
8 8
9## Fossil repositories 9# Fossil repositories
10 10
11- [pats.fossil](/projects/pats.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:21:40</small> 11- [pats.fossil](/projects/pats.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:30:23</small>
12- [xmagnify.fossil](/projects/xmagnify.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:21:40</small> 12- [xmagnify.fossil](/projects/xmagnify.fossil)<br><small>Size: 220K, Modified: 2025-08-02 20:37:02</small>
13 13
14 14
15## GitHub repositories 15# GitHub repositories
16 16
17<div class='project-list'> 17<div class='project-list'>
18 18
diff --git a/makext.mk b/makext.mk
new file mode 100644
index 0000000..bbfa148
--- /dev/null
+++ b/makext.mk
@@ -0,0 +1,46 @@
1# Makext is a collection of useful extensions for Makefiles, aimed at
2# simplifying and enhancing the functionality of Make-based projects. These
3# extensions provide additional features and convenience functions to
4# improve the build process, manage dependencies, and streamline common
5# tasks.
6#
7# Visit the GitHub repository at https://github.com/mitjafelicijan/makext
8# to learn more and contribute to the project.
9#
10# `makext` was written by Mitja Felicijan and is released under the BSD
11# two-clause license, see the LICENSE file for more information.
12
13# Load environmental files from `MEX_ENVIRONMENT`. By default GNU make
14# loads what is already in `env`. This extends it to other files.
15ifdef MEX_ENVIRONMENT
16TEMP_ENV_FILES=$(shell echo $(MEX_ENVIRONMENT) | tr ',' ' ')
17$(foreach file,$(TEMP_ENV_FILES),$(eval include $(file)))
18endif
19
20# Help extension that lists all the targets with descriptions
21# and adds description and license information if data provided.
22.PHONY: .help
23.help:
24ifdef MEX_DESCRIPTION
25 @printf "%s\n\n" $(MEX_DESCRIPTION) | fmt
26endif
27 @echo "Targets:"
28 @grep -vE '^[[:space:]]' $(MAKEFILE_LIST) | grep -E '^.*:.* #' | sed -E 's/(.*):(.*):.*#(.*)/ \2###\3/' | column -t -s '###'
29ifdef MEX_LICENSE
30 @printf "\n%s" $(MEX_LICENSE) | fmt
31endif
32
33# Checks `MEX_ASSURE` variable if all the programs declared actually
34# exist on a machine. If not this exists make with error.
35.PHONY: .assure
36.assure:
37ifndef MEX_ASSURE
38 @printf "Variable MEX_ASSURE is not defined. Can not check for programs.\n"
39else
40 @for prog in $(shell echo $(MEX_ASSURE)); do \
41 if ! which $$prog > /dev/null; then \
42 echo "Error: '$$prog' not found on this machine."; \
43 exit 1; \
44 fi; \
45 done
46endif
diff --git a/static/projects/xmagnify.fossil b/static/projects/xmagnify.fossil
index 258d27d..a68e892 100644
--- a/static/projects/xmagnify.fossil
+++ b/static/projects/xmagnify.fossil
Binary files differ
diff --git a/templates/page-no-title.html b/templates/page-no-title.html
new file mode 100644
index 0000000..16ca10d
--- /dev/null
+++ b/templates/page-no-title.html
@@ -0,0 +1,10 @@
1{{ template "base.html" . }}
2
3{{ define "title" }}{{ .Page.Title }}{{ end }}
4{{ define "description" }}{{ .Page.Summary }}{{ end }}
5
6{{ define "content" }}
7<article>
8 <div>{{ .Page.HTML }}</div>
9</article>
10{{ end }}
diff --git a/tools/fossil-projects.sh b/tools/fossil-projects.sh
index bb6e673..a87be94 100644
--- a/tools/fossil-projects.sh
+++ b/tools/fossil-projects.sh
@@ -1,11 +1,9 @@
1set -xe
2
3OUT=../content/pages/projects.fossil.md.part 1OUT=../content/pages/projects.fossil.md.part
4 2
5echo -e "## Fossil repositories\n" > $OUT 3echo -e "# Fossil repositories\n" > $OUT
6 4
7find ~/Projects/ -type f -name "*.fossil" -not -path "*/website/*" | while read -r file; do 5find ~/Projects/ -type f -name "*.fossil" -not -path "*/website/*" | while read -r file; do
8 cp $file ../static/projects/ 6 rsync -uv $file ../static/projects/
9done 7done
10 8
11find ../static/projects/ -type f -name "*.fossil" | while read -r file; do 9find ../static/projects/ -type f -name "*.fossil" | while read -r file; do
diff --git a/tools/github-projects.py b/tools/github-projects.py
index e2afe95..ff890f6 100644
--- a/tools/github-projects.py
+++ b/tools/github-projects.py
@@ -16,7 +16,7 @@ def generate_markdown_file(include_repositories):
16 file = open("../content/pages/projects.github.md.part", "w") 16 file = open("../content/pages/projects.github.md.part", "w")
17 17
18 file.write(DOUBLE_NL) 18 file.write(DOUBLE_NL)
19 file.write("## GitHub repositories") 19 file.write("# GitHub repositories")
20 file.write(DOUBLE_NL) 20 file.write(DOUBLE_NL)
21 21
22 file.write("<div class='project-list'>") 22 file.write("<div class='project-list'>")