Move edox help text to (almost clean) docbook xml, from which dox, html, and man output can be generated.
SVN revision: 39005
This commit is contained in:
parent
38e9aa5ee1
commit
3f4e46b6f3
|
@ -9,7 +9,7 @@ MAINTAINERCLEANFILES = aclocal.m4 config.* compile configure depcomp \
|
|||
po/*.header po/*.sed po/*.sin po/e16.pot \
|
||||
*~ */*~
|
||||
|
||||
SUBDIRS = dox eesh epp src lib config themes fonts man scripts misc docs po
|
||||
SUBDIRS = dox eesh epp src lib config themes fonts scripts misc docs po
|
||||
|
||||
EXTRA_DIST = \
|
||||
sample-scripts/bouncingball.pl \
|
||||
|
|
|
@ -378,7 +378,6 @@ dox/E-docs/Makefile
|
|||
eesh/Makefile
|
||||
epp/Makefile
|
||||
lib/Makefile
|
||||
man/Makefile
|
||||
config/Makefile
|
||||
config/pix/Makefile
|
||||
themes/Makefile
|
||||
|
|
|
@ -1,14 +1,32 @@
|
|||
if HAVE_XMLTO
|
||||
|
||||
e16docdir = ${datadir}/doc/${PACKAGE}
|
||||
e16doc_DATA = index.html
|
||||
e16doc_DATA = README-0.16.8.html
|
||||
|
||||
EXTRA_DIST = README-0.16.8.xml
|
||||
EXTRA_DIST = README-0.16.8.xml e16-docs.xml xml2dox.xsl # e16.1
|
||||
|
||||
CLEANFILES = *.html
|
||||
CLEANFILES = *.html MAIN e16-docs.1.xml e16.1
|
||||
|
||||
index.html: README-0.16.8.xml
|
||||
README-0.16.8.html: README-0.16.8.xml
|
||||
$(XMLTO) html $<
|
||||
sed -i -e 's/index.html/README-0.16.8.html/' index.html ar*.html
|
||||
mv index.html $@
|
||||
|
||||
man_MANS = # e16.1
|
||||
|
||||
e16.1: e16-docs.1.xml
|
||||
$(XMLTO) man $<
|
||||
|
||||
e16-docs.html: e16-docs.1.xml
|
||||
$(XMLTO) html $<
|
||||
sed -i -e 's/index.html/e16-docs.html/' index.html
|
||||
mv index.html $@
|
||||
|
||||
e16-docs.1.xml: e16-docs.xml
|
||||
grep -v -e "^<font" -e "^<img" -e "more on next page" $< > $@
|
||||
|
||||
MAIN: e16-docs.xml xml2dox.xsl
|
||||
xsltproc $(srcdir)/xml2dox.xsl $< > $@
|
||||
|
||||
install-data-local:
|
||||
mkdir -p $(DESTDIR)$(e16docdir)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,91 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="text"/>
|
||||
|
||||
<xsl:template name="copy-attr">
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:text disable-output-escaping="yes"> </xsl:text>
|
||||
<xsl:value-of select="name()"/>=<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="copy">
|
||||
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
||||
<xsl:value-of select="name()"/>
|
||||
<xsl:call-template name="copy-attr"/>
|
||||
<xsl:text disable-output-escaping="yes">></xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="para">
|
||||
<xsl:choose>
|
||||
<xsl:when test="markup[@role='dox-center']">
|
||||
<xsl:text disable-output-escaping="yes"><p align=50%></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text disable-output-escaping="yes"><p></xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="refentry">
|
||||
<xsl:apply-templates select="refsect1"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="refsect1">
|
||||
<xsl:apply-templates select="refsect2"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="refsect2">
|
||||
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@id = 'docindex'">
|
||||
<xsl:text>page columns=2 padding=16 name=</xsl:text><xsl:value-of select="@id"/><xsl:text> background=Edoc_bg.png linkcolor=#88dddd</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>page columns=1 padding=16 name=</xsl:text><xsl:value-of select="@id"/><xsl:text> background=Edoc_bg.png linkcolor=#88dddd</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text disable-output-escaping="yes">></xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text disable-output-escaping="yes">

