summaryrefslogtreecommitdiff
path: root/generate.sh
blob: 5c0f6c19a308f32c5a0c235063a242a277e60a97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env sh
set -e

echo "Generate axtlos(7)"
mandoc -T html -O style=./style.css axtlos.7 > axtlos.7.html
echo "Add anti Chrome and Brave JS"
sed 's|<body>|<body>\n<script src="./antiChrome_Brave.js"></script>|g' axtlos.7.html > axtlos.7.html.tmp
mv axtlos.7.html.tmp axtlos.7.html
echo "Add favicon"
sed 's|media="all"/>|media="all"/>\n<link rel="icon" type="image/x-icon" href="./favicon.gif"/>|' axtlos.7.html > axtlos.7.html.tmp
mv axtlos.7.html.tmp axtlos.7.html
echo "Change fedi hyperlink style"
sed 's|<p class="Pp">- <a class="Lk" href="https://akko.wtf/xenia">Fedi</a></p>|<p class="Pp">- <i class="Em">Fedi:</i> <a class="Lk" rel="me" href="https://akko.wtf/axtlos">https://akko.wtf/axtlos</a></p>|g' axtlos.7.html > axtlos.7.html.tmp
mv axtlos.7.html.tmp axtlos.7.html
echo "Adding Gifs"
sed 's|</body>|<img src="./buttons/xen.gif" alt="amy, xenia, solar"/><img src="./buttons/delete-twitter.gif" alt="delete twitter, make a neocities!"/>\n<img src="./buttons/antinazi.gif" alt="No nazis! No fascists! No racism!"/>\n<img src="./buttons/deltarune.png" alt="kris what the fuck are we doing here"/>\n<img src="./buttons/emacs3.gif" alt="made with emacs">\n<img src="./buttons/ltg.gif" alt="ltg"><img src="./buttons/nft.gif" alt="nft? more like no fucking thanks!"><img src="./buttons/sameshit.gif" alt="chrome and edge, same shit, different asshole">\n<img src="./buttons/latex.gif" alt="Learn LaTeX NOW!"/>\n<img src="./buttons/lynx.gif" alt="This website is lynx friendly!"/>\n</body>|g' axtlos.7.html > axtlos.7.html.tmp
mv axtlos.7.html.tmp axtlos.7.html
echo "Replace date with license"
sed '/<td class="foot-date">/c\    <td class="foot-date">CC BY-SA 4.0</td>' axtlos.7.html > axtlos.7.html.tmp
mv axtlos.7.html.tmp axtlos.7.html
echo "Change See also to hyperlinks"
sed 's|<p class="Pp"><b>Specs</b>(7), <b>Project Shards</b>(1), <b>Crystal Linux</b>(1)||g' axtlos.7.html > axtlos.7.html.tmp
sed 's|    <b>Linux Immutability Tools</b>(7)</p>|<div class="Pp">\n<a class="Lk" href="specs.7.html"><b>Specs</b>(7)</a><a>, </a>\n<a class="Lk" href="shards.1.html"><b>Project Shards</b>(7)</a><a>, </a>\n<a class="Lk" href="crystal.1.html"><b>Crystal Linux</b>(1)</a><a>, </a>\n<a class="Lk" href="lit.7.html"><b>Linux Immutability Tools</b>(1)</a>\n</div>|g' axtlos.7.html.tmp > axtlos.7.html
cp axtlos.7.html index.html
echo "Succesfully generated axtlos(7)"

echo "Generate specs(7)"
mandoc -T html -O style=./style.css specs.7 > specs.7.html
echo "Add anti Chrome and Brave JS"
sed 's|<body>|<body>\n<script src="./antiChrome_Brave.js"></script>|g' specs.7.html > specs.7.html.tmp
mv specs.7.html.tmp specs.7.html
echo "Change header"
sed 's|<td class="head-ltitle">computers(7)</td>|<td class="head-ltitle">technological</td>|g' specs.7.html > specs.7.html.tmp
mv specs.7.html.tmp specs.7.html
sed 's|<td class="head-vol">Miscellaneous Information Manual</td>|<td class="head-vol">devices</td>|g' specs.7.html > specs.7.html.tmp
mv specs.7.html.tmp specs.7.html
sed 's|<td class="head-rtitle">computers(7)</td>|<td class="head-rtitle">straight from hell</td>|g' specs.7.html > specs.7.html.tmp
mv specs.7.html.tmp specs.7.html
echo "Add back to main page link"
sed 's|<td class="foot-os">|<td class="foot-home"><a href="https://xenia.blahaj.land">Go To Main Page</a></td>\n<td class="foot-os">|g' specs.7.html > specs.7.html.tmp
mv specs.7.html.tmp specs.7.html
echo "Change see also to hyperlinks"
sed 's|<p class="Pp"><b>axtlos</b>(7), <b>Project Shards</b>(1), <b>Crystal||g' specs.7.html > specs.7.html.tmp
sed 's|    Linux</b>(1) <b>Linux Immutability Tools</b>(7)</p>|<div class="Pp">\n<a class="Lk" href="index.html"><b>axtlos</b>(7)</a><a>, </a>\n<a class="Lk" href="shards.1.html"><b>Project Shards</b>(7)</a><a>, </a>\n<a class="Lk" href="crystal.1.html"><b>Crystal Linux</b>(1)</a><a>, </a>\n<a class="Lk" href="lit.7.html"><b>Linux Immutability Tools</b>(1)</a>\n</div>|g' specs.7.html.tmp > specs.7.html
echo "Successfully generated specs(7)"

