Blame Manual/repository-html/repository_74.html

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

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

632e8b
632e8b
9bfd15
632e8b

2.70.1 Goals

632e8b
9bfd15

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

9bfd15
pre-rendering configuration scripts.
632e8b

632e8b
9bfd15
632e8b

2.70.2 Description

632e8b
9bfd15

Pre-rendering configuration scripts let you customize the way

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

9bfd15

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

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

9bfd15
9bfd15
9bfd15

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

9bfd15
9bfd15

Inside CentOS Artwork Repository, we consider identity entries to all

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

9bfd15

Inside identity pre-rendering configuration scripts, image-based

9bfd15
pre-rendering configuration scripts look like the following:
9bfd15

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

Inside identity pre-rendering configuration scripts, text-based

9bfd15
pre-rendering configuration scripts look like the following:
632e8b

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

When using identity pre-rendering configuration scripts, you can

9bfd15
extend both image-based and text-based pre-rendering configuration
9bfd15
scripts using image-based and text-based post-rendering actions,
9bfd15
respectively. 
632e8b

9bfd15
9bfd15
9bfd15

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

9bfd15
9bfd15

Translation pre-rendering configuration scripts take precedence before

9bfd15
default translation rendering action. Translation pre-rendering
9bfd15
actions are useful when default translation rendering action do not
9bfd15
fit itself to translation entry rendering requirements.
632e8b

632e8b
9bfd15
9bfd15

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

9bfd15
9bfd15

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

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

9bfd15

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

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

9bfd15

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

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

9bfd15
ACTIONS[0]='BASE:renderImage'
632e8b
9bfd15

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

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

9bfd15

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

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

9bfd15

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

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

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

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

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

9bfd15
ACTIONS[0]='BASE:renderImage'
9bfd15
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
632e8b
9bfd15

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

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

9bfd15
info

Note

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

9bfd15
about possible values for <samp>`BASE'</samp>, <samp>`POST'</samp> and <samp>`LAST'</samp>
9bfd15
action definitions.
632e8b

632e8b
9bfd15

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

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

9bfd15
ACTIONS[0]='BASE:renderImage'
9bfd15
ACTIONS[1]='POST:renderFormats: xpm jpg tif'
9bfd15
ACTIONS[2]='LAST:groupByformat: png xpm jpg tif'
9bfd15
632e8b
9bfd15
632e8b

2.70.3 Usage

632e8b
9bfd15

Use the following commands to administer both identity and translation

9bfd15
pre-rendering configuration scripts:
9bfd15

632e8b
9bfd15
<samp>`centos-art config --create='path/to/dir/''</samp>
9bfd15
9bfd15

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

9bfd15
configuration script.
632e8b

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

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

9bfd15
configuration script.  
9bfd15

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

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

9bfd15
configuration script.  
632e8b

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

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

9bfd15
configuration script.
632e8b

9bfd15
9bfd15
632e8b
9bfd15

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

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

9bfd15
9bfd15
632e8b

2.70.4 See also

632e8b
632e8b
9bfd15
2.61 The <tt>`trunk/Scripts/Bash'</tt> Directory  
632e8b
632e8b
632e8b
632e8b
632e8b
9bfd15
[ < ]
9bfd15
[ > ]
632e8b
   
632e8b
[ << ]
9bfd15
[ Up ]
9bfd15
[ >> ]
632e8b
632e8b

632e8b
 <font size="-1">
9bfd15
  This document was generated on March, 8 2011 using texi2html 1.76.
632e8b
 </font>
632e8b
 
632e8b
632e8b

632e8b
</body>
632e8b
</html>