From e1d8cd2246183b073e029131794385a056defacf Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Wed, 11 Jan 2023 16:13:44 +0100 Subject: [PATCH] skip tidy and fetch repo data from git.uugrn.org --- Makefile | 6 +--- scripts/mkphotos.sh | 31 +++++++++++------- site/code.sh | 78 ++++++++++++++++++++++++++++----------------- site/index.adoc | 2 +- site/main.layout | 2 +- 5 files changed, 71 insertions(+), 48 deletions(-) diff --git a/Makefile b/Makefile index 8788464..5ec2eff 100644 --- a/Makefile +++ b/Makefile @@ -69,9 +69,8 @@ upload-remote: doas rsync -a --delete -e ssh ${WWW}/ ${REMOTE}/ upload-all: upload-local upload-remote -build: photos calendar stagit +build: photos calendar make compile; \ - make tidy; \ make fixperms; build-and-upload-all: @@ -102,9 +101,6 @@ realclean: clean ### TARGETS BELOW ARE ONLY FOR CONVENIENCE -stagit: - scripts/reposync.sh - git-add: find site/photos -type f \ -not -name "*.html" \ diff --git a/scripts/mkphotos.sh b/scripts/mkphotos.sh index 28befc9..664dc03 100644 --- a/scripts/mkphotos.sh +++ b/scripts/mkphotos.sh @@ -12,8 +12,8 @@ echo "

$TITLE

" [ -f index.txt ] && cat index.txt echo "

" -echo "" -echo "" +echo "
" +echo " " _count=0 find * -maxdepth 0 -mindepth 0 -type f \( -iname "*.jpg" \ @@ -28,9 +28,6 @@ do _file_html="${_file%%.*}.html" _file_descr="${_file%%.*}.txt" - # increase file counter - _count=$(( _count + 1)) - if [ ! -f "${_file_thm}" ] then convert -quality 73 \ @@ -65,18 +62,28 @@ do echo "

Back to Index

" >> "${_file_html}" fi - echo "" - if [ $(( _count % 3 )) -eq 0 ] - then - echo "" - fi + [ $_count -ne 0 ] \ + && [ $(( _count % 3 )) -eq 0 ] \ + && echo " " + + echo " " + + # increase file counter + _count=$(( _count + 1)) while [ $(pgrep convert | wc -l) -gt $PROCS ] do sleep 0.3; done done -echo "" -echo "
\"Thumbnail
\"Thumbnail
" + +# fill missing columns +for i in $(( _count % 3 )) +do + echo "  " +done + +echo " " +echo " " echo "

" echo "

Back to the gallery index

" diff --git a/site/code.sh b/site/code.sh index 5a1d89a..0bb9ae5 100644 --- a/site/code.sh +++ b/site/code.sh @@ -1,37 +1,57 @@ #!/bin/sh -_distpath="$PWD/www/distfiles" -mkdir -p "$_distpath" +echo "

Source Code Repositories

" +echo "

Stuff I wrote or regularly contribute to

" -_repopath="/home/sdk/www/repo" +echo "" +echo " " +echo " " +echo " " +echo " " -out() { printf ' %s%s\n' "$1"; } - -out "

Source Code Repositories

" -out "

Stuff I wrote or regularly contribute to

" - -repo() { - NAME="$1" - LINK="$2" - DESC="$3" - out " " - out " " - out " " - out " " -} - -out "
RepositoryDescription
$NAME$DESC
" -out " " -out " " -out " " -out " " +curl -s \ + "https://git.uugrn.org/api/v1/repos/search?uid=1&sort=updated" \ + | jq -r '.data[] | .clone_url, .name, .description' \ + | awk ' + NR % 3 == 1 { printf(" \n \n", $0); } + NR % 3 == 0 { printf(" \n \n", $0); } + ' +echo "
RepositoryDescription
", $0); } + NR % 3 == 2 { printf("%s%s
" -repo "xpick" "https://github.com/c0dev0id/xpick" "Command line color picker with hex, xterm and rgb support" -repo "mkpicindex" "https://github.com/c0dev0id/mkpicindex" "Image gallery generator with shell tools (static + js version)" -repo "luakit" "https://github.com/luakit/luakit" "Fast, small, webkit based browser framework extensible by Lua" -repo "mystuff" "https://github.com/c0dev0id/mystuff" "My OpenBSD ports" -repo "dotfiles" "https://github.com/c0dev0id/dotfiles" "My Dotfiles" -out "" +# #!/bin/sh +# +# _distpath="$PWD/www/distfiles" +# mkdir -p "$_distpath" +# +# _repopath="/home/sdk/www/repo" +# +# out() { printf ' %s%s\n' "$1"; } +# +# +# repo() { +# NAME="$1" +# LINK="$2" +# DESC="$3" +# out " " +# out " $NAME" +# out " $DESC" +# out " " +# } +# +# out "" +# out " " +# out " " +# out " " +# out " " +# +# +# repo "xpick" "https://github.com/c0dev0id/xpick" "Command line color picker with hex, xterm and rgb support" +# repo "mkpicindex" "https://github.com/c0dev0id/mkpicindex" "Image gallery generator with shell tools (static + js version)" +# repo "luakit" "https://github.com/luakit/luakit" "Fast, small, webkit based browser framework extensible by Lua" +# repo "mystuff" "https://github.com/c0dev0id/mystuff" "My OpenBSD ports" +# repo "dotfiles" "https://github.com/c0dev0id/dotfiles" "My Dotfiles" + diff --git a/site/index.adoc b/site/index.adoc index 0d75ee2..59cf36e 100644 --- a/site/index.adoc +++ b/site/index.adoc @@ -1,7 +1,7 @@ == Welcome, ++++ -Picture of me +Picture of me ++++ As you may have guessed from the URL, my name is Stefan Hagen. I'm a software developer based in south-west Germany. I'm living in a small town called https://en.wikipedia.org/wiki/Hockenheim[Hockenheim,role=external,window=_blank] together with my wife Jessica and two cats named http://stefanhagen.de/photos/Chloe-%26-June/[Chloe and June]. diff --git a/site/main.layout b/site/main.layout index 432511f..9f09343 100644 --- a/site/main.layout +++ b/site/main.layout @@ -1,7 +1,7 @@ - + {{page_title}}
RepositoryDescription