|
|
4c79b5 |
|
|
|
4c79b5 |
<html>
|
|
|
6414c4 |
|
|
|
09d4f2 |
|
|
|
6414c4 |
Copyright C 2009, 2010, 2011 Alain Reguera Delgado
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Permission is granted to copy, distribute and/or modify this document
|
|
|
4c79b5 |
under the terms of the GNU Free Documentation License, Version 1.2 or
|
|
|
4c79b5 |
any later version published by the Free Software Foundation; with no
|
|
|
4c79b5 |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
|
|
4c79b5 |
copy of the license is included in the section entitled GNU Free
|
|
|
4c79b5 |
Documentation License.
|
|
|
4c79b5 |
-->
|
|
|
6414c4 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
|
4c79b5 |
Karl Berry <karl@freefriends.org>
|
|
|
4c79b5 |
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
|
4c79b5 |
and many others.
|
|
|
4c79b5 |
Maintained by: Many creative people <dev@texi2html.cvshome.org>
|
|
|
4c79b5 |
Send bugs and suggestions to <users@texi2html.cvshome.org>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
-->
|
|
|
4c79b5 |
<head>
|
|
|
280c77 |
<title>The CentOS Artwork Repository: 3.44 trunk/Scripts/Bash/Functions/Render/Config</title>
|
|
|
4c79b5 |
|
|
|
280c77 |
<meta name="description" content="The CentOS Artwork Repository: 3.44 trunk/Scripts/Bash/Functions/Render/Config">
|
|
|
280c77 |
<meta name="keywords" content="The CentOS Artwork Repository: 3.44 trunk/Scripts/Bash/Functions/Render/Config">
|
|
|
4c79b5 |
<meta name="resource-type" content="document">
|
|
|
4c79b5 |
<meta name="distribution" content="global">
|
|
|
4c79b5 |
<meta name="Generator" content="texi2html 1.76">
|
|
|
4c79b5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
4c79b5 |
<style type="text/css">
|
|
|
4c79b5 |
|
|
|
1e9202 |
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
|
|
|
4c79b5 |
|
|
|
4c79b5 |
a.summary-letter {text-decoration: none}
|
|
|
4c79b5 |
pre.display {font-family: serif}
|
|
|
4c79b5 |
pre.format {font-family: serif}
|
|
|
4c79b5 |
pre.menu-comment {font-family: serif}
|
|
|
4c79b5 |
pre.menu-preformatted {font-family: serif}
|
|
|
4c79b5 |
pre.smalldisplay {font-family: serif; font-size: smaller}
|
|
|
4c79b5 |
pre.smallexample {font-size: smaller}
|
|
|
4c79b5 |
pre.smallformat {font-family: serif; font-size: smaller}
|
|
|
4c79b5 |
pre.smalllisp {font-size: smaller}
|
|
|
4c79b5 |
span.sansserif {font-family:sans-serif; font-weight:normal;}
|
|
|
4c79b5 |
ul.toc {list-style: none}
|
|
|
4c79b5 |
-->
|
|
|
4c79b5 |
</style>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</head>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
280c77 |
[ < ]
|
|
|
280c77 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
4c79b5 |
[ Up ]
|
|
|
280c77 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[Top]
|
|
|
4c79b5 |
[Contents]
|
|
|
280c77 |
[Index]
|
|
|
4c79b5 |
[ ? ]
|
|
|
4c79b5 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
3.44 trunk/Scripts/Bash/Functions/Render/Config
|
|
|
008ee0 |
|
|
|
ef356a |
|
|
|
280c77 |
|
|
|
54b5a5 |
3.44.1 Goals
|
|
|
54b5a5 |
|
|
|
280c77 |
The <tt>`trunk/Scripts/Bash/Config'</tt> directory exists to oraganize
|
|
|
280c77 |
pre-rendering configuration scripts.
|
|
|
63f275 |
|
|
|
008ee0 |
|
|
|
280c77 |
|
|
|
54b5a5 |
3.44.2 Description
|
|
|
54b5a5 |
|
|
|
280c77 |
Pre-rendering configuration scripts let you customize the way
|
|
|
280c77 |
centos-art.sh script renders identity and translation
|
|
|
280c77 |
repository entries. Pre-rendering configuration scripts are
|
|
|
280c77 |
<tt>`render.conf.sh'</tt> files with render_loadConfig function
|
|
|
280c77 |
definition inside.
|
|
|
280c77 |
|
|
|
280c77 |
There is one <tt>`render.conf.sh'</tt> file for each pre-rendering
|
|
|
280c77 |
configuration entry. Pre-rendering configuration entries can be based
|
|
|
280c77 |
both on identity and translation repository entires. Pre-rendering
|
|
|
280c77 |
configuration entries are required for each identity entry, but not
|
|
|
280c77 |
for translation entries.
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
3.44.2.1 The <tt>`render.conf.sh'</tt> identity model
|
|
|
280c77 |
|
|
|
280c77 |
Inside CentOS Artwork Repository, we consider identity entries to all
|
|
|
280c77 |
directories under <tt>`trunk/Identity'</tt> directory. Identity entries can be
|
|
|
280c77 |
image-based or text-based. When you render image-based identity
|
|
|
280c77 |
entries you need to use image-based pre-rendering configuration
|
|
|
280c77 |
scripts. Likewise, when you render text-based identity entries you
|
|
|
280c77 |
need to use text-based pre-rendering configuration scripts.
|
|
|
60c152 |
|
|
|
280c77 |
Inside identity pre-rendering configuration scripts, image-based
|
|
|
280c77 |
pre-rendering configuration scripts look like the following:
|
|
|
63f275 |
|
|
|
280c77 |
#!/bin/bash
|
|
|
280c77 |
|
|
|
280c77 |
function render_loadConfig {
|
|
|
280c77 |
|
|
|
280c77 |
# Define rendering actions.
|
|
|
280c77 |
ACTIONS[0]='BASE:renderImage'
|
|
|
280c77 |
ACTIONS[1]='POST:renderFormats: tif xpm pdf ppm'
|
|
|
280c77 |
|
|
|
280c77 |
}
|
|
|
035049 |
|
|
|
280c77 |
Inside identity pre-rendering configuration scripts, text-based
|
|
|
280c77 |
pre-rendering configuration scripts look like the following:
|
|
|
0151ba |
|
|
|
280c77 |
#!/bin/bash
|
|
|
280c77 |
|
|
|
280c77 |
function render_loadConfig {
|
|
|
280c77 |
|
|
|
280c77 |
# Define rendering actions.
|
|
|
280c77 |
ACTIONS[0]='BASE:renderText'
|
|
|
280c77 |
ACTIONS[1]='POST:formatText: --width=70 --uniform-spacing'
|
|
|
280c77 |
|
|
|
280c77 |
}
|
|
|
280c77 |
|
|
|
280c77 |
When using identity pre-rendering configuration scripts, you can
|
|
|
280c77 |
extend both image-based and text-based pre-rendering configuration
|
|
|
280c77 |
scripts using image-based and text-based post-rendering actions,
|
|
|
280c77 |
respectively.
|
|
|
3d6160 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
3.44.2.2 The <tt>`render.conf.sh'</tt> translation model
|
|
|
280c77 |
|
|
|
280c77 |
Translation pre-rendering configuration scripts take precedence before
|
|
|
280c77 |
default translation rendering action. Translation pre-rendering
|
|
|
280c77 |
actions are useful when default translation rendering action do not
|
|
|
280c77 |
fit itself to translation entry rendering requirements.
|
|
|
49b888 |
|
|
|
0d952c |
|
|
|
280c77 |
|
|
|
280c77 |
3.44.2.3 The <tt>`render.conf.sh'</tt> rendering actions
|
|
|
280c77 |
|
|
|
280c77 |
Inside both image-based and text-based identity pre-rendering
|
|
|
280c77 |
configuration scripts, we use the <samp>`ACTIONS'</samp> array variable to
|
|
|
280c77 |
define the way centos-art.sh script performs identity
|
|
|
280c77 |
rendering. Identity rendering is organized by one <samp>`BASE'</samp> action,
|
|
|
280c77 |
and optional <samp>`POST'</samp> and <samp>`LAST'</samp> rendering actions.
|
|
|
0d952c |
|
|
|
280c77 |
The <samp>`BASE'</samp> action specifies what kind of rendering does the
|
|
|
280c77 |
centos-art.sh script will perform with the files related to
|
|
|
280c77 |
the pre-rendering configuration script. The <samp>`BASE'</samp> action is
|
|
|
280c77 |
required. Possible values to <samp>`BASE'</samp> action are either
|
|
|
280c77 |
<samp>`renderImage'</samp> or <samp>`renderText'</samp> only.
|
|
|
e68a7a |
|
|
|
280c77 |
To specify the <samp>`BASE'</samp> action you need to set the <samp>`BASE:'</samp>
|
|
|
280c77 |
string followed by one of the possible values. For example, if you
|
|
|
280c77 |
want to render images, consider the following definition of
|
|
|
280c77 |
<samp>`BASE'</samp> action:
|
|
|
60c152 |
|
|
|
280c77 |
ACTIONS[0]='BASE:renderImage'
|
|
|
035049 |
|
|
|
280c77 |
Only one <samp>`BASE'</samp> action must be specified. If more than one
|
|
|
280c77 |
<samp>`BASE'</samp> action is specified, the last one is used. If no
|
|
|
280c77 |
<samp>`BASE'</samp> action is specified at all, an error is triggered and the
|
|
|
280c77 |
centos-art.sh script ends its execution.
|
|
|
60c152 |
|
|
|
280c77 |
The <samp>`POST'</samp> action specifies which action to apply for
|
|
|
280c77 |
each file rendered (at the rendering time). This action is optional.
|
|
|
280c77 |
You can set many different <samp>`POST'</samp> actions to apply many different
|
|
|
280c77 |
actions over the same already rendered file. Possible values to
|
|
|
280c77 |
<samp>`POST'</samp> action are <samp>`renderFormats'</samp>, <samp>`renderSyslinux'</samp>,
|
|
|
280c77 |
<samp>`renderGrub'</samp>, etc.
|
|
|
3d6160 |
|
|
|
280c77 |
To specify the <samp>`POST'</samp> action, you need to use set the
|
|
|
280c77 |
<samp>`POST:'</samp> followed by the function name of the action you want to
|
|
|
280c77 |
perform. The exact form depends on your needs. For example, consider
|
|
|
280c77 |
the following example to produce <samp>`xpm'</samp>, <samp>`jpg'</samp>, and
|
|
|
280c77 |
<samp>`tif'</samp> images, based on already rendered <samp>`png'</samp> image, and
|
|
|
280c77 |
also organize the produced files in directories named as their own
|
|
|
280c77 |
extensions:
|
|
|
e37211 |
|
|
|
280c77 |
ACTIONS[0]='BASE:renderImage'
|
|
|
280c77 |
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
|
|
|
280c77 |
ACTIONS[2]='POST:groupByFormat: png xpm jpg tif'
|
|
|
280c77 |
|
|
|
280c77 |
In the previous example, file organization takes place at the moment
|
|
|
280c77 |
of rendering, just after producing the <samp>`png'</samp> base file and before
|
|
|
280c77 |
going to the next file in the list of files to render. If you don't
|
|
|
280c77 |
want to organized the produced files in directories named as their own
|
|
|
280c77 |
extensions, just remove the <samp>`POST:groupByFormat'</samp> action line:
|
|
|
6414c4 |
|
|
|
280c77 |
ACTIONS[0]='BASE:renderImage'
|
|
|
280c77 |
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
|
|
|
6414c4 |
|
|
|
280c77 |
The <samp>`LAST'</samp> action specifies which actions to apply once the last
|
|
|
280c77 |
file in the list of files to process has been rendered. The
|
|
|
280c77 |
<samp>`LAST'</samp> action is optional. Possible values for <samp>`LAST'</samp>
|
|
|
280c77 |
actions may be <samp>`groupByFormat'</samp>, <samp>`renderGdmTgz'</samp>, etc.
|
|
|
280c77 |
|
|
|
280c77 |
Note See section trunk/Scripts/Bash/Functions/Render, to know more
|
|
|
280c77 |
about possible values for <samp>`BASE'</samp>, <samp>`POST'</samp> and <samp>`LAST'</samp>
|
|
|
280c77 |
action definitions.
|
|
|
3207df |
|
|
|
3207df |
|
|
|
280c77 |
To specify the <samp>`LAST'</samp> action, you need to set the <samp>`LAST:'</samp>
|
|
|
280c77 |
string followed by the function name of the action you want to
|
|
|
280c77 |
perform. For example, consider the following example if you want to
|
|
|
280c77 |
render all files first and organize them later:
|
|
|
280c77 |
|
|
|
280c77 |
ACTIONS[0]='BASE:renderImage'
|
|
|
280c77 |
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
|
|
|
280c77 |
ACTIONS[2]='LAST:groupByformat: png xpm jpg tif'
|
|
|
280c77 |
|
|
|
e37211 |
|
|
|
01b527 |
|
|
|
008ee0 |
3.44.3 Usage
|
|
|
008ee0 |
|
|
|
280c77 |
Use the following commands to administer both identity and translation
|
|
|
280c77 |
pre-rendering configuration scripts:
|
|
|
280c77 |
|
|
|
63f275 |
|
|
|
280c77 |
<samp>`centos-art config --create='path/to/dir/''</samp>
|
|
|
280c77 |
|
|
|
280c77 |
Use this command to create <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
280c77 |
configuration script.
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`centos-art config --edit='path/to/dir/''</samp>
|
|
|
280c77 |
|
|
|
280c77 |
Use this command to edit <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
280c77 |
configuration script.
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`centos-art config --read='path/to/dir/''</samp>
|
|
|
280c77 |
|
|
|
280c77 |
Use this command to read <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
280c77 |
configuration script.
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`centos-art config --remove='path/to/dir/''</samp>
|
|
|
280c77 |
|
|
|
280c77 |
Use this command to remove <samp>`path/to/dir'</samp> related pre-rendering
|
|
|
280c77 |
configuration script.
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
In the commands above, <samp>`path/to/dir'</samp> refers to one renderable
|
|
|
280c77 |
directory path under <tt>`trunk/Identity'</tt> or
|
|
|
280c77 |
<tt>`trunk/Translations'</tt> structures only.
|
|
|
63f275 |
|
|
|
63f275 |
|
|
|
01b527 |
|
|
|
4c79b5 |
3.44.4 See also
|
|
|
4c79b5 |
|
|
|
2c8180 |
|
|
|
280c77 |
3.37 trunk/Scripts/Bash
|
|
|
280c77 |
|
|
|
280c77 |
3.38 trunk/Scripts/Bash/Functions
|
|
|
63f275 |
|
|
|
280c77 |
3.43 trunk/Scripts/Bash/Functions/Render
|
|
|
2c8180 |
|
|
|
2c8180 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
01b527 |
[ < ]
|
|
|
01b527 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
280c77 |
[ Up ]
|
|
|
280c77 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<font size="-1">
|
|
|
6414c4 |
This document was generated on January, 3 2011 using texi2html 1.76.
|
|
|
4c79b5 |
</font>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</body>
|
|
|
4c79b5 |
</html>
|