summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-08-07 21:17:10 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-08-07 21:17:10 +0200
commit95b80509f1376d62957c21559f3c35649b8898e1 (patch)
treec142cbfc45ba5dcb6c23aac24860e373ff33e3d5
parentd31fe17a24119d536ab604f08033f7483c3e1fd0 (diff)
nice mailto: links in summary
-rwxr-xr-xmake-doc.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/make-doc.sh b/make-doc.sh
index 4db85df..c845cd8 100755
--- a/make-doc.sh
+++ b/make-doc.sh
@@ -1,7 +1,6 @@
#!/bin/sh
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
-# obfuscate email? wiki supports mailto dingske
echo "generating html..."
for i in doc/official_installation_guide_??
@@ -26,11 +25,14 @@ related_end_plus_one='<h1>Introduction<\/h1>'
summary=`sed -n "/$summary_begin/, /$summary_end_plus_one/p;" $i.html | sed "/$summary_begin/d; /$summary_end_plus_one/d"`
related=`sed -n "/$related_begin/, /$related_end_plus_one/p;" $i.html | sed "/$related_begin/d; /$related_end_plus_one/d"`
-# prepare for wikiing.
+# prepare $related for wikiing.
# note that like this we always keep the absulolute url's even if they are on the same subdomain eg: {{Article summary wiki|http://foo/bar bar}} (note).
# wiki renders absolute url a bit uglier. always having absolute url's is not needed if the page can be looked up on the same wiki, but like this it was simplest to implement..
related=`echo "$related"| sed -e 's#<p>\[\(.*\)\] \(.*\)<\/p>#{{Article summary wiki|\1}} \2#'`
+# preare $summary for wiiking: replace email address by nice mailto links
+summary=`echo "$summary" | sed 's/\([^"|, ]*@[-A-Za-z0-9_.]*\)/[mailto:\1 \1]/'`
+
echo -e "[[Category:Getting and installing Arch (English)]]\n[[Category:HOWTOs (English)]]\n
{{Article summary start}}\n{{Article summary text| 1=$summary}}\n{{Article summary heading|Available Languages}}\n
{{i18n_entry|English|Official Arch Linux Install Guide}}\n