1 1c1e3e26 2022-09-08 op RSYNC = openrsync --rsync-path=openrsync
3 1c1e3e26 2022-09-08 op MANPAGES = ../telescope.1
5 1c1e3e26 2022-09-08 op PAGES = index.gmi \
7 1c1e3e26 2022-09-08 op # changelog.gmi
9 1c1e3e26 2022-09-08 op TITLE_index.gmi = Home
10 1c1e3e26 2022-09-08 op TITLE_changelog.gmi = ChangeLog
11 1c1e3e26 2022-09-08 op TITLE_gallery.gmi = Gallery
13 1c1e3e26 2022-09-08 op REPOLOGY_BANNER = https://repology.org/badge/vertical-allrepos/telescope.svg
14 1c1e3e26 2022-09-08 op REPOLOGY_URL = https://repology.org/project/telescope/versions
16 8d3a30b1 2024-02-23 op SUBST = ./subst CURRV=0.9 CURRKEY=0.9 NEXTKEY=0.10 \
17 8d3a30b1 2024-02-23 op CURRSIGN=RWRkrb76bmCHNKaMnALGf2UgKgq0d/O/ULTeGq36Dos7MGm79CXoZLWN \
18 1c1e3e26 2022-09-08 op REPOLOGY_BANNER=${REPOLOGY_BANNER} \
19 1c1e3e26 2022-09-08 op REPOLOGY_URL=${REPOLOGY_URL}
21 1c1e3e26 2022-09-08 op SUBST_GEM = ${SUBST} MANEXT=txt EXT=gmi
22 1c1e3e26 2022-09-08 op SUBST_WWW = ${SUBST} MANEXT=html EXT=html
24 1c1e3e26 2022-09-08 op .PHONY: all dirs manpages serve-www serve-gemini upload clean titles
26 1c1e3e26 2022-09-08 op all: dirs manpages pages
27 1c1e3e26 2022-09-08 op cp logo.png gemini/
28 1c1e3e26 2022-09-08 op cp mandoc.css style.css www/
29 1c1e3e26 2022-09-08 op cp logo.png www/
30 1c1e3e26 2022-09-08 op cp -R gallery gemini
31 1c1e3e26 2022-09-08 op cp -R gallery www
32 1c1e3e26 2022-09-08 op convert logo.png -resize 200x200 www/logo.small.png
35 1c1e3e26 2022-09-08 op mkdir -p gemini www
38 1c1e3e26 2022-09-08 op .for m in ${MANPAGES}
39 1c1e3e26 2022-09-08 op man -O style=mandoc.css -Thtml -l $m > www/${m:T}.html
40 1c1e3e26 2022-09-08 op man -O width=64 -Tutf8 -l $m | col -b > gemini/${m:T}.txt
44 1c1e3e26 2022-09-08 op .for p in ${PAGES}
45 1c1e3e26 2022-09-08 op grep -v '^<' $p | ${SUBST_GEM} > gemini/$p
47 1c1e3e26 2022-09-08 op ${SUBST_WWW} TITLE=${TITLE_${p}:Q} header.html > www/$p
48 1c1e3e26 2022-09-08 op ${MAKE} titles | ./menu.pl "${p:.gmi=.html}" >> www/$p
49 1c1e3e26 2022-09-08 op ${SUBST_WWW} $p | ./gem2html >> www/$p
50 1c1e3e26 2022-09-08 op cat footer.html >> www/$p
51 1c1e3e26 2022-09-08 op cd www && mv $p ${p:.gmi=.html}
55 1c1e3e26 2022-09-08 op python3 -m http.server --directory www 8888
58 1c1e3e26 2022-09-08 op ge -p 1966 gemini
61 88753d62 2022-09-08 op ${RSYNC} --del -a gemini/ antartica:/var/gemini/telescope.omarpolo.com
62 88753d62 2022-09-08 op ${RSYNC} --del -a www/ antartica:/var/www/telescope.omarpolo.com
65 1c1e3e26 2022-09-08 op rm -rf gemini www
68 1c1e3e26 2022-09-08 op .for p in ${PAGES}
69 1c1e3e26 2022-09-08 op @printf "%s %s\n" "${p:.gmi=.html}" ${TITLE_${p}:Q}