Updating readme and adding sample replacements.config file.
This commit is contained in:
parent
af8c7f8726
commit
23914aa37d
@ -16,6 +16,15 @@ http://wiki.openstack.org/Documentation/HowTo#Tools_Overview
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
clouddocs-maven-plugin 1.5.0 (August 14, 2012)
|
||||
============================================================
|
||||
- Support build-time search and replace via a configuration file. To
|
||||
use add a parameter like the following to your pom.xml:
|
||||
<replacementsFile>replacements.config</replacementsFile>
|
||||
Where replacements.config is a file in the same directory as your
|
||||
pom.xml. See the example replacements.config file for documentation
|
||||
on how to use it.
|
||||
|
||||
clouddocs-maven-plugin 1.4.0 (August 13, 2012)
|
||||
============================================================
|
||||
- Chinese fonts now supported in pdf output.
|
||||
|
75
replacements.config
Normal file
75
replacements.config
Normal file
@ -0,0 +1,75 @@
|
||||
#
|
||||
# Sample replacements file for Rackspace clouddocs maven plugin
|
||||
#
|
||||
# ********************** POM CONFIGURATION ***********************
|
||||
# There are two ways to refer this file in your project.
|
||||
# IMPLICIT: Just place this file next to your project's (e.g., /compute-api/) pom.xml and name it 'replacements.config'
|
||||
# EXPLICIT: Add the following configuration parameter in your pom
|
||||
# <replacementsFile>myreplacements.config</replacementsFile>
|
||||
# Next to other configurations like
|
||||
# <canonicalUrlBase>http://docs.openstack.org/api/openstack-compute/2/contentSALMANTEST/</canonicalUrlBase>
|
||||
# <profileSecurity>reviewer</profileSecurity>
|
||||
# or any other configuration you have defined for your generate-pdf, generate-webhelp goals.
|
||||
#
|
||||
#
|
||||
# ********************** USAGE AND SYNTAX **********************
|
||||
# Simple case: GLOBAL SEARCH AND REPLACE
|
||||
# For global search and replace simply give the search and replace tokens in the following format:
|
||||
# oldValue1->newValue1
|
||||
# oldValue2->newValue2
|
||||
# By default all oldValues are considered to be regular expressions unless they are given as a quoted string. e.g.
|
||||
# "oldValue4"->newValue4
|
||||
# This is helpful in cases where you want oldValue to be considered as a literal string and not a regular expression.
|
||||
# So,
|
||||
# Regular expression: old([Vv])alue4->newValue4 ----- will replace all instances of oldvalue4 and oldValue4 with newValue4.
|
||||
# Literal String: "old([Vv])alue4"->newValueLiteral4 ----- will only replace instances of old([Vv])alue4 with newValueLiteral4
|
||||
#
|
||||
# The other case: TARGETED/RESTRICTED SEARCH AND REPLACE
|
||||
# This tool allows you to target/restrict the search and replace feature to only
|
||||
# specific elements of the input XML document using XPath expressions.
|
||||
# To specify an XPath, start your line with a hardcoded identifier XPATH= and then give the XPath like:
|
||||
# XPATH=<XPath Expression>
|
||||
# More specifically:
|
||||
# XPATH=//*:title/text() ----- Will only replace text value for title element.
|
||||
# XPATH=//*:titleabbrev/text() ----- restricted titleabbrev text in this case.
|
||||
# XPATH=//text() ----- same as global search and replace. Considers all text nodes for the search and replace functionality.
|
||||
#
|
||||
# An important point to remember here is that once you give an XPATH all oldValue->newValue pairs given below it would be grouped under that XPath.
|
||||
# Search/Replace terms grouped under an XPath expression will only take effect on
|
||||
# text of elements/nodes that are returned by matching their parent XPath expression
|
||||
# e.g.,
|
||||
# -----
|
||||
# XPATH=//*:titleabbrev/text() |
|
||||
# Developer->Dev | is the first group
|
||||
# API->Application Programming Interface |
|
||||
# -----
|
||||
# -----
|
||||
# XPATH=//*:para/text() |
|
||||
# OpenStack->RackSpace | Will be considered as a second group
|
||||
# servers.api.openstack.org->servers.api.rackspace.come |
|
||||
# -----
|
||||
#
|
||||
# To write a comment. Start the line with a hash/pound (#) sign.
|
||||
#
|
||||
|
||||
# first group of search & replace terms
|
||||
# XPATH=//*:titleabbrev/text()
|
||||
Dev->Dvlpr
|
||||
|
||||
# second group
|
||||
XPATH=//*:para/text()
|
||||
color-coded->COLOR-CODED
|
||||
mimetype->MIMETYPE
|
||||
|
||||
# another group
|
||||
XPATH=//*:title/text()
|
||||
OpenStack -> Rackspace
|
||||
|
||||
# last group. XPath is same as global search and replace.
|
||||
XPATH=//text()
|
||||
#Open([Ss])tack->Rack$1pace
|
||||
OpenStack->Rackspace
|
||||
OPENSTACK->RACKSPACE
|
||||
servers.api.openstack.org -> rackspace.api.com
|
||||
api.servers.openstack.org -> rackspace.api.com
|
||||
docs.openstack.org -> rackspace.documents.com
|
Loading…
x
Reference in New Issue
Block a user