Commit c33343da authored by Sergey Korobitsin's avatar Sergey Korobitsin

Import mobile-spec without history

parent 5991b852
# Генератор документации
#
SRC=src
DOCBOOKOPTS=--template=conf/pandoc/book.docbook --smart -t docbook -V lang=ru
.PHONY: clean
mobile-spec.md:
gpp -H -I$(SRC) $(SRC)/index.md > mobile-spec.md
mobile-spec.xml: mobile-spec.md
ifdef VCSREV
pandoc $(DOCBOOKOPTS) mobile-spec.md \
| xsltproc --encoding utf8 \
--stringparam vcs.revision $(VCSREV) \
--stringparam vcs.changedby "$(VCSCHANGEDBY)" \
conf/vcs/insert-revision-and-build-date.xsl - > mobile-spec.xml
else
pandoc $(DOCBOOKOPTS) mobile-spec.md -o mobile-spec.xml
endif
rm mobile-spec.md
html: mobile-spec.xml
rm -rf bin/html
mkdir bin/html
LC_ALL=en_US.UTF-8 xmlto xhtml -m conf/html/settings.xsl -o bin/html mobile-spec.xml
tar --exclude-vcs -c resources | tar x -C bin/html
rm -f mobile-spec.xml
pdf: mobile-spec.xml
@echo Creating pdf docuemnt
# SP_ENCODING="UTF-8" docbook2pdf -o bin all.xml
dblatex -b xetex -o bin/mobile-spec.pdf -c conf/pdf/dblatex.conf mobile-spec.xml
rm -f mobile-spec.xml
clean:
@echo Remove all
rm -rf bin/html/* bin/*.pdf *.xml *.md *.tmp
version:
@sed -n -e '/^version: / s/^version: //p' "src/index.md" | sed 's/\s*//g'
name:
@echo $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) | xargs basename
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:output encoding="UTF-8" indent="yes"/>
<xsl:param name="use.id.as.filename" select="1"/>
<xsl:param name="generate.revhistory.link" select="1"/>
<xsl:param name="html.stylesheet">resources/css/main.css</xsl:param>
<xsl:param name="toc.section.depth" select="4"/>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8" ?>
$if(mathml)$
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.1CR1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
$else$
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
$endif$
$if(lang)$
<book lang="$lang$">
$else$
<book>
$endif$
<bookinfo>
<title>$title$</title>
$for(author)$
<author>
$author$
</author>
$endfor$
$if(subtitle)$
<subtitle>$subtitle$</subtitle>
$endif$
$if(date)$
<date>$date$</date>
$endif$
$if(copyright)$
<legalnotice>
<para>$copyright$</para>
</legalnotice>
$endif$
</bookinfo>
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
</book>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
indent="yes"
doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
doctype-public="-//OASIS//DTD DocBook XML V4.4//EN"/>
<!-- Copy all -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- Add releaseinfo if not present -->
<!-- Maybe we should explictly replace it?
It seems we have to
add another template in that case -->
<xsl:template match="/book/bookinfo[not(pubdate)][not(releaseinfo)]">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<pubdate>Дата сборки документа:
<xsl:processing-instruction name="dbtimestamp">
format="Y.m.d H:M:S"
</xsl:processing-instruction>
</pubdate>
<releaseinfo>Ревизия VCS: <xsl:value-of select="$vcs.revision" /></releaseinfo>
<releaseinfo>Последним изменил: <xsl:value-of select="$vcs.changedby" /></releaseinfo>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<!-- Deal with chapters -->
<xsl:template match="/book/chapter[not(chapterinfo)]">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<chapterinfo>
<pubdate>Дата сборки документа:
<xsl:processing-instruction name="dbtimestamp">
format="Y.m.d H:M:S"
</xsl:processing-instruction>
</pubdate>
<releaseinfo>Ревизия VCS: <xsl:value-of select="$vcs.revision" /></releaseinfo>
</chapterinfo>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<!-- Deal with sections -->
<xsl:template match="/book/chapter/section[not(sectioninfo)]">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<sectioninfo>
<pubdate>Дата сборки документа:
<xsl:processing-instruction name="dbtimestamp">
format="Y.m.d H:M:S"
</xsl:processing-instruction>
</pubdate>
<releaseinfo>Ревизия VCS: <xsl:value-of select="$vcs.revision" /></releaseinfo>
</sectioninfo>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
img {
max-width: 100%;
width: auto;
height: auto;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment