Commit 78962906 authored by Danir Tlepov's avatar Danir Tlepov

added CRM documentation_structure

parents
* text=auto !eol
crm/methodologist-manual/Makefile -text
crm/methodologist-manual/conf/html/settings.xsl -text
crm/methodologist-manual/conf/pandoc/book.docbook -text
crm/methodologist-manual/conf/vcs/insert-revision-and-build-date.xsl -text
crm/methodologist-manual/src/index.md -text
crm/spec/Makefile -text
crm/spec/conf/html/settings.xsl -text
crm/spec/conf/pandoc/book.docbook -text
crm/spec/conf/vcs/insert-revision-and-build-date.xsl -text
crm/spec/src/index.md -text
crm/user-manual/Makefile -text
crm/user-manual/conf/html/settings.xsl -text
crm/user-manual/conf/pandoc/book.docbook -text
crm/user-manual/conf/vcs/insert-revision-and-build-date.xsl -text
crm/user-manual/src/index.md -text
# Генератор документации
SRC=src
DOCBOOK-XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl
DOCBOOKOPTS=--template=conf/pandoc/book.docbook --smart -t docbook -V lang=ru
methodologist-manual.md:
gpp -H -I$(SRC) $(SRC)/index.md > methodologist-manual.md
methodologist-manual.xml: methodologist-manual.md
@echo Creating full XML image
ifdef VCSREV
pandoc $(DOCBOOKOPTS) methodologist-manual.md \
| xsltproc --encoding utf8 \
--stringparam vcs.revision $(VCSREV) \
--stringparam vcs.changedby "$(VCSCHANGEDBY)" \
--xinclude conf/vcs/insert-revision-and-build-date.xsl - > methodologist-manual.xml
else
pandoc $(DOCBOOKOPTS) methodologist-manual.md -o methodologist-manual.xml
#SP_ENCODING="UTF-8" xmllint --encode utf8 --xinclude src/index.xml > methodologist-manual.xml
endif
sed -i 's/xml:base=".*"//g' methodologist-manual.xml
rm -f methodologist-manual.md
html: methodologist-manual.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 methodologist-manual.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 methodologist-manual.xml
pdf: methodologist-manual.xml
@echo Creating pdf document
# SP_ENCODING="UTF-8" docbook2pdf -o bin methodologist-manual.xml
dblatex -b xetex -o bin/methodologist-manual.pdf methodologist-manual.xml
rm -f methodologist-manual.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
...
Test text
# Генератор документации
SRC=src
DOCBOOK-XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl
DOCBOOKOPTS=--template=conf/pandoc/book.docbook --smart -t docbook -V lang=ru
spec.md:
gpp -H -I$(SRC) $(SRC)/index.md > spec.md
spec.xml: spec.md
@echo Creating full XML image
ifdef VCSREV
pandoc $(DOCBOOKOPTS) user-manual.md \
| xsltproc --encoding utf8 \
--stringparam vcs.revision $(VCSREV) \
--stringparam vcs.changedby "$(VCSCHANGEDBY)" \
--xinclude conf/vcs/insert-revision-and-build-date.xsl - > spec.xml
else
pandoc $(DOCBOOKOPTS) spec.md -o spec.xml
#SP_ENCODING="UTF-8" xmllint --encode utf8 --xinclude src/index.xml > spec.xml
endif
sed -i 's/xml:base=".*"//g' spec.xml
rm -f spec.md
html: spec.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 spec.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 spec.xml
pdf: spec.xml
@echo Creating pdf document
# SP_ENCODING="UTF-8" docbook2pdf -o bin spec.xml
dblatex -b xetex -o bin/spec.pdf spec.xml
rm -f spec.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
...
Test text
# Генератор документации
SRC=src
DOCBOOK-XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl
DOCBOOKOPTS=--template=conf/pandoc/book.docbook --smart -t docbook -V lang=ru
user-manual.md:
gpp -H -I$(SRC) $(SRC)/index.md > user-manual.md
user-manual.xml: user-manual.md
@echo Creating full XML image
ifdef VCSREV
pandoc $(DOCBOOKOPTS) user-manual.md \
| xsltproc --encoding utf8 \
--stringparam vcs.revision $(VCSREV) \
--stringparam vcs.changedby "$(VCSCHANGEDBY)" \
--xinclude conf/vcs/insert-revision-and-build-date.xsl - > user-manual.xml
else
pandoc $(DOCBOOKOPTS) user-manual.md -o user-manual.xml
#SP_ENCODING="UTF-8" xmllint --encode utf8 --xinclude src/index.xml > user-manual.xml
endif
sed -i 's/xml:base=".*"//g' user-manual.xml
rm -f user-manual.md
html: user-manual.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 user-manual.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 user-manual.xml
pdf: user-manual.xml
@echo Creating pdf document
# SP_ENCODING="UTF-8" docbook2pdf -o bin user-manual.xml
dblatex -b xetex -o bin/user-manual.pdf user-manual.xml
rm -f user-manual.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
...
Test text
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