Commit 55d44e89 authored by Dan Lipsa's avatar Dan Lipsa

Add reStructured text (RST) formating to proxy documentation.

See Calculator for an example.
Also, sort documentation by proxy label, fix readers and writers,
add the extension to readers and writers documentation.

Change-Id: I74c8a96d52df858bf04af5b27951c20117a09ecd
parent ca67a448
......@@ -252,10 +252,11 @@ function (generate_htmls_from_xmls output_files xmls gui_xmls output_dir)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${first_xml}.xml"
# process each html file to sperate it out into files for each proxy.
# process each html file to separate it out into files for each proxy.
COMMAND ${CMAKE_COMMAND}
-Dxmlpatterns:FILEPATH=${QT_XMLPATTERNS_EXECUTABLE}
-Dxml_to_xml_xsl:FILEPATH=${ParaView_CMAKE_DIR}/smxml_to_xml.xsl
-Dgenerate_category_rw_xsl:FILEPATH=${ParaView_CMAKE_DIR}/generate_category_rw.xsl
-Dxml_to_html_xsl:FILEPATH=${ParaView_CMAKE_DIR}/xml_to_html.xsl
-Dxml_to_wiki_xsl:FILEPATH=${ParaView_CMAKE_DIR}/xml_to_wiki.xsl.in
-Dinput_xmls:STRING=${xmls_string}
......
<?xml version="1.0" encoding="utf8"?>
<!-- XSL used to add categoryindex node for Readers and Writers
to run use : xmlpatterns <xsl> <xml> -output <xml>
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/xml">
<xml>
<xsl:for-each select="proxy">
<xsl:copy-of select="." />
</xsl:for-each>
<xsl:for-each select="categoryindex">
<xsl:copy-of select="." />
</xsl:for-each>
<!-- TODO use a function for this -->
<xsl:if test="count(proxy/ReaderFactory) > 0">
<categoryindex>
<label>Readers</label>
<xsl:for-each select="proxy[ReaderFactory and group='sources']">
<xsl:element name="item">
<xsl:attribute name="proxy_name">
<xsl:value-of select="name"/></xsl:attribute>
<xsl:attribute name="proxy_group">
<xsl:value-of select="group"/></xsl:attribute>
</xsl:element>
</xsl:for-each>
</categoryindex>
</xsl:if>
<xsl:if test="count(proxy/WriterFactory) > 0">
<categoryindex>
<label>Writers</label>
<xsl:for-each select="proxy[WriterFactory]">
<xsl:element name="item">
<xsl:attribute name="proxy_name">
<xsl:value-of select="name"/></xsl:attribute>
<xsl:attribute name="proxy_group">
<xsl:value-of select="group"/></xsl:attribute>
</xsl:element>
</xsl:for-each>
</categoryindex>
</xsl:if>
</xml>
</xsl:template>
</xsl:stylesheet>
......@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 2.8)
# INPUT VARIABLES:
# xmlpatterns :- xmlpatterns executable.
# xml_to_xml_xsl :- xsl file to convert SM xml to internal xml Model.
# generate_category_rw_xsl
# :- xsl file to generate a categoryindex for Readers and Writers
# xml_to_html_xsl :- xsl file to conevrt the internal xml to html.
# xml_to_wiki_xsl :- xsl file to conevrt the internal xml to wiki.
# input_xmls :- + separated list of SM xml files
......@@ -52,6 +54,15 @@ endforeach()
set (xslt_xml "<xml>\n${xslt_xml}\n</xml>")
file (WRITE "${output_file}" "${xslt_xml}")
# process the temporary xml to generate categoryindex for readers and writers
execute_process(
COMMAND "${xmlpatterns}"
"${generate_category_rw_xsl}"
"${output_file}"
OUTPUT_VARIABLE temp
)
file (WRITE "${output_file}" "${temp}")
# process the temporary.xml using the second XSL to generate a combined html
# file.
set (multiple_htmls)
......@@ -74,10 +85,23 @@ foreach (single_html ${multiple_htmls_as_list})
string(REGEX MATCH "<meta name=\"filename\" contents=\"([a-zA-Z0-9._-]+)\"" tmp "${single_html}")
set (filename ${CMAKE_MATCH_1})
if (filename)
# process formatting strings.
# revert the semicolon placeholder
string (REPLACE "\\semicolon" ";" single_html "${single_html}")
string (REGEX REPLACE "\\\\bold{([^}]+)}" "<b>\\1</b>" single_html "${single_html}")
string (REGEX REPLACE "\\\\emph{([^}]+)}" "<i>\\1</i>" single_html "${single_html}")
# convert RST formatting strings into HTML
# bold
string (REGEX REPLACE "[*][*]([^*]+)[*][*]" "<b>\\1</b>" single_html
"${single_html}")
# italic
string (REGEX REPLACE "[*]([^*]+)[*]" "<i>\\1</i>" single_html
"${single_html}")
# unordered list
string (REPLACE "\n\n- " "\n<ul><li>" single_html "${single_html}")
string (REPLACE "\n- " "\n<li>" single_html "${single_html}")
string (REGEX REPLACE "<li>(.*)\n\n([^-])" "<li>\\1</ul>\n\\2" single_html
"${single_html}")
# paragraph
string (REPLACE "\n\n" "\n<p>\n" single_html "${single_html}")
file (WRITE "${output_dir}/${filename}" "${single_html}")
endif()
endforeach()
......
......@@ -6,7 +6,7 @@
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="ServerManagerConfiguration/ProxyGroup">
<xsl:for-each select="SourceProxy|Proxy|PWriterProxy|WriterProxy|PSWriterProxy">
<xsl:for-each select="CompoundSourceProxy|SourceProxy|Proxy|PWriterProxy|WriterProxy|PSWriterProxy">
<proxy>
<group><xsl:value-of select="../@name" /></group>
<name><xsl:value-of select="@name" /></name>
......@@ -31,6 +31,12 @@
<domains><xsl:call-template name="WriteDomain" /></domains>
</property>
</xsl:for-each>
<xsl:if test="Hints/ReaderFactory">
<xsl:copy-of select="Hints/ReaderFactory" />
</xsl:if>
<xsl:if test="Hints/WriterFactory">
<xsl:copy-of select="Hints/WriterFactory" />
</xsl:if>
</proxy>
</xsl:for-each>
</xsl:template>
......@@ -242,22 +248,8 @@
</categoryindex>
</xsl:template>
<xsl:template match="ParaViewReaders">
<categoryindex>
<label>Readers</label>
<xsl:call-template name="GenerateCategoryIndex" />
</categoryindex>
</xsl:template>
<xsl:template match="ParaViewWriters">
<categoryindex>
<label>Writers</label>
<xsl:call-template name="GenerateCategoryIndex" />
</categoryindex>
</xsl:template>
<xsl:template name="GenerateCategoryIndex" >
<xsl:for-each select="Proxy">
<xsl:for-each select="//Proxy">
<xsl:element name="item">
<xsl:attribute name="proxy_name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:attribute name="proxy_group"><xsl:value-of select="@group"/></xsl:attribute>
......
......@@ -10,7 +10,7 @@
<xsl:template name="proxy_index">
<xsl:param name="proxy_group" />
<xsl:param name="proxy_name" />
<xsl:param name="proxy_label" />
<tr>
<td>
<xsl:element name="a">
......@@ -22,9 +22,37 @@
<td>
<xsl:value-of select="/xml/proxy[group=$proxy_group and name=$proxy_name]/documentation/brief" />
</td>
<xsl:if test="$proxy_label = 'Writers'">
<td>
<xsl:value-of select="/xml/proxy[group=$proxy_group and name=$proxy_name]/WriterFactory/@extensions" />
</td>
</xsl:if>
<xsl:if test="$proxy_label = 'Readers'">
<td>
<xsl:value-of select="/xml/proxy[group=$proxy_group and name=$proxy_name]/ReaderFactory/@extensions" />
</td>
</xsl:if>
</tr>
</xsl:template>
<xsl:template name="all_proxies_index">
<xsl:param name="proxy_group" />
<xsl:param name="proxy_label" />
<!-- we select only proxies for this group,
which also exist in /xml/categoryindex/item -->
<xsl:for-each select="/xml/proxy[group=$proxy_group and name = /xml/categoryindex[label = $proxy_label]/item/@proxy_name]">
<xsl:sort select="label"/>
<xsl:call-template name="proxy_index">
<xsl:with-param name="proxy_group"><xsl:value-of select="group"/>
</xsl:with-param>
<xsl:with-param name="proxy_name"><xsl:value-of select="name"/>
</xsl:with-param>
<xsl:with-param name="proxy_label"><xsl:value-of select="$proxy_label"/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template match="/xml/categoryindex">
<html>
<head>
......@@ -37,13 +65,19 @@
<h2><xsl:value-of select="label" /></h2>
<hr/>
<table class="index_table">
<tr><th>Name</th><th>Description</th></tr>
<xsl:for-each select="item">
<xsl:call-template name="proxy_index">
<xsl:with-param name="proxy_group"><xsl:value-of select="@proxy_group"/></xsl:with-param>
<xsl:with-param name="proxy_name"><xsl:value-of select="@proxy_name"/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<tr><th>Name</th><th>Description</th>
<xsl:if test="label = 'Readers' or label = 'Writers'">
<th>Extension</th>
</xsl:if>
</tr>
<xsl:call-template name="all_proxies_index">
<xsl:with-param name="proxy_group">
<xsl:value-of select="item[1]/@proxy_group"/>
</xsl:with-param>
<xsl:with-param name="proxy_label">
<xsl:value-of select="label"/>
</xsl:with-param>
</xsl:call-template>
</table>
</body>
</html>
......
......@@ -70,6 +70,17 @@
<SourceProxy class="vtkAnnotateGlobalDataFilter"
label="Annotate Global Data"
name="AnnotateGlobalData">
<Documentation short_help="Filter for annotating with global data (designed for ExodusII reader)">
Annotate Global Data provides a simpler API for creating text
annotations using vtkPythonAnnotationFilter. Instead of users
specifying the annotation expression, this filter determines the
expression based on the array selected by limiting the scope of the
functionality. This filter only allows the user to annotate using
"global-data" aka field data and specify the string prefix to use. If
the field array chosen has as many elements as number of timesteps,
the array is assumed to be "temporal" and indexed using the current
timestep.
</Documentation>
<InputProperty clean_command="RemoveAllInputs"
command="AddInputConnection"
multiple_input="1"
......@@ -116,14 +127,16 @@
<SourceProxy class="vtkAnnotateAttributeDataFilter"
label="Annotate Attribute Data"
name="AnnotateAttributeData">
<Documentation>
This filter can be used to add a text annotation to a Render View (or similar)
using a tuple from any attribute array (point/cell/field/row etc.) from a specific rank
(when running in parallel). Use 'ArrayName' property to select the array association and
array name. Use 'ElementId' property to set the element number to extract the value to label
with. When running on multiple ranks, use 'ProcessId' property to select the rank of interest.
The 'Prefix' property can be used to specify a string that will be used as the prefix to the
generated annotation text.
<Documentation short_help="Adds a text annotation to a Rander View">
This filter can be used to add a text annotation to a Render View (or
similar) using a tuple from any attribute array (point/cell/field/row
etc.) from a specific rank (when running in parallel). Use **ArrayName**
property to select the array association and array name. Use
**ElementId* property to set the element number to extract the value to
label with. When running on multiple ranks, use **ProcessId** property
to select the rank of interest. The **Prefix** property can be used to
specify a string that will be used as the prefix to the generated
annotation text.
</Documentation>
<InputProperty clean_command="RemoveAllInputs"
command="AddInputConnection"
......
......@@ -5338,6 +5338,14 @@
base_proxyname="Xdmf3ReaderCore"
class="vtkXdmf3Reader"
name="Xdmf3ReaderT">
<Documentation short_help=
"Reads XDMF data files so that they can be visualized using VTK.">
Reads XDMF data files so that they can be visualized using VTK. The
output data produced by this reader depends on the number of grids in
the data file. If the data file has a single domain with a single
grid, then the output type is a vtkDataSet subclass of the appropriate
type, otherwise it's a vtkMultiBlockDataSet.
</Documentation>
<IntVectorProperty command="SetFileSeriesAsTime"
default_values="1"
......@@ -5360,6 +5368,14 @@
base_proxyname="Xdmf3ReaderCore"
class="vtkXdmf3Reader"
name="Xdmf3ReaderS">
<Documentation short_help=
"Reads XDMF data files so that they can be visualized using VTK.">
Reads XDMF data files so that they can be visualized using VTK. The
output data produced by this reader depends on the number of grids in
the data file. If the data file has a single domain with a single
grid, then the output type is a vtkDataSet subclass of the appropriate
type, otherwise it's a vtkMultiBlockDataSet.
</Documentation>
<IntVectorProperty command="SetFileSeriesAsTime"
default_values="0"
......@@ -6387,10 +6403,13 @@
<SourceProxy class="vtkPSLACReader"
label="SLAC Data Reader"
name="SLACReader">
<Documentation>A reader for a data format used by Omega3p, Tau3p, and
several other tools used at the Standford Linear Accelerator Center
(SLAC). The underlying format uses netCDF to store arrays, but also
imposes several conventions to form an unstructured grid of
<Documentation short_help="A reader for a data format used by
Omega3p, Tau3p, and several other tools used at the Standford
Linear Accelerator Center (SLAC)">A reader for a data format
used by Omega3p, Tau3p, and several other tools used at the
Standford Linear Accelerator Center (SLAC). The underlying
format uses netCDF to store arrays, but also imposes several
conventions to form an unstructured grid of
elements.</Documentation>
<OutputPort index="0"
name="External Surface" />
......@@ -6534,7 +6553,7 @@
label="SLAC Particle Data Reader"
name="SLACParticleReader"
si_class="vtkSIMetaReaderProxy">
<Documentation>The SLAC Particle data reader.</Documentation>
<Documentation short_help="The SLAC Particle data reader.">The SLAC Particle data reader.</Documentation>
<SubProxy>
<Proxy name="Reader"
proxygroup="internal_sources"
......@@ -7418,6 +7437,17 @@
<SourceProxy class="vtkPlot3DMetaReader"
label="PLOT3D Meta-File Reader"
name="Plot3DMetaReader">
<Documentation short_help="The main goal of this reader is to make it easy to read PLOT3D files or time series of PLOT3D files.">
The main goal of this reader is to make it easy to read PLOT3D files,
specifically time series of PLOT3D files. PLOT3D files can take many
different forms based on their content. Unfortunately, it is not a
self-describing format therefore the user needs to pass information
about the contents of the file to the reader. Normally, this is done
by setting a number of member variables. The goal of this reader is to
provide a simple format that enable the writer of the PLOT3D file to
describe its settings as well as group a number of files as a time
series.
</Documentation>
<StringVectorProperty animateable="0"
command="SetFileName"
name="FileName"
......@@ -7443,6 +7473,10 @@
<SourceProxy class="vtkCMLMoleculeReader"
label="CML Molecule Reader"
name="CMLMoleculeReader">
<Documentation short_help="A reader for Chemical Markup Language (CML)">
This is a reader for Chemical Markup Language (CML) which
describes chemical information using XML.
</Documentation>
<StringVectorProperty animateable="0"
command="SetFileName"
name="FileName"
......
......@@ -111,7 +111,8 @@ void pqPropertyWidget::setProperty(vtkSMProperty *smproperty)
this->Property = smproperty;
if (smproperty && smproperty->GetDocumentation())
{
QString doc = smproperty->GetDocumentation()->GetDescription();
QString doc = pqProxy::rstToHtml(
smproperty->GetDocumentation()->GetDescription()).c_str();
doc = doc.trimmed();
doc = doc.replace(QRegExp("\\s+")," ");
this->setToolTip(
......
......@@ -632,16 +632,19 @@ bool pqProxyWidget::useDocumentationForLabels(vtkSMProxy* smproxy)
}
//-----------------------------------------------------------------------------
const char* pqProxyWidget::documentationText(vtkSMProperty* smProperty)
QString pqProxyWidget::documentationText(vtkSMProperty* smProperty)
{
const char *xmlLabel = smProperty->GetXMLLabel();
const char* xmlDocumentation = smProperty->GetDocumentation()?
smProperty->GetDocumentation()->GetDescription() : NULL;
if (!xmlDocumentation || xmlDocumentation[0] == 0)
{
xmlDocumentation = xmlLabel;
const char *xmlLabel = smProperty->GetXMLLabel();
return xmlLabel;
}
else
{
return pqProxy::rstToHtml(xmlDocumentation).c_str();
}
return xmlDocumentation;
}
//-----------------------------------------------------------------------------
......@@ -893,7 +896,7 @@ void pqProxyWidget::createPropertyWidgets(const QStringList &properties)
propertyKeyName.replace(" ", "");
const char *xmlLabel = smProperty->GetXMLLabel()? smProperty->GetXMLLabel():
propertyIter->GetKey();
const char* xmlDocumentation = pqProxyWidget::documentationText(smProperty);
QString xmlDocumentation = pqProxyWidget::documentationText(smProperty);
bool ignorePanelVisibility = false;
if(!properties.isEmpty())
......
......@@ -84,7 +84,7 @@ public:
static QWidget* newGroupLabelWidget(const QString& label, QWidget* parentWidget);
static bool useDocumentationForLabels(vtkSMProxy* proxy);
static const char* documentationText(vtkSMProperty* property);
static QString documentationText(vtkSMProperty* property);
signals:
/// This signal is fired as soon as the user starts editing in the widget. The
......
......@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkSMSessionProxyManager.h"
#include "vtkSMTrace.h"
#include "vtksys/RegularExpression.hxx"
#include "pqApplicationCore.h"
#include "pqServer.h"
#include "pqServerManagerModel.h"
......@@ -364,3 +366,76 @@ void pqProxy::onProxyUnRegistered(const QString& group, const QString& name, vtk
this->removeInternalHelperProxy(name, proxy);
}
}
//-----------------------------------------------------------------------------
std::string pqProxy::rstToHtml(const char* rstStr)
{
std::string htmlStr = rstStr;
{
// bold
vtksys::RegularExpression re("[*][*]([^*]+)[*][*]");
while (re.find (htmlStr))
{
const char* s = htmlStr.c_str();
std::string bold(s + re.start(1), re.end(1)- re.start(1));
htmlStr.replace (re.start(0),
re.end(0) - re.start(0),
std::string("<b>") + bold + "</b>");
}
}
{
// italic
vtksys::RegularExpression re("[*]([^*]+)[*]");
while (re.find (htmlStr))
{
const char* s = htmlStr.c_str();
std::string it(s + re.start(1), re.end(1)- re.start(1));
htmlStr.replace (re.start(0), re.end(0) - re.start(0),
std::string("<i>") + it + "</i>");
}
}
{
// begin bullet list
size_t start = 0;
std::string src ("\n\n- ");
while ((start = htmlStr.find(src, start))
!= std::string::npos)
{
htmlStr.replace (start, src.size(), "\n<ul><li>");
}
}
{
// li for bullet list
size_t start = 0;
std::string src("\n- ");
while ((start = htmlStr.find(src, start))
!= std::string::npos)
{
htmlStr.replace (start, src.size(), "\n<li>");
}
}
{
// end bullet list
vtksys::RegularExpression re("<li>(.*)\n\n([^-])");
while (re.find (htmlStr))
{
const char* s = htmlStr.c_str();
std::string listItem(s + re.start(1), re.end(1)- re.start(1));
std::string afterList(s + re.start(2), re.end(2) - re.start(2));
htmlStr.replace (
re.start(0), re.end(0) - re.start(0),
std::string("<li>") + listItem + "</ul>" + afterList);
}
}
{
// paragraph
size_t start = 0;
std::string src("\n\n");
while ((start = htmlStr.find(src, start))
!= std::string::npos)
{
htmlStr.replace (start, src.size(), "\n<p>\n");
}
}
return htmlStr;
}
......@@ -107,6 +107,9 @@ public:
/// Returns the keys for helper proxies.
QList<QString> getHelperKeys() const;
/// convert proxy documentation from RST to HTML (so that it can be used in Qt)
static std::string rstToHtml(const char* rstStr);
/// Concept of helper proxies:
/// A pqProxy is created for every important vtkSMProxy registered. Many a times,
/// there may be other proxies associated with that proxy, eg. lookup table proxies,
......
Proxy Documentation Formatting {#ProxyDocumentationFormatting}
==============================
This page describes formatting options for proxy documentation in
different ParaView versions (since we started tracking these after
version 4.2).
Changes in 4.3
--------------
###Formatting options are added for proxy documentation###
Documentation for proxies (and for input properties for proxies)
accepts reStructured text (RST) formatting options. Supported options
are: bold, italic, unordered lists, and paragraphs. Nested unordered
lists are not supported. Note that the text enclosed between
**Documentation** tags has to be alligned at column 0, (space is
significant in RST documents) and that we do not accept empty lines
between items in an unordered list. Formatted output will be displayed
in ParaView online help, ParaView Python documentation, and tooltips
displayed in ParaView client. See the **Calculator** and **Glyph**
filters for examples on how to format other filters. Next we show the
calculator filter proxy documentation which includes formatting
options for bold, paragraphs and an unordered list.
<Documentation>
The Calculator filter computes a new data array or new point
coordinates as a function of existing scalar or vector arrays. If
point-centered arrays are used in the computation of a new data array,
the resulting array will also be point-centered. Similarly,
computations using cell-centered arrays will produce a new
cell-centered array. If the function is computing point coordinates,
the result of the function must be a three-component vector.
The Calculator interface operates similarly to a scientific
calculator. In creating the function to evaluate, the standard order
of operations applies. Each of the calculator functions is described
below. Unless otherwise noted, enclose the operand in parentheses
using the ( and ) buttons.
- Clear: Erase the current function (displayed in the read-only text
box above the calculator buttons).
- /: Divide one scalar by another. The operands for this function are
not required to be enclosed in parentheses.
- *: Multiply two scalars, or multiply a vector by a scalar (scalar multiple).
The operands for this function are not required to be enclosed in parentheses.
- -: Negate a scalar or vector (unary minus), or subtract one scalar or vector
from another. The operands for this function are not required to be enclosed
in parentheses.
- +: Add two scalars or two vectors. The operands for this function are not
required to be enclosed in parentheses.
- sin: Compute the sine of a scalar. cos: Compute the cosine of a scalar.
- tan: Compute the tangent of a scalar.
- asin: Compute the arcsine of a scalar.
- acos: Compute the arccosine of a scalar.
- atan: Compute the arctangent of a scalar.
- sinh: Compute the hyperbolic sine of a scalar.
- cosh: Compute the hyperbolic cosine of a scalar.
- tanh: Compute the hyperbolic tangent of a scalar.
- min: Compute minimum of two scalars.
- max: Compute maximum of two scalars.
- x^y: Raise one scalar to the power of another scalar. The operands for
this function are not required to be enclosed in parentheses.
- sqrt: Compute the square root of a scalar.
- e^x: Raise e to the power of a scalar.
- log: Compute the logarithm of a scalar (deprecated. same as log10).
- log10: Compute the logarithm of a scalar to the base 10.
- ln: Compute the logarithm of a scalar to the base 'e'.
- ceil: Compute the ceiling of a scalar. floor: Compute the floor of a scalar.
- abs: Compute the absolute value of a scalar.
- v1.v2: Compute the dot product of two vectors. The operands for this
function are not required to be enclosed in parentheses.
- cross: Compute cross product of two vectors.
- mag: Compute the magnitude of a vector.
- norm: Normalize a vector.
The operands are described below. The digits 0 - 9 and the decimal
point are used to enter constant scalar values. **iHat**, **jHat**,
and **kHat** are vector constants representing unit vectors in the X,
Y, and Z directions, respectively. The scalars menu lists the names of
the scalar arrays and the components of the vector arrays of either
the point-centered or cell-centered data. The vectors menu lists the
names of the point-centered or cell-centered vector arrays. The
function will be computed for each point (or cell) using the scalar or
vector value of the array at that point (or cell). The filter operates
on any type of data set, but the input data set must have at least one
scalar or vector array. The arrays can be either point-centered or
cell-centered. The Calculator filter's output is of the same data set
type as the input.
</Documentation>
......@@ -14,6 +14,7 @@ Page | Description
-----|----------------------------------------
[Major API Changes](@ref MajorAPIChanges) | Descriptions for major API changes.
[Property Hints](@ref PropertyHints) | ServerManager XML hints for Properties.
[Proxy Documentation Formatting](@ref ProxyDocumentationFormatting) | Formatting options for proxy documentation.
Design/Implementation Details
-----------------------------
......
......@@ -1509,14 +1509,13 @@ def _create_func(key, module):
def _create_doc(new, old):
"Internal function."
import string
res = ""
for doc in (new, old):
ts = []
strpd = doc.split('\n')
for s in strpd:
ts.append(s.lstrip())
res += string.join(ts)
res += '\n'
res = new + '\n'
ts = []
strpd = old.split('\n')
for s in strpd:
ts.append(s.lstrip())
res += string.join(ts)
res += '\n'
return res
# -----------------------------------------------------------------------------
......
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