Blame Manuals/Repository/repository-html/repository_59.html

4c79b5
4c79b5
<html>
ccb7a3
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
-->
acd47b
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>
fa7cae
<title>CentOS Artwork Repository: 3.56 trunk/Scripts/Bash/Functions/Render/Config</title>
4c79b5
fa7cae
<meta name="description" content="CentOS Artwork Repository: 3.56 trunk/Scripts/Bash/Functions/Render/Config">
fa7cae
<meta name="keywords" content="CentOS Artwork Repository: 3.56 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
300762
fa7cae
[ < ]
fa7cae
[ > ]
4c79b5
   
4c79b5
[ << ]
300762
[ Up ]
fa7cae
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
fa7cae
[Index]
4c79b5
[ ? ]
4c79b5
fa7cae
fa7cae
fa7cae

3.56 trunk/Scripts/Bash/Functions/Render/Config

38bcd9
c9b54d
fa7cae
63f275

3.56.1 Goals

54b5a5
fa7cae

The <tt>`trunk/Scripts/Bash/Config'</tt> directory exists to oraganize

fa7cae
pre-rendering configuration scripts.
4a9d2a

4c79b5
fa7cae
63f275

3.56.2 Description

5fb024
fa7cae

Pre-rendering configuration scripts let you customize the way

fa7cae
centos-art.sh script renders identity and translation
fa7cae
repository entries.  Pre-rendering configuration scripts are
fa7cae
<tt>`render.conf.sh'</tt> files with render_loadConfig function
fa7cae
definition inside. 
fa7cae

fa7cae

There is one <tt>`render.conf.sh'</tt> file for each pre-rendering

fa7cae
configuration entry. Pre-rendering configuration entries can be based
fa7cae
both on identity and translation repository entires.  Pre-rendering
fa7cae
configuration entries are required for each identity entry, but not
fa7cae
for translation entries. 
fa7cae

fa7cae
fa7cae
fa7cae

3.56.2.1 The <tt>`render.conf.sh'</tt> identity model

fa7cae
fa7cae

Inside CentOS Artwork Repository, we consider identity entries to all

fa7cae
directories under <tt>`trunk/Identity'</tt> directory. Identity entries can be
fa7cae
image-based or text-based. When you render image-based identity
fa7cae
entries you need to use image-based pre-rendering configuration
fa7cae
scripts. Likewise, when you render text-based identity entries you
fa7cae
need to use text-based pre-rendering configuration scripts.
4a9d2a

fa7cae

Inside identity pre-rendering configuration scripts, image-based

fa7cae
pre-rendering configuration scripts look like the following:
4a9d2a

fa7cae
#!/bin/bash
fa7cae
fa7cae
function render_loadConfig {
fa7cae
fa7cae
    # Define rendering actions.
fa7cae
    ACTIONS[0]='BASE:renderImage'
fa7cae
    ACTIONS[1]='POST:renderFormats: tif xpm pdf ppm'
fa7cae
fa7cae
}
2dc146
fa7cae

Inside identity pre-rendering configuration scripts, text-based

fa7cae
pre-rendering configuration scripts look like the following:
4a9d2a

fa7cae
#!/bin/bash
fa7cae
fa7cae
function render_loadConfig {
fa7cae
fa7cae
    # Define rendering actions.
fa7cae
    ACTIONS[0]='BASE:renderText'
fa7cae
    ACTIONS[1]='POST:formatText: --width=70 --uniform-spacing'
fa7cae
fa7cae
}
fa7cae
fa7cae

When using identity pre-rendering configuration scripts, you can

fa7cae
extend both image-based and text-based pre-rendering configuration
fa7cae
scripts using image-based and text-based post-rendering actions,
fa7cae
respectively. 
4a9d2a

fa7cae
fa7cae
fa7cae

3.56.2.2 The <tt>`render.conf.sh'</tt> translation model

fa7cae
fa7cae

Translation pre-rendering configuration scripts take precedence before

fa7cae
default translation rendering action. Translation pre-rendering
fa7cae
actions are useful when default translation rendering action do not
fa7cae
fit itself to translation entry rendering requirements.
4a9d2a

2dc146
fa7cae
fa7cae

3.56.2.3 The <tt>`render.conf.sh'</tt> rendering actions

fa7cae
fa7cae

Inside both image-based and text-based identity pre-rendering

fa7cae
configuration scripts, we use the <samp>`ACTIONS'</samp> array variable to
fa7cae
define the way centos-art.sh script performs identity
fa7cae
rendering.  Identity rendering is organized by one <samp>`BASE'</samp> action,
fa7cae
and optional <samp>`POST'</samp> and <samp>`LAST'</samp> rendering actions.
4a9d2a

fa7cae

The <samp>`BASE'</samp> action specifies what kind of rendering does the

fa7cae
centos-art.sh script will perform with the files related to
fa7cae
the pre-rendering configuration script. The <samp>`BASE'</samp> action is
fa7cae
required. Possible values to <samp>`BASE'</samp> action are either
fa7cae
<samp>`renderImage'</samp> or <samp>`renderText'</samp> only.
4a9d2a

fa7cae

To specify the <samp>`BASE'</samp> action you need to set the <samp>`BASE:'</samp>

fa7cae
string followed by one of the possible values. For example, if you
fa7cae
want to render images, consider the following definition of
fa7cae
<samp>`BASE'</samp> action:
4a9d2a

fa7cae
ACTIONS[0]='BASE:renderImage'
2dc146
fa7cae

Only one <samp>`BASE'</samp> action must be specified. If more than one

