|
|
c8f7b7 |
|
|
|
728c6d |
|
|
|
728c6d |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
728c6d |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
728c6d |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
|
728c6d |
<head>
|
|
|
632e8b |
|
|
|
a6f1b3 |
<title>CentOS Artwork Repository: 2.71 The trunk/Scripts/Functions/Render/Config Directory</title>
|
|
|
c8f7b7 |
|
|
|
c8f7b7 |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
|
a6f1b3 |
<meta name="description" content="CentOS Artwork Repository: 2.71 The trunk/Scripts/Functions/Render/Config Directory" />
|
|
|
a6f1b3 |
<meta name="keywords" content="CentOS Artwork Repository: 2.71 The trunk/Scripts/Functions/Render/Config Directory" />
|
|
|
728c6d |
<meta name="resource-type" content="document" />
|
|
|
728c6d |
<meta name="distribution" content="global" />
|
|
|
728c6d |
<meta name="generator" content="texi2html 1.76" />
|
|
|
728c6d |
<meta name="copyright" content="2009-2011 Alain Reguera Delgado" />
|
|
|
632e8b |
|
|
|
c8f7b7 |
<link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection" />
|
|
|
632e8b |
|
|
|
728c6d |
</head>
|
|
|
632e8b |
|
|
|
728c6d |
<body>
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
c8f7b7 |
|
|
|
a6f1b3 |
|
|
|
632e8b |
|
|
|
c8f7b7 |
[ < ]
|
|
|
ed9de5 |
[ > ]
|
|
|
632e8b |
|
|
|
c8f7b7 |
[ << ]
|
|
|
c8f7b7 |
[ Up ]
|
|
|
a6f1b3 |
[ >> ]
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
c8f7b7 |
[Top]
|
|
|
c8f7b7 |
[Contents]
|
|
|
a6f1b3 |
[Index]
|
|
|
c8f7b7 |
[ ? ]
|
|
|
632e8b |
|
|
|
a6f1b3 |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
2.71 The <tt>`trunk/Scripts/Functions/Render/Config'</tt> Directory
|
|
|
ed9de5 |
|
|
|
728c6d |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
2.71.1 Goals
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
The <tt>`trunk/Scripts/Bash/Config'</tt> directory exists to oraganize
|
|
|
a6f1b3 |
pre-rendering configuration scripts.
|
|
|
ed9de5 |
|
|
|
728c6d |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
2.71.2 Description
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
Pre-rendering configuration scripts let you customize the way
|
|
|
a6f1b3 |
centos-art.sh script renders identity and translation
|
|
|
a6f1b3 |
repository entries. Pre-rendering configuration scripts are
|
|
|
a6f1b3 |
<tt>`render.conf.sh'</tt> files with render_loadConfig function
|
|
|
a6f1b3 |
definition inside.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
There is one <tt>`render.conf.sh'</tt> file for each pre-rendering
|
|
|
a6f1b3 |
configuration entry. Pre-rendering configuration entries can be based
|
|
|
a6f1b3 |
both on identity and translation repository entires. Pre-rendering
|
|
|
a6f1b3 |
configuration entries are required for each identity entry, but not
|
|
|
a6f1b3 |
for translation entries.
|
|
|
ed9de5 |
|
|
|
728c6d |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
2.71.2.1 The <tt>`render.conf.sh'</tt> identity model
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
Inside CentOS Artwork Repository, we consider identity entries to all
|
|
|
a6f1b3 |
directories under <tt>`trunk/Identity'</tt> directory. Identity entries can be
|
|
|
a6f1b3 |
image-based or text-based. When you render image-based identity
|
|
|
a6f1b3 |
entries you need to use image-based pre-rendering configuration
|
|
|
a6f1b3 |
scripts. Likewise, when you render text-based identity entries you
|
|
|
a6f1b3 |
need to use text-based pre-rendering configuration scripts.
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
Inside identity pre-rendering configuration scripts, image-based
|
|
|
a6f1b3 |
pre-rendering configuration scripts look like the following:
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
#!/bin/bash
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
function render_loadConfig {
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
# Define rendering actions.
|
|
|
a6f1b3 |
ACTIONS[0]='BASE:renderImage'
|
|
|
a6f1b3 |
ACTIONS[1]='POST:renderFormats: tif xpm pdf ppm'
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
}
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Inside identity pre-rendering configuration scripts, text-based
|
|
|
a6f1b3 |
pre-rendering configuration scripts look like the following:
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
#!/bin/bash
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
function render_loadConfig {
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
# Define rendering actions.
|
|
|
a6f1b3 |
ACTIONS[0]='BASE:renderText'
|
|
|
a6f1b3 |
ACTIONS[1]='POST:formatText: --width=70 --uniform-spacing'
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
}
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
When using identity pre-rendering configuration scripts, you can
|
|
|
a6f1b3 |
extend both image-based and text-based pre-rendering configuration
|
|
|
a6f1b3 |
scripts using image-based and text-based post-rendering actions,
|
|
|
a6f1b3 |
respectively.
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
2.71.2.2 The <tt>`render.conf.sh'</tt> translation model
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Translation pre-rendering configuration scripts take precedence before
|
|
|
a6f1b3 |
default translation rendering action. Translation pre-rendering
|
|
|
a6f1b3 |
actions are useful when default translation rendering action do not
|
|
|
a6f1b3 |
fit itself to translation entry rendering requirements.
|
|
|
06d106 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
2.71.2.3 The <tt>`render.conf.sh'</tt> rendering actions
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Inside both image-based and text-based identity pre-rendering
|
|
|
a6f1b3 |
configuration scripts, we use the <samp>`ACTIONS'</samp> array variable to
|
|
|
a6f1b3 |
define the way centos-art.sh script performs identity
|
|
|
a6f1b3 |
rendering. Identity rendering is organized by one <samp>`BASE'</samp> action,
|
|
|
a6f1b3 |
and optional <samp>`POST'</samp> and <samp>`LAST'</samp> rendering actions.
|
|
|
06d106 |
|
|
|
a6f1b3 |
The <samp>`BASE'</samp> action specifies what kind of rendering does the
|
|
|
a6f1b3 |
centos-art.sh script will perform with the files related to
|
|
|
a6f1b3 |
the pre-rendering configuration script. The <samp>`BASE'</samp> action is
|
|
|
a6f1b3 |
required. Possible values to <samp>`BASE'</samp> action are either
|
|
|
a6f1b3 |
<samp>`renderImage'</samp> or <samp>`renderText'</samp> only.
|
|
|
06d106 |
|
|
|
a6f1b3 |
To specify the <samp>`BASE'</samp> action you need to set the <samp>`BASE:'</samp>
|
|
|
a6f1b3 |
string followed by one of the possible values. For example, if you
|
|
|
a6f1b3 |
want to render images, consider the following definition of
|
|
|
a6f1b3 |
<samp>`BASE'</samp> action:
|
|
|
06d106 |
|
|
|
a6f1b3 |
ACTIONS[0]='BASE:renderImage'
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Only one <samp>`BASE'</samp> action must be specified. If more than one
|
|
|
a6f1b3 |
<samp>`BASE'</samp> action is specified, the last one is used. If no
|
|
|
a6f1b3 |
<samp>`BASE'</samp> action is specified at all, an error is triggered and the
|
|
|
a6f1b3 |
centos-art.sh script ends its execution.
|
|
|
06d106 |
|
|
|
a6f1b3 |
The <samp>`POST'</samp> action specifies which action to apply for
|
|
|
a6f1b3 |
each file rendered (at the rendering time). This action is optional.
|
|
|
a6f1b3 |
You can set many different <samp>`POST'</samp> actions to apply many different
|
|
|
a6f1b3 |
actions over the same already rendered file. Possible values to
|
|
|
a6f1b3 |
<samp>`POST'</samp> action are <samp>`renderFormats'</samp>, <samp>`renderSyslinux'</samp>,
|
|
|
a6f1b3 |
<samp>`renderGrub'</samp>, etc.
|
|
|
52772c |
|
|
|
a6f1b3 |
To specify the <samp>`POST'</samp> action, you need to use set the
|
|
|
a6f1b3 |
<samp>`POST:'</samp> followed by the function name of the action you want to
|
|
|
a6f1b3 |
perform. The exact form depends on your needs. For example, consider
|
|
|
a6f1b3 |
the following example to produce <samp>`xpm'</samp>, <samp>`jpg'</samp>, and
|
|
|
a6f1b3 |
<samp>`tif'</samp> images, based on already rendered <samp>`png'</samp> image, and
|
|
|
a6f1b3 |
also organize the produced files in directories named as their own
|
|
|
a6f1b3 |
extensions:
|
|
|
52772c |
|
|
|
a6f1b3 |
ACTIONS[0]='BASE:renderImage'
|
|
|
a6f1b3 |
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
|
|
|
a6f1b3 |
ACTIONS[2]='POST:groupByFormat: png xpm jpg tif'
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
In the previous example, file organization takes place at the moment
|
|
|
a6f1b3 |
of rendering, just after producing the <samp>`png'</samp> base file and before
|
|
|
a6f1b3 |
going to the next file in the list of files to render. If you don't
|
|
|
a6f1b3 |
want to organized the produced files in directories named as their own
|
|
|
a6f1b3 |
extensions, just remove the <samp>`POST:groupByFormat'</samp> action line:
|
|
|
06d106 |
|
|
|
a6f1b3 |
ACTIONS[0]='BASE:renderImage'
|
|
|
a6f1b3 |
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
The <samp>`LAST'</samp> action specifies which actions to apply once the last
|
|
|
a6f1b3 |
file in the list of files to process has been rendered. The
|
|
|
a6f1b3 |
<samp>`LAST'</samp> action is optional. Possible values for <samp>`LAST'</samp>
|
|
|
a6f1b3 |
actions may be <samp>`groupByFormat'</samp>, <samp>`renderGdmTgz'</samp>, etc.
|
|
|
52772c |
|
|
|
a6f1b3 |
Note -- Removed(xref:trunk Scripts Bash Functions Render) --, to know more
|
|
|
a6f1b3 |
about possible values for <samp>`BASE'</samp>, <samp>`POST'</samp> and <samp>`LAST'</samp>
|
|
|
a6f1b3 |
action definitions.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
To specify the <samp>`LAST'</samp> action, you need to set the <samp>`LAST:'</samp>
|
|
|
a6f1b3 |
string followed by the function name of the action you want to
|
|
|
a6f1b3 |
perform. For example, consider the following example if you want to
|
|
|
a6f1b3 |
render all files first and organize them later:
|
|
|
52772c |
|
|
|
a6f1b3 |
ACTIONS[0]='BASE:renderImage'
|
|
|
a6f1b3 |
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
|
|
|
a6f1b3 |
ACTIONS[2]='LAST:groupByformat: png xpm jpg tif'
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
2.71.3 Usage
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Use the following commands to administer both identity and translation
|
|
|
a6f1b3 |
pre-rendering configuration scripts:
|
|
|
52772c |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
<samp>`centos-art config --create='path/to/dir/''</samp>
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Use this command to create <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
a6f1b3 |
configuration script.
|
|
|
52772c |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
<samp>`centos-art config --edit='path/to/dir/''</samp>
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Use this command to edit <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
a6f1b3 |
configuration script.
|
|
|
52772c |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
<samp>`centos-art config --read='path/to/dir/''</samp>
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Use this command to read <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
a6f1b3 |
configuration script.
|
|
|
52772c |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
<samp>`centos-art config --remove='path/to/dir/''</samp>
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
Use this command to remove <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
a6f1b3 |
configuration script.
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
|
|
|
a6f1b3 |
In the commands above, <samp>`path/to/dir'</samp> refers to one renderable
|
|
|
a6f1b3 |
directory path under <tt>`trunk/Identity'</tt> or
|
|
|
a6f1b3 |
<tt>`trunk/Translations'</tt> structures only.
|
|
|
52772c |
|
|
|
728c6d |
|
|
|
a6f1b3 |
|
|
|
ed9de5 |
2.71.4 See also
|
|
|
9bfd15 |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
2.62 The <tt>`trunk/Scripts'</tt> Directory
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
a6f1b3 |
[ < ]
|
|
|
a6f1b3 |
[ > ]
|
|
|
632e8b |
|
|
|
c8f7b7 |
[ << ]
|
|
|
ed9de5 |
[ Up ]
|
|
|
a6f1b3 |
[ >> ]
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
632e8b |
</body>
|
|
|
728c6d |
|
|
|
632e8b |
</html>
|