aboutsummaryrefslogtreecommitdiff
path: root/blog/build.sh
blob: d7bce2b65d136aa6ab8a44d027f2384b49930a01 (plain)
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
#!/bin/sh

set -ue

TARGET=$1
HERE=$(pwd)

rm -rf $TARGET
cp -a content/ $TARGET

python3 ../interesting-projects/interesting-projects.py >$TARGET/notes/interesting-projects.gmi

echo Converting gmi to html...

cd $TARGET
find . -name '*.gmi' -print0 | xargs -0 coppewebite-to-html --css $HERE/style.css

echo Generating index...
cat >index.gmi <<EOF
# El blog es mío
## Hay otros como él, pero este es el mío

Envíame email a alex arroba corcoles punto net.

=> notas/ Notas
=> notes/ Notes

EOF
find . -path './2???/??/*.gmi' -type f -print0 | coppewebite-indexer . >>index.gmi

echo Generating RSS...
coppewebite-to-rss <index.gmi https://alex.corcoles.net . >index.rss

echo Converting index to HTML...
coppewebite-to-html index.gmi --feed-title "El blog es mío" --feed-href index.rss --css $HERE/style.css

echo Done