fa7cae
<samp>`BASE'</samp> action is specified, the last one is used. If no
fa7cae
<samp>`BASE'</samp> action is specified at all, an error is triggered and the
fa7cae
centos-art.sh script ends its execution.
4a9d2a

fa7cae

The <samp>`POST'</samp> action specifies which action to apply for

fa7cae
each file rendered (at the rendering time). This action is optional.
fa7cae
You can set many different <samp>`POST'</samp> actions to apply many different
fa7cae
actions over the same already rendered file. Possible values to
fa7cae
<samp>`POST'</samp> action are <samp>`renderFormats'</samp>, <samp>`renderSyslinux'</samp>,
fa7cae
<samp>`renderGrub'</samp>, etc. 
4a9d2a

fa7cae

To specify the <samp>`POST'</samp> action, you need to use set the

fa7cae
<samp>`POST:'</samp> followed by the function name of the action you want to
fa7cae
perform.  The exact form depends on your needs. For example, consider
fa7cae
the following example to produce <samp>`xpm'</samp>, <samp>`jpg'</samp>, and
fa7cae
<samp>`tif'</samp> images, based on already rendered <samp>`png'</samp> image, and
fa7cae
also organize the produced files in directories named as their own
fa7cae
extensions:
4a9d2a

fa7cae
ACTIONS[0]='BASE:renderImage'
fa7cae
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
fa7cae
ACTIONS[2]='POST:groupByFormat: png xpm jpg tif'
fa7cae
fa7cae

In the previous example, file organization takes place at the moment

fa7cae
of rendering, just after producing the <samp>`png'</samp> base file and before
fa7cae
going to the next file in the list of files to render. If you don't
fa7cae
want to organized the produced files in directories named as their own
fa7cae
extensions, just remove the <samp>`POST:groupByFormat'</samp> action line:
4a9d2a

fa7cae
ACTIONS[0]='BASE:renderImage'
fa7cae
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
2dc146
fa7cae

The <samp>`LAST'</samp> action specifies which actions to apply once the last

fa7cae
file in the list of files to process has been rendered. The
fa7cae
<samp>`LAST'</samp> action is optional. Possible values for <samp>`LAST'</samp>
fa7cae
actions may be <samp>`groupByFormat'</samp>, <samp>`renderGdmTgz'</samp>, etc.
fa7cae

fa7cae
info

Note

See section trunk/Scripts/Bash/Functions/Render, to know more

fa7cae
about possible values for <samp>`BASE'</samp>, <samp>`POST'</samp> and <samp>`LAST'</samp>
fa7cae
action definitions.
2dc146

4a9d2a
fa7cae

To specify the <samp>`LAST'</samp> action, you need to set the <samp>`LAST:'</samp>

fa7cae
string followed by the function name of the action you want to
fa7cae
perform.  For example, consider the following example if you want to
fa7cae
render all files first and organize them later:
fa7cae

fa7cae
ACTIONS[0]='BASE:renderImage'
fa7cae
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
fa7cae
ACTIONS[2]='LAST:groupByformat: png xpm jpg tif'
fa7cae
5fb024
2dc146
54b5a5

3.56.3 Usage

54b5a5
fa7cae

Use the following commands to administer both identity and translation

fa7cae
pre-rendering configuration scripts:
fa7cae

4a9d2a
fa7cae
<samp>`centos-art config --create='path/to/dir/''</samp>
fa7cae
fa7cae

Use this command to create <samp>`path/to/dir'</samp> related pre-rendering

fa7cae
configuration script.
4a9d2a

fa7cae
fa7cae
<samp>`centos-art config --edit='path/to/dir/''</samp>
fa7cae
fa7cae

Use this command to edit <samp>`path/to/dir'</samp> related pre-rendering

fa7cae
configuration script.  
fa7cae

fa7cae
fa7cae
<samp>`centos-art config --read='path/to/dir/''</samp>
fa7cae
fa7cae

Use this command to read <samp>`path/to/dir'</samp> related pre-rendering

fa7cae
configuration script.  
4a9d2a

fa7cae
fa7cae
<samp>`centos-art config --remove='path/to/dir/''</samp>
fa7cae
fa7cae

Use this command to remove <samp>`path/to/dir'</samp> related pre-rendering

fa7cae
configuration script.
fa7cae

fa7cae
fa7cae
fa7cae
fa7cae

In the commands above, <samp>`path/to/dir'</samp> refers to one renderable

fa7cae
directory path under <tt>`trunk/Identity'</tt> or
fa7cae
<tt>`trunk/Translations'</tt> structures only. 
4a9d2a

4a9d2a
2dc146
300762

3.56.4 See also

300762
4a9d2a
fa7cae
3.49 trunk/Scripts/Bash  
fa7cae
fa7cae
3.50 trunk/Scripts/Bash/Functions  
4a9d2a
fa7cae
3.55 trunk/Scripts/Bash/Functions/Render  
4a9d2a
4a9d2a
081970
081970
300762
2dc146
[ < ]
2dc146
[ > ]
300762
   
300762
[ << ]
fa7cae
[ Up ]
fa7cae
[ >> ]
300762
4c79b5

4c79b5
 <font size="-1">
acd47b
  This document was generated on February, 26 2011 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

4c79b5
</body>
4c79b5
</html>