Parent: [821fb7] (diff)

Download this file

makeindex.sh    21 lines (17 with data), 718 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
WIDX=faqsindex.txt
echo "== Recoll Faqs and Howtos file index" > $WIDX
for f in *.txt; do
if test "$f" = $WIDX ; then continue; fi
h="`basename $f .txt`.html"
title=`head -1 "$f" | sed -e 's/=//g' -e 's/^ *//' -e 's/ *$//' -e 's/
//g'`
echo 'link:'$h'['$title']' >> $WIDX
echo >> $WIDX
done
exit 0
# Check and display what files are in the index but not in the contents table:
grep \| FaqsAndHowTos.txt | awk -F\| '{print $1}' | sed -e 's/\* \[\[//' -e 's/.wiki//' |sort > ctfiles.tmp
grep '\[\[' WikiIndex.txt | awk -F\| '{print $1}' | sed -e 's/\[\[//' -e 's/.wiki//' -e 's/.md//' | sort > ixfiles.tmp
echo 'diff ContentFiles IndexFiles:'
diff ctfiles.tmp ixfiles.tmp
rm ctfiles.tmp ixfiles.tmp