full site available on gemini!

This commit is contained in:
dongdigua 2023-06-06 19:59:16 +08:00
parent 965236d937
commit b20c31ed9e
8 changed files with 52 additions and 5 deletions

4
.meta Normal file
View File

@ -0,0 +1,4 @@
org/*.org: text/plain
misc/*: text/plain
pgp: text/plain

View File

@ -2,7 +2,7 @@
crond -f -d 8 &
tail -f /var/log/git.log &
agate --content dongdigua.github.io/gmi -e --hostname $GEMINI_HOST
agate -eC --content dongdigua.github.io --hostname $GEMINI_HOST
wait -n
echo $?

View File

@ -2,3 +2,4 @@
cd /dongdigua.github.io
git pull --rebase >> /var/log/git.log 2>&1
python misc/mdlist2gmi.py > posts.gmi

6
index.gmi Normal file
View File

@ -0,0 +1,6 @@
~dongdigua
(a fancy homepage coming soon)
=> posts posts
=> https://dongdigua.github.io HyperTextMachineLearning site

View File

@ -47,6 +47,10 @@
(<a id="normal" href="https://xkcd.com/297">Lost (In (Suspicious (Parentheses)))</a>)))))</pre>
<br>
<pre id="quote"></pre>
<p><pre>
Gemini available! <b><a href=gemini://shenjack.top>gemini://shenjack.top</a></b>
</pre></p>
</div>
</body>
<script src="./js/random-quote.js"></script>

30
misc/mdlist2gmi.py Executable file
View File

@ -0,0 +1,30 @@
#! /usr/bin/env python3
import re
def concat_gmi(link, name):
return "=> " + link + "\t" + name
f = open("posts.md")
lines = f.readlines()
regxp = re.compile("- \[(.+)\]\((.+)\)<br>")
for l in lines:
if l == "### Long Term Update\n":
print("")
print(l, end="")
match = regxp.match(l)
if match:
link = match.group(2)
if re.match(".+\.[a-z]+\.txt$", link):
link = link[:-4]
else:
link = "org/" + link + ".org"
print(concat_gmi(link, match.group(1)))
f.close()

View File

@ -1,5 +1,9 @@
#! /bin/sh
ls gmi | xargs -I {} ln -s gmi/{} gmi/{}.txt
ln -s code/lol.diff lol.diff.txt
set -x
cd gmi
ls *.gmi | xargs -I {} ln -s {} {}.txt
cd ..
ln -s lol.diff misc/lol.diff.txt
ln -s pgp pgp.txt

View File

@ -32,8 +32,6 @@ any kind of contribution is welcome
---
### Long Term Update
- [<font color=red>大概是语文知识整理</font>](digua-YW)<br>
Big project
- [\[Mirror\] My kernel config recipe](kernel)<br>
- [Gopher/Gemini reactions](gmi/re.gmi.txt)<br>
- [Gopher/Gemini collections, a quiet web](gmi/collections.gmi.txt)<br>