documentation/tools/eclipse-help.sed: Processes external links for eclipse html files

The file is used when creating eclipse help html files. It processes
all html files and converts links so that the user can navigate
between different docuementation parts without leaving the eclipse
help center.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Timo Mueller 2012-11-30 09:59:50 +01:00 committed by Richard Purdie
parent 108ffcf310
commit a11f23b4bc
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
# For example:
# "ulink" href="http://www.yoctoproject.org/docs/1.3/poky-ref-manual/poky-ref-manual.html#faq"
# -> "link" href="../poky-ref-manual/faq.html"
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
# Processes all other manuals (<word>-<word> style)
# For example:
# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html#faq"
# -> "link" href="../kernel-manual/faq.html"
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
# Process cases where just an external manual is referenced without an id anchor
# For example:
# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html
# -> "link" href="../kernel-manual/index.html"
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g