Blame Manuals/en/Html/Repository/repository_45.html

4c79b5
4c79b5
<html>
09d4f2
09d4f2
09d4f2
The CentOS Artwork Repository exists to organize and automate The
09d4f2
CentOS Project corporate visual identity (, to
09d4f2
start on).
4c79b5
6c4982
Copyright C 2009, 2010 Alain Reguera Delgado. All rights
4c79b5
reserved.
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
-->
008ee0
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>
e68a7a
<title>CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Render/Config</title>
4c79b5
e68a7a
<meta name="description" content="CentOS Artwork Repository: 3.42 trunk/Scripts/Bash/Functions/Render/Config">
e68a7a
<meta name="keywords" content="CentOS Artwork Repository: 3.42 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
cbf5a9
[ < ]
cbf5a9
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
e68a7a
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
e68a7a
[Index]
4c79b5
[ ? ]
4c79b5
e68a7a
cbf5a9
e68a7a

3.42 trunk/Scripts/Bash/Functions/Render/Config

38bcd9
fe989b
cbf5a9
b8013f

3.42.1 Goals

b8013f
e68a7a

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

e68a7a
pre-rendering configuration scripts.
e68a7a

915635
cbf5a9
008ee0

3.42.2 Description

915635
e68a7a

Pre-rendering configuration scripts let you customize the way

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

e68a7a

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

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

fe989b
cbf5a9
e68a7a

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

fe989b
e68a7a

Inside CentOS Artwork Repository, we consider identity entries to all

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

e68a7a

Inside identity pre-rendering configuration scripts, image-based

e68a7a
pre-rendering configuration scripts look like the following:
e68a7a

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

Inside identity pre-rendering configuration scripts, text-based

e68a7a
pre-rendering configuration scripts look like the following:
e68a7a

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

When using identity pre-rendering configuration scripts, you can

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

fe989b
cbf5a9
e68a7a

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

e68a7a
e68a7a

Translation pre-rendering configuration scripts take precedence before

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

e68a7a
e68a7a
e68a7a

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

e68a7a
e68a7a

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

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

e68a7a

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

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

e68a7a

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

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

e68a7a
ACTIONS[0]='BASE:renderImage'
e68a7a
e68a7a

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

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

e68a7a

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

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

e68a7a

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

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

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

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

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

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

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

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

e68a7a
info

Note

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

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

e68a7a
e68a7a

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

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

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

3.42.3 Usage

e68a7a
e68a7a

Use the following commands to administer both identity and translation

e68a7a
pre-rendering configuration scripts:
e68a7a

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

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

e68a7a
configuration script.
e68a7a

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

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

e68a7a
configuration script.  
e68a7a

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

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

e68a7a
configuration script.  
e68a7a

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

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

e68a7a
configuration script.
e68a7a

e68a7a
e68a7a
e68a7a
e68a7a

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

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

e68a7a
e68a7a
54264c

3.42.4 See also

4c79b5
63f275
e68a7a
3.36 trunk/Scripts/Bash  
e68a7a
e68a7a
3.37 trunk/Scripts/Bash/Functions  
e68a7a
e68a7a
3.41 trunk/Scripts/Bash/Functions/Render  
63f275
63f275
4c79b5
4c79b5
4c79b5
e68a7a
[ < ]
e68a7a
[ > ]
4c79b5
   
4c79b5
[ << ]
cbf5a9
[ Up ]
e68a7a
[ >> ]
4c79b5
4c79b5

4c79b5
 <font size="-1">
008ee0
  This document was generated on December, 2 2010 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

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