diff options
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/backlink.head | 1 | ||||
-rw-r--r-- | trunk/backlink.sh | 4 |
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 | --- |
2 | title: _TITLE_ | 2 | title: _TITLE_ |
3 | id: _ID_ | ||
3 | subtitle: back-links | 4 | subtitle: back-links |
4 | genre: list | 5 | genre: 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" |
21 | fi | 21 | fi |
22 | 22 | ||
23 | # Change title of $outFile | 23 | # Change title & id of $outFile |
24 | inText="`basename $searchQuery .html`.txt"; | 24 | inText="`basename $searchQuery .html`.txt"; |
25 | title=`grep '^title:' "$inText" | cut -d' ' -f2-`; | 25 | title=`grep '^title:' "$inText" | cut -d' ' -f2-`; |
26 | id=`grep '^id:' "${searchQuery%.html}.txt" | cut -d' ' -f2`; | ||
26 | sed -i "s/_TITLE_/$title/" "$outFile"; | 27 | sed -i "s/_TITLE_/$title/" "$outFile"; |
28 | sed -i "s/_ID_/$id/" "$outFile"; | ||
27 | echo -n "." | 29 | echo -n "." |
28 | 30 | ||
29 | # Change *.txt to *.html | 31 | # Change *.txt to *.html |