From 5a8488cc7d9ad787193e76d7381b51ad7efb0af4 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Wed, 5 Aug 2009 23:14:56 +0200 Subject: add wiki metadata (WIP) --- make-doc.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'make-doc.sh') diff --git a/make-doc.sh b/make-doc.sh index 0cda6fe..e871d9b 100755 --- a/make-doc.sh +++ b/make-doc.sh @@ -4,9 +4,26 @@ which markdown &>/dev/null || echo "Need markdown utility!" >&2 # do we need to add section 'avail languages'? like http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide # what about summary and related articles? # obfuscate email? wiki supports mailto dingske +# TODO: strip article section, related articles from real content +echo "generating html..." for i in doc/official_installation_guide_?? do echo $i - cat $i | markdown | sed 's|]*>\([^<]*\)|[\1 \2]|g' > $i.html + # convert markdown to html, convert html links to wiki ones. + cat $i | markdown | sed 's|]*>\([^<]*\)|[\1 \2]|g' > $i.html done + +echo "adding special wiki thingies..." + +i=doc/official_installation_guide_en +echo $i + +summary=`sed -n '/

Article summary<\/strong><\/p>/, /

Related articles<\/strong><\/p>/ p' $i.html | grep -v 'strong'` #TODO strip html tags from summary? (maybe parse from markdown instead). this does not render on the wiki! + +echo -e "[[Category:Getting and installing Arch (English)]]\n[[Category:HOWTOs (English)]]\n +{{Article summary start}}\n{{Article summary text|$summary}}\n{{Article summary heading|Available Languages}}\n +{{i18n_entry|English|Official Arch Linux Install Guide}}\n +{{Article summary heading|Related articles}}\n +{{Article summary wiki|Beginners Guide}} (If you are new to Arch)\n +{{Article summary end}}" | cat - $i.html > $i.html.tmp && mv $i.html.tmp $i.html -- cgit v1.2.2