Commit 3af941cb authored by Danir Tlepov's avatar Danir Tlepov

[TASK #CRM] added additional documentation (install_doc)

parent 83c197e5
* text=auto !eol
crm/additional/Makefile -text
crm/additional/conf/html/settings.xsl -text
crm/additional/conf/pandoc/book.docbook -text
crm/additional/conf/vcs/insert-revision-and-build-date.xsl -text
crm/additional/src/index.md -text
crm/methodologist-manual/Makefile -text
crm/methodologist-manual/conf/html/settings.xsl -text
crm/methodologist-manual/conf/pandoc/book.docbook -text
......
# Генератор документации
SRC=src
DOCBOOK-XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl
DOCBOOKOPTS=--template=conf/pandoc/book.docbook --smart -t docbook -V lang=ru
additional.md:
gpp -H -I$(SRC) $(SRC)/index.md > additional.md
additional.xml: additional.md
@echo Creating full XML image
ifdef VCSREV
pandoc $(DOCBOOKOPTS) additional.md \
| xsltproc --encoding utf8 \
--stringparam vcs.revision $(VCSREV) \
--stringparam vcs.changedby "$(VCSCHANGEDBY)" \
--xinclude conf/vcs/insert-revision-and-build-date.xsl - > additional.xml
else
pandoc $(DOCBOOKOPTS) additional.md -o additional.xml
#SP_ENCODING="UTF-8" xmllint --encode utf8 --xinclude src/index.xml > additional.xml
endif
sed -i 's/xml:base=".*"//g' additional.xml
rm -f additional.md
html: additional.xml
@echo Creating html document
rm -rf bin/html
mkdir bin/html
LC_ALL=en_US.UTF-8 xmlto xhtml -m conf/html/settings.xsl -o bin/html additional.xml
tar --exclude-vcs -c resources | tar x -C bin/html
# Working around images used in stylesheets
mkdir bin/html/resources/docbook
cp -a $(DOCBOOK-XSL)/images bin/html/resources/docbook
rm -f additional.xml
pdf: additional.xml
@echo Creating pdf document
# SP_ENCODING="UTF-8" docbook2pdf -o bin additional.xml
dblatex -b xetex -o bin/additional.pdf additional.xml
rm -f additional.xml
clean:
@echo Remove all
rm -rf *.xml *.md bin/*
<?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="toc.section.depth" select="6"/>
</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(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>
---
author:
- Гульнур Ережеева
title: Инструкция по установке CRM
...
Тут будет текст
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