Blame Manuals/en/Html/Repository/repository_44.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
-->
97552b
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>
b8013f
<title>CentOS Artwork Repository: 3.41 trunk/Scripts/Bash/Functions/Render/Config</title>
4c79b5
b8013f
<meta name="description" content="CentOS Artwork Repository: 3.41 trunk/Scripts/Bash/Functions/Render/Config">
b8013f
<meta name="keywords" content="CentOS Artwork Repository: 3.41 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
09d4f2
[ < ]
09d4f2
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
09d4f2
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
09d4f2
[Index]
4c79b5
[ ? ]
4c79b5
b8013f
09d4f2
b8013f

3.41 trunk/Scripts/Bash/Functions/Render/Config

c9b54d
54264c
09d4f2
6aec21

3.41.1 Goals

6aec21
b8013f

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

b8013f
pre-rendering configuration scripts.
b8013f

c9b54d
09d4f2
6aec21

3.41.2 Description

c9b54d
b8013f

Pre-rendering configuration scripts let you customize the way

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

b8013f

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

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

c9b54d
09d4f2
b8013f

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

b8013f
b8013f

Inside CentOS Artwork Repository, we consider identity entries to all

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

b8013f

Inside identity pre-rendering configuration scripts, image-based

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

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

Inside identity pre-rendering configuration scripts, text-based

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

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

When using identity pre-rendering configuration scripts, you can

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

c9b54d
09d4f2
b8013f

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

b8013f
b8013f

Translation pre-rendering configuration scripts take precedence before

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

b8013f
09d4f2
b8013f

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

b8013f
b8013f

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

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

b8013f

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

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

b8013f

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

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

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

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

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

b8013f

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

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

b8013f

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

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

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

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

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

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

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

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

09d4f2
info

Note

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

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

b8013f
b8013f

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

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

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

3.41.3 Usage

b8013f
b8013f

Use the following commands to administer both identity and translation

b8013f
pre-rendering configuration scripts:
b8013f

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

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

b8013f
configuration script.
b8013f

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

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

b8013f
configuration script.  
b8013f

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

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

b8013f
configuration script.  
b8013f

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

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

b8013f
configuration script.
b8013f

b8013f
b8013f
b8013f
b8013f

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

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

b8013f
09d4f2
54264c

3.41.4 See also

4c79b5
38bcd9
b8013f
3.34 trunk/Scripts/Bash  
38bcd9
915635
3.35 trunk/Scripts/Bash/Functions  
915635
09d4f2
3.40 trunk/Scripts/Bash/Functions/Render  
915635
38bcd9
4c79b5
4c79b5
4c79b5
09d4f2
[ < ]
09d4f2
[ > ]
4c79b5
   
4c79b5
[ << ]
09d4f2
[ Up ]
09d4f2
[ >> ]
4c79b5
4c79b5

4c79b5
 <font size="-1">
97552b
  This document was generated on November, 26 2010 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

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