Merge "Remove files that are part of openstack-doc-tools"
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
## copyright: B1 Systems GmbH <info@b1-systems.de>, 2013.
|
||||
## author: Christian Berendt <berendt@b1-systems.de>, 2013.
|
||||
## license: Apache License, Version 2.0
|
||||
|
||||
# Call ./tools/cleanup/remove_trailing_whitespaces.sh in the
|
||||
# root of openstack-manuals.
|
||||
|
||||
files=$(find doc -name *.xml -not -name pom.xml)
|
||||
for file in $files; do
|
||||
sed -i -e 's/[[:space:]]*$//' $file
|
||||
done
|
@@ -1,56 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
## copyright: B1 Systems GmbH <info@b1-systems.de>, 2013.
|
||||
## author: Christian Berendt <berendt@b1-systems.de>, 2013.
|
||||
## license: Apache License, Version 2.0
|
||||
|
||||
# Call ./tools/cleanup/remove_unnecessary_spaces.py in the
|
||||
# root of openstack-manuals.
|
||||
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
import shutil
|
||||
|
||||
# should be the same like in tools/validate.py
|
||||
FILE_EXCEPTIONS = ['ha-guide-docinfo.xml','bk001-ch003-associate-general.xml']
|
||||
|
||||
elements = [
|
||||
'listitem',
|
||||
'para',
|
||||
'td',
|
||||
'th',
|
||||
'command',
|
||||
'literal',
|
||||
'title',
|
||||
'caption',
|
||||
'filename',
|
||||
'userinput',
|
||||
'programlisting'
|
||||
]
|
||||
|
||||
checks = []
|
||||
for element in elements:
|
||||
checks.append(re.compile("(.*<%s>)\s+([\w\-().:!?{}\[\]]+.*\n)" % element)),
|
||||
checks.append(re.compile("(.*[\w\-().:!?{}\[\]]+)\s+(<\/%s>.*\n)" % element))
|
||||
|
||||
for root, dirs, files in os.walk('doc/'):
|
||||
for f in files:
|
||||
if (not (f.endswith('.xml') and
|
||||
f != 'pom.xml' and
|
||||
f not in FILE_EXCEPTIONS)):
|
||||
continue
|
||||
docfile = os.path.abspath(os.path.join(root, f))
|
||||
tmpfile = tempfile.mkstemp()
|
||||
tmpfd = os.fdopen(tmpfile[0], "w")
|
||||
match = False
|
||||
for line in open(docfile, 'r'):
|
||||
for check in checks:
|
||||
if check.match(line):
|
||||
line = check.sub(r"\1\2", line)
|
||||
match = True
|
||||
tmpfd.write(line)
|
||||
tmpfd.close()
|
||||
if match:
|
||||
shutil.copyfile(tmpfile[1], docfile)
|
||||
os.unlink(tmpfile[1])
|
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Use this transform on a sitemap.xml file generated from freesitemapgenerator.com -->
|
||||
<!-- It removes the /trunk URLs and the release URLs that you indicate below, here it's folsom -->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- template match equals any other url element, keep -->
|
||||
<xsl:template match="node() | @*">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="node() | @*"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- discard any url/loc that refer to trunk or folsom -->
|
||||
<xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/trunk')]"/>
|
||||
<xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/folsom')]"/>
|
||||
|
||||
</xsl:stylesheet>
|
Reference in New Issue
Block a user