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

3.55 trunk/Scripts/Bash/Functions/Render/Config

2dc146
2dc146
c2a1bc
c2a1bc

3.55.1 Goals

166893
c2a1bc

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

c2a1bc
pre-rendering configuration scripts.
7bbd70

166893
c2a1bc
c2a1bc

3.55.2 Description

2b5e61
c2a1bc

Pre-rendering configuration scripts let you customize the way

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

c2a1bc

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

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

2b5e61
c2a1bc
c2a1bc

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

c2a1bc
c2a1bc

Inside CentOS Artwork Repository, we consider identity entries to all

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

c2a1bc

Inside identity pre-rendering configuration scripts, image-based

c2a1bc
pre-rendering configuration scripts look like the following:
7fa1fb

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

Inside identity pre-rendering configuration scripts, text-based

c2a1bc
pre-rendering configuration scripts look like the following:
7bbd70

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

When using identity pre-rendering configuration scripts, you can

c2a1bc
extend both image-based and text-based pre-rendering configuration
c2a1bc
scripts using image-based and text-based post-rendering actions,
c2a1bc
respectively. 
7fa1fb

2b5e61
c2a1bc
c2a1bc

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

2b5e61
c2a1bc

Translation pre-rendering configuration scripts take precedence before

c2a1bc
default translation rendering action. Translation pre-rendering
c2a1bc
actions are useful when default translation rendering action do not
c2a1bc
fit itself to translation entry rendering requirements.
7bbd70

c2a1bc
c2a1bc
c2a1bc

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

c2a1bc
c2a1bc

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

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

c2a1bc

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

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

c2a1bc

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

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

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

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

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

c2a1bc

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

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

c2a1bc

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

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

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

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

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

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

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

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

c2a1bc
info

Note

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

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

7fa1fb
c2a1bc

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

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

c2a1bc
ACTIONS[0]='BASE:renderImage'
c2a1bc
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
c2a1bc
ACTIONS[2]='LAST:groupByformat: png xpm jpg tif'
2dc146
6ba043
c2a1bc
c2a1bc

3.55.3 Usage

b8013f
c2a1bc

Use the following commands to administer both identity and translation

c2a1bc
pre-rendering configuration scripts:
2dc146

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

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

c2a1bc
configuration script.
4a9d2a

2dc146
c2a1bc
<samp>`centos-art config --edit='path/to/dir/''</samp>
2dc146
c2a1bc

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

c2a1bc
configuration script.  
2dc146

2dc146
c2a1bc
<samp>`centos-art config --read='path/to/dir/''</samp>
2dc146
c2a1bc

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

c2a1bc
configuration script.  
4a9d2a

2dc146
c2a1bc
<samp>`centos-art config --remove='path/to/dir/''</samp>
2dc146
c2a1bc

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

c2a1bc
configuration script.
7fa1fb

c2a1bc
2dc146
2dc146
c2a1bc

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

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

b8013f
c2a1bc
c2a1bc

3.55.4 See also

300762
4a9d2a
c2a1bc
3.48 trunk/Scripts/Bash  
c2a1bc
c2a1bc
3.49 trunk/Scripts/Bash/Functions  
c2a1bc
c2a1bc
3.54 trunk/Scripts/Bash/Functions/Render  
4a9d2a
4a9d2a
bc3531
38bcd9
300762
c2a1bc
[ < ]
c2a1bc
[ > ]
300762
   
300762
[ << ]
c2a1bc
[ Up ]
c2a1bc
[ >> ]
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>