Blame Manuals/Repository/repository-html/repository_57.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>
4a9d2a
<title>CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render/Config</title>
4c79b5
4a9d2a
<meta name="description" content="CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render/Config">
4a9d2a
<meta name="keywords" content="CentOS Artwork Repository: 3.54 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
4a9d2a
[ < ]
4a9d2a
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
acd47b
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
acd47b
[Index]
4c79b5
[ ? ]
4c79b5
4a9d2a
4a9d2a
4a9d2a

3.54 trunk/Scripts/Bash/Functions/Render/Config

008ee0
b0644c
4a9d2a
e37211

3.54.1 Goals

b0644c
4a9d2a

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

4a9d2a
pre-rendering configuration scripts.
ec5f63

4a9d2a
4a9d2a
035049

3.54.2 Description

035049
4a9d2a

Pre-rendering configuration scripts let you customize the way

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

4a9d2a

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

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

4a9d2a
4a9d2a
4a9d2a

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

4a9d2a
4a9d2a

Inside CentOS Artwork Repository, we consider identity entries to all

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

4a9d2a

Inside identity pre-rendering configuration scripts, image-based

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

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

Inside identity pre-rendering configuration scripts, text-based

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

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

When using identity pre-rendering configuration scripts, you can

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

1d1bf4
4a9d2a
4a9d2a

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

1d1bf4
4a9d2a

Translation pre-rendering configuration scripts take precedence before

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

4a9d2a
4a9d2a
4a9d2a

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

ec5f63
4a9d2a

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

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

4a9d2a

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

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

4a9d2a

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

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

4a9d2a
ACTIONS[0]='BASE:renderImage'
4a9d2a
4a9d2a

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

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

4a9d2a

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

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

4a9d2a

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

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

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

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

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

4a9d2a
ACTIONS[0]='BASE:renderImage'
4a9d2a
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
4a9d2a
4a9d2a

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

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

4a9d2a
info

Note

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

4a9d2a
about possible values for <samp>`BASE'</samp>, <samp>`POST'</samp> and <samp>`LAST'</samp>
4a9d2a
action definitions.
4a9d2a

4a9d2a
4a9d2a

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

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

4a9d2a
ACTIONS[0]='BASE:renderImage'
4a9d2a
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
4a9d2a
ACTIONS[2]='LAST:groupByformat: png xpm jpg tif'
4a9d2a
4a9d2a
4a9d2a
4a9d2a

3.54.3 Usage

ec5f63
4a9d2a

Use the following commands to administer both identity and translation

4a9d2a
pre-rendering configuration scripts:
4a9d2a

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

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

4a9d2a
configuration script.
4a9d2a

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

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

4a9d2a
configuration script.  
4a9d2a

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

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

4a9d2a
configuration script.  
4a9d2a

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

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

4a9d2a
configuration script.
4a9d2a

4a9d2a
4a9d2a
4a9d2a
4a9d2a

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

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

4a9d2a
4a9d2a
300762

3.54.4 See also

300762
ec5f63
4a9d2a
3.47 trunk/Scripts/Bash  
4a9d2a
4a9d2a
3.48 trunk/Scripts/Bash/Functions  
4a9d2a
4a9d2a
3.53 trunk/Scripts/Bash/Functions/Render  
ec5f63
ec5f63
ec5f63
300762
300762
4a9d2a
[ < ]
4a9d2a
[ > ]
300762
   
300762
[ << ]
4a9d2a
[ Up ]
acd47b
[ >> ]
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>