| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> |
| <html> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <head> |
| <title>CentOS Artwork Repository - Filesystem: 3.56 trunk/Scripts/Bash/Cli/Functions/Render/Config</title> |
| |
| <meta name="description" content="CentOS Artwork Repository - Filesystem: 3.56 trunk/Scripts/Bash/Cli/Functions/Render/Config"> |
| <meta name="keywords" content="CentOS Artwork Repository - Filesystem: 3.56 trunk/Scripts/Bash/Cli/Functions/Render/Config"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="texi2html 1.76"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <style type="text/css"> |
| <!-- |
| @import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css"; |
| |
| a.summary-letter {text-decoration: none} |
| pre.display {font-family: serif} |
| pre.format {font-family: serif} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: serif; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: serif; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.sansserif {font-family:sans-serif; font-weight:normal;} |
| ul.toc {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| |
| <table cellpadding="1" cellspacing="1" border="0"> |
| <tr><td valign="middle" align="left">[<a href="filesystem_58.html#SEC311" title="Previous section in reading order"> < </a>]</td> |
| <td valign="middle" align="left">[<a href="#SEC313" title="Next section in reading order"> > </a>]</td> |
| <td valign="middle" align="left"> </td> |
| <td valign="middle" align="left">[<a href="filesystem_3.html#SEC3" title="Beginning of this chapter or previous chapter"> << </a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_3.html#SEC3" title="Up section"> Up </a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_64.html#SEC345" title="Next chapter"> >> </a>]</td> |
| <td valign="middle" align="left"> </td> |
| <td valign="middle" align="left"> </td> |
| <td valign="middle" align="left"> </td> |
| <td valign="middle" align="left"> </td> |
| <td valign="middle" align="left">[<a href="filesystem.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_64.html#SEC345" title="Index">Index</a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_abt.html#SEC_About" title="About (help)"> ? </a>]</td> |
| </tr></table> |
| <a name="trunk-Scripts-Bash-Cli-Functions-Render-Config"></a> |
| <a name="SEC312"></a> |
| <h2 class="section"> 3.56 trunk/Scripts/Bash/Cli/Functions/Render/Config </h2> |
| |
| |
| <a name="SEC313"></a> |
| <h3 class="subsection"> 3.56.1 Goals </h3> |
| |
| <p>The <tt>`trunk/Scripts/Bash/Config'</tt> directory exists to oraganize |
| pre-rendering configuration scripts. |
| </p> |
| |
| <a name="SEC314"></a> |
| <h3 class="subsection"> 3.56.2 Description </h3> |
| |
| <p>Pre-rendering configuration scripts let you customize the way |
| <code>centos-art.sh</code> script renders identity and translation |
| repository entries. Pre-rendering configuration scripts are |
| <tt>`render.conf.sh'</tt> files with <code>render_loadConfig</code> function |
| definition inside. |
| </p> |
| <p>There is one <tt>`render.conf.sh'</tt> file for each pre-rendering |
| configuration entry. Pre-rendering configuration entries can be based |
| both on identity and translation repository entires. Pre-rendering |
| configuration entries are required for each identity entry, but not |
| for translation entries. |
| </p> |
| |
| <a name="SEC315"></a> |
| <h4 class="subsubsection"> 3.56.2.1 The <tt>`render.conf.sh'</tt> identity model </h4> |
| |
| <p>Inside CentOS Artwork Repository, we consider identity entries to all |
| directories under <tt>`trunk/Identity'</tt> directory. Identity entries can be |
| image-based or text-based. When you render image-based identity |
| entries you need to use image-based pre-rendering configuration |
| scripts. Likewise, when you render text-based identity entries you |
| need to use text-based pre-rendering configuration scripts. |
| </p> |
| <p>Inside identity pre-rendering configuration scripts, image-based |
| pre-rendering configuration scripts look like the following: |
| </p> |
| <pre class="verbatim">#!/bin/bash |
| |
| function render_loadConfig { |
| |
| # Define rendering actions. |
| ACTIONS[0]='BASE:renderImage' |
| ACTIONS[1]='POST:renderFormats: tif xpm pdf ppm' |
| |
| } |
| </pre> |
| <p>Inside identity pre-rendering configuration scripts, text-based |
| pre-rendering configuration scripts look like the following: |
| </p> |
| <pre class="verbatim">#!/bin/bash |
| |
| function render_loadConfig { |
| |
| # Define rendering actions. |
| ACTIONS[0]='BASE:renderText' |
| ACTIONS[1]='POST:formatText: --width=70 --uniform-spacing' |
| |
| } |
| </pre> |
| <p>When using identity pre-rendering configuration scripts, you can |
| extend both image-based and text-based pre-rendering configuration |
| scripts using image-based and text-based post-rendering actions, |
| respectively. |
| </p> |
| |
| <a name="SEC316"></a> |
| <h4 class="subsubsection"> 3.56.2.2 The <tt>`render.conf.sh'</tt> translation model </h4> |
| |
| <p>Translation pre-rendering configuration scripts take precedence before |
| default translation rendering action. Translation pre-rendering |
| actions are useful when default translation rendering action do not |
| fit itself to translation entry rendering requirements. |
| </p> |
| |
| <a name="SEC317"></a> |
| <h4 class="subsubsection"> 3.56.2.3 The <tt>`render.conf.sh'</tt> rendering actions </h4> |
| |
| <p>Inside both image-based and text-based identity pre-rendering |
| configuration scripts, we use the <samp>`ACTIONS'</samp> array variable to |
| define the way <code>centos-art.sh</code> script performs identity |
| rendering. Identity rendering is organized by one <samp>`BASE'</samp> action, |
| and optional <samp>`POST'</samp> and <samp>`LAST'</samp> rendering actions. |
| </p> |
| <p>The <samp>`BASE'</samp> action specifies what kind of rendering does the |
| <code>centos-art.sh</code> script will perform with the files related to |
| the pre-rendering configuration script. The <samp>`BASE'</samp> action is |
| required. Possible values to <samp>`BASE'</samp> action are either |
| <samp>`renderImage'</samp> or <samp>`renderText'</samp> only. |
| </p> |
| <p>To specify the <samp>`BASE'</samp> action you need to set the <samp>`BASE:'</samp> |
| string followed by one of the possible values. For example, if you |
| want to render images, consider the following definition of |
| <samp>`BASE'</samp> action: |
| </p> |
| <pre class="verbatim">ACTIONS[0]='BASE:renderImage' |
| </pre> |
| <p>Only one <samp>`BASE'</samp> action must be specified. If more than one |
| <samp>`BASE'</samp> action is specified, the last one is used. If no |
| <samp>`BASE'</samp> action is specified at all, an error is triggered and the |
| <code>centos-art.sh</code> script ends its execution. |
| </p> |
| <p>The <samp>`POST'</samp> action specifies which action to apply for |
| each file rendered (at the rendering time). This action is optional. |
| You can set many different <samp>`POST'</samp> actions to apply many different |
| actions over the same already rendered file. Possible values to |
| <samp>`POST'</samp> action are <samp>`renderFormats'</samp>, <samp>`renderSyslinux'</samp>, |
| <samp>`renderGrub'</samp>, etc. |
| </p> |
| <p>To specify the <samp>`POST'</samp> action, you need to use set the |
| <samp>`POST:'</samp> followed by the function name of the action you want to |
| perform. The exact form depends on your needs. For example, consider |
| the following example to produce <samp>`xpm'</samp>, <samp>`jpg'</samp>, and |
| <samp>`tif'</samp> images, based on already rendered <samp>`png'</samp> image, and |
| also organize the produced files in directories named as their own |
| extensions: |
| </p> |
| <pre class="verbatim">ACTIONS[0]='BASE:renderImage' |
| ACTIONS[1]='POST:renderFormats: xpm jpg tif' |
| ACTIONS[2]='POST:groupByFormat: png xpm jpg tif' |
| </pre> |
| <p>In the previous example, file organization takes place at the moment |
| of rendering, just after producing the <samp>`png'</samp> base file and before |
| going to the next file in the list of files to render. If you don't |
| want to organized the produced files in directories named as their own |
| extensions, just remove the <samp>`POST:groupByFormat'</samp> action line: |
| </p> |
| <pre class="verbatim">ACTIONS[0]='BASE:renderImage' |
| ACTIONS[1]='POST:renderFormats: xpm jpg tif' |
| </pre> |
| <p>The <samp>`LAST'</samp> action specifies which actions to apply once the last |
| file in the list of files to process has been rendered. The |
| <samp>`LAST'</samp> action is optional. Possible values for <samp>`LAST'</samp> |
| actions may be <samp>`groupByFormat'</samp>, <samp>`renderGdmTgz'</samp>, etc. |
| </p> |
| <blockquote class="blue"><img src="/home/centos/artwork/trunk/Identity/Widgets/Img/icon-admonition-info.png" alt="info"><h3>Note</h3><p> -- <strong>Removed</strong>(xref:trunk Scripts Bash Functions Render) --, to know more |
| about possible values for <samp>`BASE'</samp>, <samp>`POST'</samp> and <samp>`LAST'</samp> |
| action definitions. |
| </p></blockquote> |
| |
| <p>To specify the <samp>`LAST'</samp> action, you need to set the <samp>`LAST:'</samp> |
| string followed by the function name of the action you want to |
| perform. For example, consider the following example if you want to |
| render all files first and organize them later: |
| </p> |
| <pre class="verbatim">ACTIONS[0]='BASE:renderImage' |
| ACTIONS[1]='POST:renderFormats: xpm jpg tif' |
| ACTIONS[2]='LAST:groupByformat: png xpm jpg tif' |
| </pre> |
| |
| <a name="SEC318"></a> |
| <h3 class="subsection"> 3.56.3 Usage </h3> |
| |
| <p>Use the following commands to administer both identity and translation |
| pre-rendering configuration scripts: |
| </p> |
| <dl compact="compact"> |
| <dt> <samp>`centos-art config --create='path/to/dir/''</samp></dt> |
| <dd> |
| <p>Use this command to create <samp>`path/to/dir'</samp> related pre-rendering |
| configuration script. |
| </p> |
| </dd> |
| <dt> <samp>`centos-art config --edit='path/to/dir/''</samp></dt> |
| <dd> |
| <p>Use this command to edit <samp>`path/to/dir'</samp> related pre-rendering |
| configuration script. |
| </p> |
| </dd> |
| <dt> <samp>`centos-art config --read='path/to/dir/''</samp></dt> |
| <dd> |
| <p>Use this command to read <samp>`path/to/dir'</samp> related pre-rendering |
| configuration script. |
| </p> |
| </dd> |
| <dt> <samp>`centos-art config --remove='path/to/dir/''</samp></dt> |
| <dd> |
| <p>Use this command to remove <samp>`path/to/dir'</samp> related pre-rendering |
| configuration script. |
| </p> |
| </dd> |
| </dl> |
| |
| <p>In the commands above, <samp>`path/to/dir'</samp> refers to one renderable |
| directory path under <tt>`trunk/Identity'</tt> or |
| <tt>`trunk/Translations'</tt> structures only. |
| </p> |
| |
| <a name="SEC319"></a> |
| <h3 class="subsection"> 3.56.4 See also </h3> |
| |
| <table class="menu" border="0" cellspacing="0"> |
| <tr><td align="left" valign="top"><a href="filesystem_50.html#SEC257">3.47 trunk/Scripts/Bash</a></td><td> </td><td align="left" valign="top"> |
| </td></tr> |
| </table> |
| |
| |
| <table cellpadding="1" cellspacing="1" border="0"> |
| <tr><td valign="middle" align="left">[<a href="#SEC318" title="Previous section in reading order"> < </a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_60.html#SEC320" title="Next section in reading order"> > </a>]</td> |
| <td valign="middle" align="left"> </td> |
| <td valign="middle" align="left">[<a href="filesystem_3.html#SEC3" title="Beginning of this chapter or previous chapter"> << </a>]</td> |
| <td valign="middle" align="left">[<a href="#SEC312" title="Up section"> Up </a>]</td> |
| <td valign="middle" align="left">[<a href="filesystem_64.html#SEC345" title="Next chapter"> >> </a>]</td> |
| </tr></table> |
| <p> |
| <font size="-1"> |
| This document was generated on <i>March, 1 2011</i> using <a class="www" href="http://texi2html.cvshome.org/"><i>texi2html 1.76</i></a>. |
| </font> |
| <br> |
| |
| </p> |
| </body> |
| </html> |