mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-02 22:34:31 +02:00
check in docs re-generation instructions/resources
[SVN r19596]
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
@echo off
|
||||
|
||||
if "%4" == "" goto build
|
||||
f:\msxsl\msxsl.exe f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\titlepage.templates.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.52.2\template\titlepage.xsl | f:\msxsl\msxsl.exe - f:\msxsl\to_utf8.xsl -o f:\home\depot\xml\stylesheets\docbook-1.50.0\html\titlepage.templates.xsl
|
||||
if "%3" == "" goto usage
|
||||
|
||||
:build
|
||||
sx -x lower -x empty %2 >%3.xml
|
||||
f:\msxsl\msxsl.exe %3.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\my\%1 -o %3
|
||||
c:\home\sx\bin\sx -x lower -x empty %2 >%3.xml
|
||||
c:\home\msxsl\msxsl.exe %3.xml ..\..\..\..\..\docbook-xsl-1.50.0\html\my\%1 -o %3
|
||||
del %3.xml
|
||||
f:\tidy\tidy.exe -config f:\tidy\config.txt -m %3
|
||||
f:\tidy\tidy_attr.py %3
|
||||
c:\home\tidy\tidy.exe -config tidy_config -m %3
|
||||
python tidy_attr.py %3
|
||||
exit
|
||||
|
||||
:usage
|
||||
echo Usage example:
|
||||
echo msxsl_build.bat docbook_msxsl.xsl src\body.sgml index.html
|
||||
|
@@ -1,11 +0,0 @@
|
||||
@echo off
|
||||
|
||||
if "%4" == "" goto build
|
||||
f:\msxsl\msxsl.exe f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\titlepage.templates.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.52.2\template\titlepage.xsl | f:\msxsl\msxsl.exe - f:\msxsl\to_utf8.xsl -o f:\home\depot\xml\stylesheets\docbook-1.50.0\html\titlepage.templates.xsl
|
||||
|
||||
:build
|
||||
sx -x lower -x empty %2 >%3.xml
|
||||
f:\msxsl\msxsl.exe %3.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\my\%1 -o %3
|
||||
del %3.xml
|
||||
f:\tidy\tidy.exe -config f:\tidy\config.txt -m %3
|
||||
f:\tidy\tidy_attr.py %3
|
18
doc/readme
Normal file
18
doc/readme
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
To re-generate the docs in the exact format as they appear here, you would
|
||||
need a slightly tweaked DocBook XSLT stylesheets disrtibution available at
|
||||
http://www.mywikinet.com/mpl/docbook-xsl-1.50.0.zip
|
||||
|
||||
If you are to use the build scripts as-is, you also need these tools:
|
||||
|
||||
sx - an SGML to XML convertor, a part of James Clark's SP package,
|
||||
available at http://www.jclark.com/sp/
|
||||
|
||||
msxsl - Microsoft XSLT processor, available at
|
||||
http://msdn.microsoft.com/library/en-us/dnxml/html/msxsl.asp
|
||||
|
||||
tidy - http://tidy.sourceforge.net/
|
||||
|
||||
Python - to be able to run 'tidy_attr.py',
|
||||
available at http://www.python.org or
|
||||
http://www.activestate.com/Products/ActivePython/
|
28
doc/tidy_attr.py
Normal file
28
doc/tidy_attr.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
import string
|
||||
|
||||
def tidy_attr(attr_value):
|
||||
return string.lower(attr_value.group())
|
||||
|
||||
def tidy(file):
|
||||
lines = open(file, 'r').readlines()
|
||||
regex = re.compile(r'[name|class]="([^"]*)"')
|
||||
xsltproc_patch = re.compile(r'(\|\|\|)')
|
||||
for i in range(len(lines)):
|
||||
lines[i] = regex.sub(tidy_attr,lines[i])
|
||||
lines[i] = xsltproc_patch.sub(' ',lines[i])
|
||||
|
||||
open(file, 'w') \
|
||||
.writelines(lines)
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print '\tusage: %s <html document>' % sys.argv[0]
|
||||
return -1
|
||||
|
||||
tidy(sys.argv[1])
|
||||
print 'done!'
|
||||
|
||||
main()
|
7
doc/tidy_config
Normal file
7
doc/tidy_config
Normal file
@@ -0,0 +1,7 @@
|
||||
doctype: loose
|
||||
tidy-mark: no
|
||||
wrap: 0
|
||||
wrap-attributes: no
|
||||
enclose-text: yes
|
||||
drop-empty-paras: no
|
||||
quiet: yes
|
Reference in New Issue
Block a user