You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
788 B
Bash

2 years ago
#!/bin/sh
3 months ago
# Creates an ASCII version of the wiki.
2 years ago
echo "making TXT"
5 months ago
./make_stats.sh
2 years ago
rm -rf txt
mkdir txt
for f in *.md; do
echo $f
fname=$(echo "$f" | sed "s/\.md//g")
f2="txt/${fname}.txt"
6 months ago
cat $f | cmark-gfm -e table > __tmp.html && links -html-numbered-links 1 -dump __tmp.html | sed "s/file:\/\/.*less_retarded_wiki\///g" >> $f2
2 years ago
done
6 months ago
rm __tmp.html
2 years ago
echo "making single TXT"
3 months ago
echo "LESS RETARDED WIKI" > lrs_wiki.txt
echo "by drummyfish, released under CC0 1.0, public domain" >> lrs_wiki.txt
2 years ago
for f in txt/*.txt; do
echo $f
fname=$(echo "$f" | sed "s/\.txt//g" | sed "s/txt\///g")
3 months ago
echo "--------------------------------------------------------------------------------" >> lrs_wiki.txt
echo "$fname:" >> lrs_wiki.txt
2 years ago
3 months ago
cat $f >> lrs_wiki.txt
2 years ago
done
echo "done"