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 1c1e3e26 2022-09-08 op SUBST = ./subst CURRV=0.8.1 NEXTV=0.9 \
17 1c1e3e26 2022-09-08 op GH=https://github.com/omar-polo/telescope \
18 1c1e3e26 2022-09-08 op CURRSIGN=RWQ12hzRNC/1NhZD56pU1YaRg5AYSEWg9gId5M3e9zwuufmwnbd7WrMb \
19 1c1e3e26 2022-09-08 op NEXTSIGN=RWSmshjFM8Q0IDYUd4I/8G2q9Y0DUaZLac4enOtQh5rzsIcVF+ePXCy7 \
20 1c1e3e26 2022-09-08 op REPOLOGY_BANNER=${REPOLOGY_BANNER} \
21 1c1e3e26 2022-09-08 op REPOLOGY_URL=${REPOLOGY_URL}
22 1c1e3e26 2022-09-08 op
23 1c1e3e26 2022-09-08 op SUBST_GEM = ${SUBST} MANEXT=txt EXT=gmi
24 1c1e3e26 2022-09-08 op SUBST_WWW = ${SUBST} MANEXT=html EXT=html
25 1c1e3e26 2022-09-08 op
26 1c1e3e26 2022-09-08 op .PHONY: all dirs manpages serve-www serve-gemini upload clean titles
27 1c1e3e26 2022-09-08 op
28 1c1e3e26 2022-09-08 op all: dirs manpages pages
29 1c1e3e26 2022-09-08 op cp logo.png gemini/
30 1c1e3e26 2022-09-08 op cp mandoc.css style.css www/
31 1c1e3e26 2022-09-08 op cp logo.png www/
32 1c1e3e26 2022-09-08 op cp -R gallery gemini
33 1c1e3e26 2022-09-08 op cp -R gallery www
34 1c1e3e26 2022-09-08 op convert logo.png -resize 200x200 www/logo.small.png
35 1c1e3e26 2022-09-08 op
36 1c1e3e26 2022-09-08 op dirs:
37 1c1e3e26 2022-09-08 op mkdir -p gemini www
38 1c1e3e26 2022-09-08 op
39 1c1e3e26 2022-09-08 op manpages:
40 1c1e3e26 2022-09-08 op .for m in ${MANPAGES}
41 1c1e3e26 2022-09-08 op man -O style=mandoc.css -Thtml -l $m > www/${m:T}.html
42 1c1e3e26 2022-09-08 op man -O width=64 -Tutf8 -l $m | col -b > gemini/${m:T}.txt
43 1c1e3e26 2022-09-08 op .endfor
44 1c1e3e26 2022-09-08 op
45 1c1e3e26 2022-09-08 op pages:
46 1c1e3e26 2022-09-08 op .for p in ${PAGES}
47 1c1e3e26 2022-09-08 op grep -v '^<' $p | ${SUBST_GEM} > gemini/$p
48 1c1e3e26 2022-09-08 op
49 1c1e3e26 2022-09-08 op ${SUBST_WWW} TITLE=${TITLE_${p}:Q} header.html > www/$p
50 1c1e3e26 2022-09-08 op ${MAKE} titles | ./menu.pl "${p:.gmi=.html}" >> www/$p
51 1c1e3e26 2022-09-08 op ${SUBST_WWW} $p | ./gem2html >> www/$p
52 1c1e3e26 2022-09-08 op cat footer.html >> www/$p
53 1c1e3e26 2022-09-08 op cd www && mv $p ${p:.gmi=.html}
54 1c1e3e26 2022-09-08 op .endfor
55 1c1e3e26 2022-09-08 op
56 cc9bf8f2 2021-11-05 op serve-www:
57 1c1e3e26 2022-09-08 op python3 -m http.server --directory www 8888
58 cc9bf8f2 2021-11-05 op
59 cc9bf8f2 2021-11-05 op serve-gemini:
60 1c1e3e26 2022-09-08 op ge -p 1966 gemini
61 cc9bf8f2 2021-11-05 op
62 cc9bf8f2 2021-11-05 op upload:
63 88753d62 2022-09-08 op ${RSYNC} --del -a gemini/ antartica:/var/gemini/telescope.omarpolo.com
64 88753d62 2022-09-08 op ${RSYNC} --del -a www/ antartica:/var/www/telescope.omarpolo.com
65 1c1e3e26 2022-09-08 op
66 1c1e3e26 2022-09-08 op clean:
67 1c1e3e26 2022-09-08 op rm -rf gemini www
68 1c1e3e26 2022-09-08 op
69 1c1e3e26 2022-09-08 op titles:
70 1c1e3e26 2022-09-08 op .for p in ${PAGES}
71 1c1e3e26 2022-09-08 op @printf "%s %s\n" "${p:.gmi=.html}" ${TITLE_${p}:Q}
72 1c1e3e26 2022-09-08 op .endfor