about summary refs log tree commit diff stats
path: root/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'trunk')
-rw-r--r--trunk/backlink.head1
-rw-r--r--trunk/backlink.sh4
2 files changed, 4 insertions, 1 deletions
diff --git a/trunk/backlink.head b/trunk/backlink.head index 7557740..816ee7d 100644 --- a/trunk/backlink.head +++ b/trunk/backlink.head
@@ -1,5 +1,6 @@
1--- 1---
2title: _TITLE_ 2title: _TITLE_
3id: _ID_
3subtitle: back-links 4subtitle: back-links
4genre: list 5genre: list
5 6
diff --git a/trunk/backlink.sh b/trunk/backlink.sh index 15bb11e..c9740d9 100644 --- a/trunk/backlink.sh +++ b/trunk/backlink.sh
@@ -20,10 +20,12 @@ if ! grep -ql "$searchQuery" $glob >> "$outFile"; then
20 echo "- [$title]($searchQuery)" >> "${islandLink}.txt" 20 echo "- [$title]($searchQuery)" >> "${islandLink}.txt"
21fi 21fi
22 22
23# Change title of $outFile 23# Change title & id of $outFile
24inText="`basename $searchQuery .html`.txt"; 24inText="`basename $searchQuery .html`.txt";
25title=`grep '^title:' "$inText" | cut -d' ' -f2-`; 25title=`grep '^title:' "$inText" | cut -d' ' -f2-`;
26id=`grep '^id:' "${searchQuery%.html}.txt" | cut -d' ' -f2`;
26sed -i "s/_TITLE_/$title/" "$outFile"; 27sed -i "s/_TITLE_/$title/" "$outFile";
28sed -i "s/_ID_/$id/" "$outFile";
27echo -n "." 29echo -n "."
28 30
29# Change *.txt to *.html 31# Change *.txt to *.html