</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="para">
|
||||
<xsl:if test="name(preceding-sibling::*[1]) != 'para' and name(preceding-sibling::*[1]) != 'font' ">
|
||||
<xsl:text disable-output-escaping="yes"><font face=Vera/11 color=#ffffff>
</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="para"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="member">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text disable-output-escaping="yes"><br></xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<xsl:text>_</xsl:text>
|
||||
<xsl:value-of select="translate(.,' ','_')"/>
|
||||
<xsl:text>(</xsl:text><xsl:value-of select="@linkend"/><xsl:text>)</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="font|img">
|
||||
<xsl:call-template name="copy"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="refentryinfo | refmeta | refnamediv">
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title">
|
||||
<xsl:if test="normalize-space(.)">
|
||||
<xsl:text disable-output-escaping="yes">
</xsl:text>
|
||||
<xsl:text disable-output-escaping="yes"><font face=VeraBd/16 color=#ffffff>
</xsl:text>
|
||||
<xsl:call-template name="para"/>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -1,10 +0,0 @@
|
|||
man_MANS = # e16.1
|
||||
|
||||
EXTRA_DIST = e16.1
|
||||
|
||||
e16.man: e16.pod
|
||||
pod2man --center="Enlightenment Man Pages" \
|
||||
--release="Enlightenment @E_PKG_VERSION@" $< > $@
|
||||
|
||||
e16.pod: $(top_srcdir)/man/MAIN
|
||||
$(top_srcdir)/man/e2mp < $< > $@
|
75
man/e2mp
75
man/e2mp
|
@ -1,75 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
print "=pod\n\n\n\n";
|
||||
|
||||
print "=head1 NAME\n\n\nEnlightenment - The Window Manager that dares to do what others don't\n\n\n\n";
|
||||
|
||||
print "=head1 WARNING\n\n\n";
|
||||
|
||||
print "This documentation is automatically generated for you from the\n";
|
||||
print "online help documentation. It is NOT to be considered a full\n";
|
||||
print "substitute for this documentation. It may be accessed by\n";
|
||||
print "middle clicking on your desktop and selecting the \"Help\" item.\n";
|
||||
print "If you are not currently running enlightenment, you may access\n";
|
||||
print "this documentation by running the dox Help Browser\n";
|
||||
print "To do this, run ENLIGHTENMENT_BIN/dox ENLIGHTENMENT_ROOT/E-docs\n";
|
||||
print "(where BIN and ROOT are the locations of your e binaries and shared\n";
|
||||
print "files, respectively)\n\n\n\n\n";
|
||||
|
||||
print "=head1 DESCRIPTION\n\n\n";
|
||||
|
||||
undef $/;
|
||||
$_ = <>;
|
||||
s/<br>/ /gi;
|
||||
s/<p\b[^>]*>/\n/gi;
|
||||
s/<page\b[^>]*>/\n/gi;
|
||||
s/<img[^>]*>/\n/gi;
|
||||
s/\b_(\w+)\(\w+\)(?:<br>\n)?/undermunge($1)/ge;
|
||||
s/^ (?=\w)//gm;
|
||||
|
||||
s{<font face=rothwell/25 color=#ffffff>(.*?)<font face=aircut3/12 color=#ffffff>}{maketitle($1)}seg;
|
||||
|
||||
s{<font face=aircut3/12 color=#ccaacc>(.*?)<font.*?>}{make_lit($1)}ges;
|
||||
s{<font face=aircut3/10 color=#112222>(.*?)<font.*?>}{make_lit($1)}ges;
|
||||
|
||||
s/\n{2,}\s*((?:[A-Z]\w+ *)+)\n{2,}/\n\n=head2 $1\n\n/g;
|
||||
s/\s+\.\n/. /gm;
|
||||
s/\(more on next page \.\.\.\)\n//g;
|
||||
s/More on the next page.\n\n//g;
|
||||
s/<font\b[^>]*>//g;
|
||||
s/ +$//gm;
|
||||
s/\n{3,}/\n\n/g;
|
||||
s/Frequently Asked Questions: Page .\n//g;
|
||||
s/\n\nGNOME Setup Part 2\n//g;
|
||||
s/\nnext page\n//g;
|
||||
s/\n<br align=75\%>//g;
|
||||
s/\n_.*\(faq.*\)\n\n/\n/g;
|
||||
s/\n_.*\(faq.*\)\n\n/\n/g;
|
||||
s/\n_.*\(faq.*\)\n\n/\n/g;
|
||||
s/\n_.*\(faq.*\)\n\n/\n/g;
|
||||
s/Documentation Index/Welcome To Enlightenment/g;
|
||||
print;
|
||||
|
||||
print "\n\n\n\n=head1 FOR MORE INFORMATION\n\n\n";
|
||||
print "Please see our web site at http://www.enlightenment.org\n";
|
||||
|
||||
sub undermunge {
|
||||
local $_ = shift;
|
||||
s/_/ /g;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub maketitle {
|
||||
local $_ = shift;
|
||||
s/\n/ /g;
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
s/^/\n\n/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub make_lit {
|
||||
local $_ = shift;
|
||||
s/^/ /gm;
|
||||
return $_;
|
||||
}
|
Loading…
Reference in New Issue