echo "Generate shards(1)"
mandoc -T html -O style=./style.css shards.1 > shards.1.html
echo "Add anti Chrome and Brave JS"
sed 's|<body>|<body>\n<script src="./antiChrome_Brave.js"></script>|g' shards.1.html > shards.1.html.tmp
mv shards.1.html.tmp shards.1.html
echo "Replace date with license"
sed 's|<td class="foot-date">|c\    <td class="foot-date">CC BY-SA 4.0</td>|g' shards.1.html > shards.1.html.tmp
mv shards.1.html.tmp shards.1.html
echo "Change See also to hyperlinks"
sed 's|<p class="Pp"><b>axtlos</b>(7), <b>Specs</b>(7), <b>Crystal Linux</b>(1),||g' shards.1.html > shards.1.html.tmp
sed 's|    <b>Linux Immutability Tools</b>(7)</p>|<div class="Pp">\n<a class="Lk" href="index.html"><b>axtlos</b>(7)</a><a>, </a>\n<a class="Lk" href="specs.7.html"><b>Specs</b>(7)</a><a>, </a>\n<a class="Lk" href="crystal.1.html"><b>Crystal Linux</b>(1)</a><a>, </a>\n<a class="Lk" href="lit.7.html"><b>Linux Immutability Tools</b>(1)</a>\n</div>|g' shards.1.html.tmp > shards.1.html
echo "Remove one specific newline"
cat shards.1.html | grep -v '  <br/>' > shards.1.html.tmp
echo "Succesfully generated shards(1)"

echo "Generate crystal(1)"
mandoc -T html -O style=./style.css crystal.1 > crystal.1.html
echo "Add anti Chrome and Brave JS"
sed 's|<body>|<body>\n<script src="./antiChrome_Brave.js"></script>|g' crystal.1.html > crystal.1.html.tmp
mv crystal.1.html.tmp crystal.1.html
echo "Change OS"
sed 's|Linux 6.2.6-arch1-1|FreeBSD 13.1-RELEASE-p6|g' crystal.1.html > crystal.1.html.tmp
mv crystal.1.html.tmp crystal.1.html
echo "Replace date with license"
sed '/<td class="foot-date">/c\    <td class="foot-date">CC BY-SA 4.0</td>' crystal.1.html > crystal.1.html.tmp
mv crystal.1.html.tmp crystal.1.html
echo "Change See also to hyperlinks"
sed 's|<p class="Pp"><b>axtlos</b>(7), <b>Specs</b>(7), <b>Project Shards</b>(1),||g' crystal.1.html > crystal.1.html.tmp
sed 's|    <b>Linux Immutability Tools</b>(7)</p>|<div class="Pp">\n<a class="Lk" href="index.html"><b>axtlos</b>(7)</a><a>, </a>\n<a class="Lk" href="specs.7.html"><b>Specs</b>(7)</a><a>, </a>\n<a class="Lk" href="shards.1.html"><b>Project Shards</b>(1)</a><a>, </a>\n<a class="Lk" href="lit.7.html"><b>Linux Immutability Tools</b>(1)</a>\n</div>|' crystal.1.html.tmp > crystal.1.html
echo "Succesfully generated crystal(1)"

echo "Generate Linux Immutability Tools(7)"
mandoc -T html -O style=./style.css lit.7 > lit.7.html
echo "Add anti Chrome and Brave JS"
sed 's|<body>|<body>\n<script src="./antiChrome_Brave.js"></script>|g' lit.7.html > lit.7.html.tmp
mv lit.7.html.tmp lit.7.html
echo "Replace dat with license"
sed '/<td class="foot-date">/c\    <td class="foot-date">CC BY-SA 4.0</td>' lit.7.html > lit.7.html.tmp
mv lit.7.html.tmp lit.7.html
echo "Change See also to hyperlinks"
sed 's|<p class="Pp"><b>axtlos</b>(7), <b>Specs</b>(7), <b>Project Shards</b>(1),||g' lit.7.html > lit.7.html.tmp
sed 's|    <b>Crystal Linux</b>(1)</p>|<div class="Pp">\n<a class="Lk" href="index.html"><b>axtlos</b>(7)</a><a>, </a>\n<a class="Lk" href="specs.7.html"><b>Specs</b>(7)</a><a>, </a>\n<a class="Lk" href="shards.1.html"><b>Project Shards</b>(1)</a><a>, </a>\n<a class="Lk" href="crystal.1.html"><b>Crystal Linux</b>(1)</a>|g' lit.7.html.tmp > lit.7.html
echo "Succesfully generated lit(7)"

echo "cleanup"
rm *.tmp