Blame


1 1c1e3e26 2022-09-08 op RSYNC = openrsync --rsync-path=openrsync
2 cc9bf8f2 2021-11-05 op
3 1c1e3e26 2022-09-08 op MANPAGES = ../telescope.1
4 cc9bf8f2 2021-11-05 op
5 1c1e3e26 2022-09-08 op PAGES = index.gmi \
6 1c1e3e26 2022-09-08 op gallery.gmi
7 1c1e3e26 2022-09-08 op # changelog.gmi
8 cc9bf8f2 2021-11-05 op
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
12 cc9bf8f2 2021-11-05 op
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
15 1c1e3e26 2022-09-08 op
16 8d3a30b1 2024-02-23 op SUBST = ./subst CURRV=0.9 CURRKEY=0.9 NEXTKEY=0.10 \
17 63dff8d4 2024-02-24 op CURRSIGN=RWSmshjFM8Q0IDYUd4I/8G2q9Y0DUaZLac4enOtQh5rzsIcVF+ePXCy7 \
18 1c1e3e26 2022-09-08 op REPOLOGY_BANNER=${REPOLOGY_BANNER} \
19 1c1e3e26 2022-09-08 op REPOLOGY_URL=${REPOLOGY_URL}
20 1c1e3e26 2022-09-08 op
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
23 1c1e3e26 2022-09-08 op
24 1c1e3e26 2022-09-08 op .PHONY: all dirs manpages serve-www serve-gemini upload clean titles
25 1c1e3e26 2022-09-08 op
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
33 1c1e3e26 2022-09-08 op
34 1c1e3e26 2022-09-08 op dirs:
35 1c1e3e26 2022-09-08 op mkdir -p gemini www
36 1c1e3e26 2022-09-08 op
37 1c1e3e26 2022-09-08 op manpages:
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
41 1c1e3e26 2022-09-08 op .endfor
42 1c1e3e26 2022-09-08 op
43 1c1e3e26 2022-09-08 op pages:
44 1c1e3e26 2022-09-08 op .for p in ${PAGES}
45 1c1e3e26 2022-09-08 op grep -v '^<' $p | ${SUBST_GEM} > gemini/$p
46 1c1e3e26 2022-09-08 op
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}
52 1c1e3e26 2022-09-08 op .endfor
53 1c1e3e26 2022-09-08 op
54 cc9bf8f2 2021-11-05 op serve-www:
55 1c1e3e26 2022-09-08 op python3 -m http.server --directory www 8888
56 cc9bf8f2 2021-11-05 op
57 cc9bf8f2 2021-11-05 op serve-gemini:
58 1c1e3e26 2022-09-08 op ge -p 1966 gemini
59 cc9bf8f2 2021-11-05 op
60 cc9bf8f2 2021-11-05 op upload:
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
63 1c1e3e26 2022-09-08 op
64 1c1e3e26 2022-09-08 op clean:
65 1c1e3e26 2022-09-08 op rm -rf gemini www
66 1c1e3e26 2022-09-08 op
67 1c1e3e26 2022-09-08 op titles:
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}
70 1c1e3e26 2022-09-08 op .endfor