skip tidy and fetch repo data from git.uugrn.org
This commit is contained in:
parent
49291170de
commit
e1d8cd2246
6
Makefile
6
Makefile
@ -69,9 +69,8 @@ upload-remote:
|
|||||||
doas rsync -a --delete -e ssh ${WWW}/ ${REMOTE}/
|
doas rsync -a --delete -e ssh ${WWW}/ ${REMOTE}/
|
||||||
upload-all: upload-local upload-remote
|
upload-all: upload-local upload-remote
|
||||||
|
|
||||||
build: photos calendar stagit
|
build: photos calendar
|
||||||
make compile; \
|
make compile; \
|
||||||
make tidy; \
|
|
||||||
make fixperms;
|
make fixperms;
|
||||||
|
|
||||||
build-and-upload-all:
|
build-and-upload-all:
|
||||||
@ -102,9 +101,6 @@ realclean: clean
|
|||||||
|
|
||||||
### TARGETS BELOW ARE ONLY FOR CONVENIENCE
|
### TARGETS BELOW ARE ONLY FOR CONVENIENCE
|
||||||
|
|
||||||
stagit:
|
|
||||||
scripts/reposync.sh
|
|
||||||
|
|
||||||
git-add:
|
git-add:
|
||||||
find site/photos -type f \
|
find site/photos -type f \
|
||||||
-not -name "*.html" \
|
-not -name "*.html" \
|
||||||
|
@ -12,8 +12,8 @@ echo "<h1>$TITLE</h1>"
|
|||||||
[ -f index.txt ] && cat index.txt
|
[ -f index.txt ] && cat index.txt
|
||||||
|
|
||||||
echo "<p>"
|
echo "<p>"
|
||||||
echo "<table class=\"photo-table\">"
|
echo " <table class=\"photo-table\">"
|
||||||
echo "<tr>"
|
echo " <tr>"
|
||||||
|
|
||||||
_count=0
|
_count=0
|
||||||
find * -maxdepth 0 -mindepth 0 -type f \( -iname "*.jpg" \
|
find * -maxdepth 0 -mindepth 0 -type f \( -iname "*.jpg" \
|
||||||
@ -28,9 +28,6 @@ do
|
|||||||
_file_html="${_file%%.*}.html"
|
_file_html="${_file%%.*}.html"
|
||||||
_file_descr="${_file%%.*}.txt"
|
_file_descr="${_file%%.*}.txt"
|
||||||
|
|
||||||
# increase file counter
|
|
||||||
_count=$(( _count + 1))
|
|
||||||
|
|
||||||
if [ ! -f "${_file_thm}" ]
|
if [ ! -f "${_file_thm}" ]
|
||||||
then
|
then
|
||||||
convert -quality 73 \
|
convert -quality 73 \
|
||||||
@ -65,18 +62,28 @@ do
|
|||||||
echo "<p><a href=index.html>Back to Index</a></p>" >> "${_file_html}"
|
echo "<p><a href=index.html>Back to Index</a></p>" >> "${_file_html}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "<td class=\"photo-td\" ><a href=\"/photos/$DIR/${_file_html}\"><img alt=\"Thumbnail Image ${_count}\" class=\"photo-img\" src=\"${_file_thm}\"></a></td>"
|
[ $_count -ne 0 ] \
|
||||||
if [ $(( _count % 3 )) -eq 0 ]
|
&& [ $(( _count % 3 )) -eq 0 ] \
|
||||||
then
|
&& echo " </tr><tr>"
|
||||||
echo "</tr><tr>"
|
|
||||||
fi
|
echo " <td class=\"photo-td\" ><a href=\"/photos/$DIR/${_file_html}\"><img alt=\"Thumbnail Image ${_count}\" class=\"photo-img\" src=\"${_file_thm}\"></a></td>"
|
||||||
|
|
||||||
|
# increase file counter
|
||||||
|
_count=$(( _count + 1))
|
||||||
|
|
||||||
while [ $(pgrep convert | wc -l) -gt $PROCS ]
|
while [ $(pgrep convert | wc -l) -gt $PROCS ]
|
||||||
do sleep 0.3; done
|
do sleep 0.3; done
|
||||||
|
|
||||||
done
|
done
|
||||||
echo "</tr>"
|
|
||||||
echo "</table>"
|
# fill missing columns
|
||||||
|
for i in $(( _count % 3 ))
|
||||||
|
do
|
||||||
|
echo " <td class=\"photo-td\" > </td>"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo " </tr>"
|
||||||
|
echo " </table>"
|
||||||
echo "</p>"
|
echo "</p>"
|
||||||
|
|
||||||
echo "<p><a href=../index.html>Back to the gallery index</a></p>"
|
echo "<p><a href=../index.html>Back to the gallery index</a></p>"
|
||||||
|
78
site/code.sh
78
site/code.sh
@ -1,37 +1,57 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
_distpath="$PWD/www/distfiles"
|
echo "<h1>Source Code Repositories</h1>"
|
||||||
mkdir -p "$_distpath"
|
echo " <p>Stuff I wrote or regularly contribute to</p>"
|
||||||
|
|
||||||
_repopath="/home/sdk/www/repo"
|
echo "<table class=\"repotable\">"
|
||||||
|
echo " <tr>"
|
||||||
|
echo " <th>Repository</th>"
|
||||||
|
echo " <th>Description</th>"
|
||||||
|
echo " </tr>"
|
||||||
|
|
||||||
out() { printf ' %s%s\n' "$1"; }
|
curl -s \
|
||||||
|
"https://git.uugrn.org/api/v1/repos/search?uid=1&sort=updated" \
|
||||||
out "<h1>Source Code Repositories</h1>"
|
| jq -r '.data[] | .clone_url, .name, .description' \
|
||||||
out " <p>Stuff I wrote or regularly contribute to</p>"
|
| awk '
|
||||||
|
NR % 3 == 1 { printf(" <tr>\n <td><a href=\"%s\" target=_blank>", $0); }
|
||||||
repo() {
|
NR % 3 == 2 { printf("%s</a></td>\n", $0); }
|
||||||
NAME="$1"
|
NR % 3 == 0 { printf(" <td>%s</td>\n </tr>\n", $0); }
|
||||||
LINK="$2"
|
'
|
||||||
DESC="$3"
|
echo "</table>"
|
||||||
out " <tr>"
|
|
||||||
out " <td><a href=\"$LINK\">$NAME</a></td>"
|
|
||||||
out " <td>$DESC</td>"
|
|
||||||
out " </tr>"
|
|
||||||
}
|
|
||||||
|
|
||||||
out "<table class=\"repotable\">"
|
|
||||||
out " <tr>"
|
|
||||||
out " <th>Repository</th>"
|
|
||||||
out " <th>Description</th>"
|
|
||||||
out " </tr>"
|
|
||||||
|
|
||||||
|
|
||||||
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 "</table>"
|
# #!/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 " <tr>"
|
||||||
|
# out " <td><a href=\"$LINK\">$NAME</a></td>"
|
||||||
|
# out " <td>$DESC</td>"
|
||||||
|
# out " </tr>"
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# out "<table class=\"repotable\">"
|
||||||
|
# out " <tr>"
|
||||||
|
# out " <th>Repository</th>"
|
||||||
|
# out " <th>Description</th>"
|
||||||
|
# out " </tr>"
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
== Welcome,
|
== Welcome,
|
||||||
|
|
||||||
++++
|
++++
|
||||||
<img class="avatar" alt="Picture of me" src="images/me.jpg"/>
|
<img class="avatar" alt="Picture of me" src="images/me.jpg">
|
||||||
++++
|
++++
|
||||||
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].
|
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].
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8">
|
||||||
<title>{{page_title}}</title>
|
<title>{{page_title}}</title>
|
||||||
<meta name="description" content="my website">
|
<meta name="description" content="my website">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
Loading…
Reference in New Issue
Block a user