about summary refs log tree commit diff stats
path: root/trunk
diff options
context:
space:
mode:
authorCase Duckworth2015-04-03 13:53:31 -0700
committerCase Duckworth2015-04-03 13:53:31 -0700
commit973ff0813f67af319868ba465e6817dc4cbc730b (patch)
treef3f285651cb5659a90aec87c25886f66f3f90517 /trunk
parentUpdate make clean (diff)
downloadautocento-973ff0813f67af319868ba465e6817dc4cbc730b.tar.gz
autocento-973ff0813f67af319868ba465e6817dc4cbc730b.zip
Add backlinks to backlinks
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