Blame Manual/repository-html/repository_64.html

db14a4
db14a4
<html>
db14a4
db14a4
db14a4
Permission is granted to copy, distribute and/or modify this document
db14a4
under the terms of the GNU Free Documentation License, Version 1.2 or
db14a4
any later version published by the Free Software Foundation; with no
db14a4
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
db14a4
copy of the license is included in the section entitled GNU Free
db14a4
Documentation License.  
db14a4
-->
406f69
db14a4
db14a4
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
db14a4
            Karl Berry  <karl@freefriends.org>
db14a4
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
db14a4
            and many others.
db14a4
Maintained by: Many creative people <dev@texi2html.cvshome.org>
db14a4
Send bugs and suggestions to <users@texi2html.cvshome.org>
db14a4
db14a4
-->
db14a4
<head>
f66721
<title>CentOS Artwork Repository: 2.59 The trunk/Scripts/Bash/Cli/Functions/Render/Config Directory</title>
db14a4
f66721
<meta name="description" content="CentOS Artwork Repository: 2.59 The trunk/Scripts/Bash/Cli/Functions/Render/Config Directory">
f66721
<meta name="keywords" content="CentOS Artwork Repository: 2.59 The trunk/Scripts/Bash/Cli/Functions/Render/Config Directory">
db14a4
<meta name="resource-type" content="document">
db14a4
<meta name="distribution" content="global">
db14a4
<meta name="Generator" content="texi2html 1.76">
db14a4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
db14a4
<style type="text/css">
db14a4
db14a4
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
db14a4
db14a4
a.summary-letter {text-decoration: none}
db14a4
pre.display {font-family: serif}
db14a4
pre.format {font-family: serif}
db14a4
pre.menu-comment {font-family: serif}
db14a4
pre.menu-preformatted {font-family: serif}
db14a4
pre.smalldisplay {font-family: serif; font-size: smaller}
db14a4
pre.smallexample {font-size: smaller}
db14a4
pre.smallformat {font-family: serif; font-size: smaller}
db14a4
pre.smalllisp {font-size: smaller}
db14a4
span.sansserif {font-family:sans-serif; font-weight:normal;}
db14a4
ul.toc {list-style: none}
db14a4
-->
db14a4
</style>
db14a4
db14a4
db14a4
</head>
db14a4
db14a4
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
db14a4
db14a4
f66721
[ < ]
f66721
[ > ]
db14a4
   
f66721
[ << ]
f66721
[ Up ]
f66721
[ >> ]
db14a4
   
db14a4
   
db14a4
   
db14a4
   
56a476
[Top]
56a476
[Contents]
f66721
[Index]
56a476
[ ? ]
db14a4
f66721
f66721
f66721

2.59 The <tt>`trunk/Scripts/Bash/Cli/Functions/Render/Config'</tt> Directory

aaf678
982d5c
f66721
f66721

2.59.1 Goals

b130a0
f66721

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

f66721
pre-rendering configuration scripts.
b9dbd3

b9dbd3
f66721
f66721

2.59.2 Description

f66721
f66721

Pre-rendering configuration scripts let you customize the way

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

f66721

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

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

f66721
f66721
f66721

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

f66721
f66721

Inside CentOS Artwork Repository, we consider identity entries to all

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

f66721

Inside identity pre-rendering configuration scripts, image-based

f66721
pre-rendering configuration scripts look like the following:
063806

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

Inside identity pre-rendering configuration scripts, text-based

f66721
pre-rendering configuration scripts look like the following:
063806

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

When using identity pre-rendering configuration scripts, you can

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

f66721
f66721
f66721

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

f66721
f66721

Translation pre-rendering configuration scripts take precedence before

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

010b2d
f66721
f66721

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

f66721
f66721

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

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

f66721

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

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

f66721

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

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

f66721
ACTIONS[0]='BASE:renderImage'
063806
f66721

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

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

f66721

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

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

f66721

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

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

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

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

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

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

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

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

f66721
info

Note

-- Removed(xref:trunk Scripts Bash Functions Render) --, to know more

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

b130a0
f66721

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

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

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

2.59.3 Usage

b9dbd3
f66721

Use the following commands to administer both identity and translation

f66721
pre-rendering configuration scripts:
f66721

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

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

f66721
configuration script.
063806

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

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

f66721
configuration script.  
f66721

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

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

f66721
configuration script.  
063806

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

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

f66721
configuration script.
b9dbd3

f66721
f66721
b9dbd3
f66721

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

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

f66721
f66721
f66721

2.59.4 See also

5cb5a7
b9dbd3
f66721
2.50 The <tt>`trunk/Scripts/Bash'</tt> Directory  
b9dbd3
b9dbd3
5cb5a7
5cb5a7
db14a4
f66721
[ < ]
f66721
[ > ]
db14a4
   
f66721
[ << ]
f66721
[ Up ]
f66721
[ >> ]
db14a4
db14a4

db14a4
 <font size="-1">
406f69
  This document was generated on March, 1 2011 using texi2html 1.76.
db14a4
 </font>
db14a4
 
db14a4
db14a4

db14a4
</body>
db14a4
</html>