Blame Identity/Manual/repository-html/repository_2.68.html

728c6d
728c6d
<html>
728c6d
728c6d
organization, and administration of CentOS Artwork Repository.
728c6d
728c6d
Copyright C 2009-2011 Alain Reguera Delgado
728c6d
728c6d
Permission is granted to copy, distribute and/or modify this document
728c6d
under the terms of the GNU Free Documentation License, Version 1.2 or
728c6d
any later version published by the Free Software Foundation; with no
728c6d
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
728c6d
copy of the license is included in the section entitled GNU Free
728c6d
Documentation License.  
728c6d
-->
728c6d
728c6d
728c6d
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
728c6d
            Karl Berry  <karl@freefriends.org>
728c6d
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
728c6d
            and many others.
728c6d
Maintained by: Many creative people <dev@texi2html.cvshome.org>
728c6d
Send bugs and suggestions to <users@texi2html.cvshome.org>
728c6d
728c6d
-->
728c6d
<head>
728c6d
<title>CentOS Artwork Repository: 2.68 The trunk/Scripts/Functions/Render Directory</title>
728c6d
728c6d
<meta name="description" content="CentOS Artwork Repository: 2.68 The trunk/Scripts/Functions/Render Directory">
728c6d
<meta name="keywords" content="CentOS Artwork Repository: 2.68 The trunk/Scripts/Functions/Render Directory">
728c6d
<meta name="resource-type" content="document">
728c6d
<meta name="distribution" content="global">
728c6d
<meta name="Generator" content="texi2html 1.76">
728c6d
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
728c6d
<style type="text/css">
728c6d
728c6d
/* CSS
728c6d
 *
728c6d
 * repository.css -- This file provides visual style for repository
728c6d
 * documentation manual in HTML format, as output by Texi2html
728c6d
 * program.
728c6d
 *
728c6d
 * Copyright (C) 2009-2011 Alain Reguera Delgado
728c6d
 *
728c6d
 * This program is free software; you can redistribute it and/or
728c6d
 * modify it under the terms of the GNU General Public License as
728c6d
 * published by the Free Software Foundation; either version 2 of the
728c6d
 * License, or (at your option) any later version.
728c6d
 * 
728c6d
 * This program is distributed in the hope that it will be useful, but
728c6d
 * WITHOUT ANY WARRANTY; without even the implied warranty of
728c6d
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
728c6d
 * General Public License for more details.
728c6d
 *
728c6d
 * You should have received a copy of the GNU General Public License
728c6d
 * along with this program; if not, write to the Free Software
728c6d
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
728c6d
 * USA.
728c6d
 * ----------------------------------------------------------------------
728c6d
 * $Id$
728c6d
 * ----------------------------------------------------------------------
728c6d
 */
728c6d
728c6d
@import url("/home/centos/artwork/trunk/Identity/Webenv/Css/base.css");
728c6d
@import url("/home/centos/artwork/trunk/Identity/Webenv/Css/base-app.css");
728c6d
728c6d
a.summary-letter {text-decoration: none}
728c6d
pre.display {font-family: serif}
728c6d
pre.format {font-family: serif}
728c6d
pre.menu-comment {font-family: serif}
728c6d
pre.menu-preformatted {font-family: serif}
728c6d
pre.smalldisplay {font-family: serif; font-size: smaller}
728c6d
pre.smallexample {font-size: smaller}
728c6d
pre.smallformat {font-family: serif; font-size: smaller}
728c6d
pre.smalllisp {font-size: smaller}
728c6d
span.sansserif {font-family:sans-serif; font-weight:normal;}
728c6d
ul.toc {list-style: none}
728c6d
-->
728c6d
</style>
728c6d
728c6d
728c6d
</head>
728c6d
728c6d
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
728c6d
728c6d
728c6d
[ < ]
728c6d
[ > ]
728c6d
   
728c6d
[Contents]
728c6d
[Index]
728c6d
[ ? ]
728c6d
728c6d
728c6d
728c6d

2.68 The <tt>`trunk/Scripts/Functions/Render'</tt> Directory

728c6d
    728c6d
    2.68.1 Renderable identity directory structures 
    728c6d
      728c6d
      2.68.1.1 Design template without translation 
      728c6d
      2.68.1.2 Design template with translation (one-to-one) 
      728c6d
      2.68.1.3 Design template with translation (optimized) 
      728c6d
      2.68.1.4 Design template with translation (optimized+flexibility) 
      728c6d
      728c6d
      2.68.2 Renderable translation directory structures 
      728c6d
      2.68.3 Copying renderable directory structures 
      728c6d
      2.68.4 Usage 
      728c6d
      2.68.5 See also 
      728c6d
      728c6d
      728c6d

      The render functionality exists to produce both identity and

      728c6d
      translation files on different levels of information (i.e., different
      728c6d
      languages, release numbers, architectures, etc.).
      728c6d

      728c6d

      The render functionality relies on "renderable directory

      728c6d
      structures" to produce files. Renderable directory structures can be
      728c6d
      either "identity directory structures" or "translation directory
      728c6d
      structures" with special directories inside.
      728c6d

      728c6d
      728c6d
      728c6d

      2.68.1 Renderable identity directory structures

      728c6d
        728c6d
        2.68.1.1 Design template without translation 
        728c6d
        2.68.1.2 Design template with translation (one-to-one) 
        728c6d
        2.68.1.3 Design template with translation (optimized) 
        728c6d
        2.68.1.4 Design template with translation (optimized+flexibility) 
        728c6d
        728c6d
        728c6d

        Renderable identity directory structures are the starting point of

        728c6d
        identity rendition. Whenever we want to render a component of CentOS
        728c6d
        corporate visual identity, we need to point <tt>`centos-art.sh'</tt> to a
        728c6d
        renderable identity directory structure. If such renderable identity
        728c6d
        directory structure doesn't exist, then it is good time to create it. 
        728c6d

        728c6d

        Inside the working copy, one renderable identity directory structures

        728c6d
        represents one visual manifestation of CentOS corporate visual
        728c6d
        identity, or said differently, each visual manifestation of CentOS
        728c6d
        corporate visual identity should have one renderable identity
        728c6d
        directory structure.
        728c6d

        728c6d

        Inside renderable identity directory structures, <tt>`centos-art.sh'</tt>

        728c6d
        can render both image-based and text-based files. Specification of
        728c6d
        whether a renderable identity directory structure produces image-based
        728c6d
        or text-based content is a configuration action that takes place in
        728c6d
        the pre-rendition configuration script of that renderable identity
        728c6d
        directory structure.
        728c6d

        728c6d

        Inside renderable identity directory structures, content production is

        728c6d
        organized in different configurations. A content production
        728c6d
        configuration is a unique combination of the components that make an
        728c6d
        identity directory structure renderable. One content production
        728c6d
        configuration does one thing only (e.g., to produce untranslated
        728c6d
        images), but it can be extended (e.g., adding translation files) to
        728c6d
        achieve different needs (e.g., to produce translated images).
        728c6d

        728c6d
        728c6d
        728c6d

        2.68.1.1 Design template without translation

        728c6d
        728c6d

        The design template without translation configuration is based on a

        728c6d
        renderable identity directory structure with an empty translation
        728c6d
        directory structure. In this configuration, one design template
        728c6d
        produces one untranslated file. Both design templates and final
        728c6d
        untranslated files share the same file name, but they differ one
        728c6d
        another in file-type and file-extension.
        728c6d

        728c6d

        For example, to produce images without translations (there is no much

        728c6d
        use in producing text-based files without translations), consider the
        728c6d
        following configuration:
        728c6d

        728c6d
        728c6d
        One renderable identity directory structure:
        728c6d
        728c6d

        In this example we used <tt>`Identity/Path/To/Dir'</tt> as the identity

        728c6d
        component we want to produce untranslated images for.  Identity
        728c6d
        components can be either under <tt>`trunk/'</tt> or <tt>`branches/'</tt>
        728c6d
        directory structure.
        728c6d

        728c6d

        The identity component (i.e., <tt>`Identity/Path/To/Dir'</tt>, in this

        728c6d
        case) is also the bond component we use to connect the identity
        728c6d
        directory structures with their respective auxiliar directories (i.e.,
        728c6d
        translation directory structres and pre-rendition configuration
        728c6d
        structures).  The bond component is the path convenction that
        728c6d
        <tt>`centos-art.sh'</tt> uses to know where to look for related
        728c6d
        translations, configuration scripts and whatever auxiliar thing a
        728c6d
        renderable directory structure may need to have.
        728c6d

        728c6d
              | The bond component
        728c6d
              |----------------->|
        728c6d
        trunk/Identity/Path/To/Dir  <-- Renderable identity directory structure.
        728c6d
        |-- Tpl                     <-- Design template directory.
        728c6d
        |   `-- file.svg            <-- Design template file.
        728c6d
        `-- Img                     <-- Directory used to store final files.
        728c6d
            `-- file.png            <-- Final image-based file produced from
        728c6d
                                        design template file.
        728c6d
        728c6d

        Inside design template directory, design template files are based on

        728c6d
        SVG (Scalable Vector Graphics) and use the extension
        728c6d
        .svg.  Design template files can be organized using several
        728c6d
        directory levels to create a simple but extensible configuration,
        728c6d
        specially if translated images are not required.
        728c6d

        728c6d

        In order for SVG (Scalable Vector Graphics) files to be

        728c6d
        considered "design template" files, they should be placed under the
        728c6d
        design template directory and to have set a CENTOSARTWORK
        728c6d
        object id inside.
        728c6d

        728c6d

        The CENTOSARTWORK word itself is a convenction name we use to

        728c6d
        define which object/design area, inside a design template, the
        728c6d
        <tt>`centos-art.sh'</tt> script will use to export as
        728c6d
        PNG (Portable Network Graphic) image at rendition time.
        728c6d
        Whithout such object id specification, the <tt>`centos-art.sh'</tt> script
        728c6d
        cannot know what object/design area you (as designer) want to export
        728c6d
        as PNG (Portable Network Graphic) image file.
        728c6d

        728c6d
        info

        Note

        At rendition time, the content of <tt>`Img/'</tt> directory

        728c6d
        structure is produced by <tt>`centos-art.sh'</tt> automatically.
        728c6d

        728c6d
        728c6d

        When a renderable identity directory structure is configured to

        728c6d
        produce image-based content, <tt>`centos-art.sh'</tt> produces
        728c6d
        PNG (Portable Network Graphics) files with the .png
        728c6d
        extension. Once the base image format has been produced, it is
        728c6d
        possible for <tt>`centos-art.sh'</tt> to use it in order to automatically
        728c6d
        create other image formats that may be needed (-- Removed(pxref:trunk Scripts
        728c6d
        Bash Functions Render Config) --).
        728c6d

        728c6d

        Inside the working copy, you can find an example of "design template

        728c6d
        without translation" configuration at <tt>`trunk/Identity/Models/'</tt>.
        728c6d

        728c6d

        See section The <tt>`trunk/Identity'</tt> Directory, for more information.

        728c6d

        728c6d
        728c6d
        One translation directory structure:
        728c6d
        728c6d

        In order for an identity entry to be considered an identity renderable

        728c6d
        directory structure, it should have a translation entry. The content
        728c6d
        of the translation entry is relevant to determine how to process the
        728c6d
        identity renderable directory entry.
        728c6d

        728c6d

        If the translation entry is empty (i.e., there is no file inside it),

        728c6d
        <tt>`centos-art.sh'</tt> interprets the identity renderable directory
        728c6d
        structure as a "design templates without translation" configuration.
        728c6d

        728c6d
                           | The bond component
        728c6d
                           |----------------->|
        728c6d
        trunk/Translations/Identity/Path/To/Dir
        728c6d
        `-- (empty)
        728c6d
        728c6d

        If the translation entry is not empty, <tt>`centos-art.sh'</tt> can

        728c6d
        interpret the identity renderable directory structure as one of the
        728c6d
        following configurations: "design template with translation
        728c6d
        (one-to-one)" or "design template with translation (optimized)".
        728c6d
        Which one of these configurations is used depends on the value
        728c6d
        assigned to the matching list (MATCHINGLIST) variable in the
        728c6d
        pre-rendition configuration script of the renderable identity
        728c6d
        directory structure we are producing images for.
        728c6d

        728c6d

        If the matching list variable is empty (as it is by default), then

        728c6d
        "design template with translation (one-to-one)" configuration is
        728c6d
        used. In this configuration it is required that both design templates
        728c6d
        and translation files have the same file names. This way, one
        728c6d
        translation files is applied to one design template, to produce
        728c6d
        one translated image.
        728c6d

        728c6d

        If the matching list variable is not empty (because you redefine it in

        728c6d
        the pre-rendition configuration script), then "design template with
        728c6d
        translation (optimized)" configuration is used instead. In this
        728c6d
        configuration, design templates and translation files don't need to
        728c6d
        have the same names since such name relationship between them is
        728c6d
        specified in the matching list properly.
        728c6d

        728c6d

        -- Removed(xref:trunk Translations) --, for more information.

        728c6d

        728c6d
        728c6d
        One pre-rendition configuration script:
        728c6d
        728c6d

        In order to make an identity directory structure renderable, a

        728c6d
        pre-rendition configuration script should exist for it.  The
        728c6d
        pre-rendition configuration script specifies what type of rendition
        728c6d
        does <tt>`centos-art.sh'</tt> will perform over the identity directory
        728c6d
        structure and how does it do that.
        728c6d

        728c6d
                                                   | The bond component
        728c6d
                                                   |----------------->|
        728c6d
        trunk/Scripts/Bash/Functions/Render/Config/Identity/Path/To/Dir
        728c6d
        `-- render.conf.sh
        728c6d
        728c6d

        In this configuration the pre-rendition configuration script

        728c6d
        (<tt>`render.conf.sh'</tt>) would look like the following:
        728c6d

        728c6d
        function render_loadConfig {
        728c6d
        728c6d
            # Define rendition actions.
        728c6d
            ACTIONS[0]='BASE:renderImage'
        728c6d
        728c6d
        }
        728c6d
        728c6d

        Since translation directory structure is empty, <tt>`centos-art.sh'</tt>

        728c6d
        assumes a "design template without translation" configuration to
        728c6d
        produce untranslated images.
        728c6d

        728c6d

        To produce untranslated images, <tt>`centos-art.sh'</tt> takes one design

        728c6d
        template and creates one temporal instance from it.  Later,
        728c6d
        <tt>`centos-art.sh'</tt> uses the temporal design template instance as
        728c6d
        source file to export the final untranslated image. The action of
        728c6d
        exporting images from SVG (Scalable Vector Graphics) to
        728c6d
        PNG (Portable Network Graphics) is possible thanks to
        728c6d
        Inkscape's command-line interface and the CENTOSARTWORK object
        728c6d
        id we previously set inside design templates.
        728c6d

        728c6d
        centos-art.sh render --identity=trunk/Identity/Path/To/Dir
        728c6d
        -------------------------------------------------
        728c6d
        0 | Execute centos-art.sh on renderable identity directory structure.
        728c6d
        --v----------------------------------------------
        728c6d
        trunk/Identity/Path/To/Dir/Tpl/file.svg
        728c6d
        -------------------------------------------------
        728c6d
        1 | Create instance from design template.
        728c6d
        --v----------------------------------------------
        728c6d
        /tmp/centos-art.sh-a07e824a-5953-4c21-90ae-f5e8e9781f5f-file.svg
        728c6d
        -------------------------------------------------
        728c6d
        2 | Render untranslated image from design template instance.
        728c6d
        --v----------------------------------------------
        728c6d
        trunk/Identity/NewDir/Img/file.png
        728c6d
        -------------------------------------------------
        728c6d
        3 | Remove design template instance.
        728c6d
        728c6d

        Finally, when the untranslated image has been created, the temporal

        728c6d
        design template instance is removed. At this point,
        728c6d
        <tt>`centos-art.sh'</tt> takes the next design template and repeats the
        728c6d
        whole production flow once again (design template by design template),
        728c6d
        until all design templates be processed.
        728c6d

        728c6d

        -- Removed(xref:trunk Scripts Bash Functions Render Config) --, for more

        728c6d
        information.
        728c6d

        728c6d
        728c6d
        728c6d
        728c6d
        728c6d

        2.68.1.2 Design template with translation (one-to-one)

        728c6d
        728c6d

        Producing untranslated images is fine in many cases, but not always.

        728c6d
        Sometimes it is required to produce images in different languages and
        728c6d
        that is something that untrasnlated image production cannot achieve.
        728c6d
        However, if we fill its empty translation entry with translation files
        728c6d
        (one for each design template) we extend the production flow from
        728c6d
        untranslated image production to translated image production.
        728c6d

        728c6d

        In order for <tt>`centos-art.sh'</tt> to produce images correctly, each

        728c6d
        design template should have one translation file and each translation
        728c6d
        file should have one design template.  Otherwise, if there is a
        728c6d
        missing design template or a missing translation file,
        728c6d
        <tt>`centos-art.sh'</tt> will not produce the final image related to the
        728c6d
        missing component.
        728c6d

        728c6d

        In order for <tt>`centos-art.sh'</tt> to know which is the relation

        728c6d
        between translation files and design templates the translation
        728c6d
        directory structure is taken as reference.  For example, the
        728c6d
        <tt>`trunk/Translations/Identity/Path/To/Dir/file.sed'</tt> translation
        728c6d
        file does match <tt>`trunk/Identity/Path/To/Dir/Tpl/file.svg'</tt> design
        728c6d
        template, but it doesn't match
        728c6d
        <tt>`trunk/Identity/Path/To/Dir/File.svg'</tt> or
        728c6d
        <tt>`trunk/Identity/Path/To/Dir/Tpl/File.svg'</tt> or
        728c6d
        <tt>`trunk/Identity/Path/To/Dir/Tpl/SubDir/file.svg'</tt> design
        728c6d
        templates.
        728c6d

        728c6d

        The pre-rendition configuration script used to produce untranslated

        728c6d
        images is the same we use to produce translated images. There is no
        728c6d
        need to modify it. So, as we are using the same pre-rendition
        728c6d
        configuration script, we can say that translated image production is
        728c6d
        somehow an extended/improved version of untranslated image production.
        728c6d

        728c6d
        info

        Note

        If we use no translation file in the translation entry

        728c6d
        (i.e., an empty directory), <tt>`centos-art.sh'</tt> assumes the
        728c6d
        untranslated image production. If we fill the translation entry with
        728c6d
        translation files, <tt>`centos-art.sh'</tt> assumes the translated image
        728c6d
        production.  
        728c6d

        728c6d
        728c6d

        To produce final images, <tt>`centos-art.sh'</tt> applies one translation

        728c6d
        file to one design template and produce a translated design template
        728c6d
        instance. Later, <tt>`centos-art.sh'</tt> uses the translated template
        728c6d
        instance to produce the translated image. Finally, when the translated
        728c6d
        image has been produced, <tt>`centos-art.sh'</tt> removes the translated
        728c6d
        design template instance. This production flow is repeated for each
        728c6d
        translation file available in the translatio entry. 
        728c6d

        728c6d
        centos-art.sh render --identity=trunk/Identity/Path/To/Dir
        728c6d
        -------------------------------------------------
        728c6d
        0 | Execute centos-art.sh on directory structure.
        728c6d
        --v----------------------------------------------
        728c6d
        trunk/Translations/Identity/Path/To/Dir/file.sed
        728c6d
        -------------------------------------------------
        728c6d
        1 | Apply translation to design template.
        728c6d
        --v----------------------------------------------
        728c6d
        trunk/Identity/Path/To/Dir/Tpl/file.svg
        728c6d
        -------------------------------------------------
        728c6d
        2 | Create design template instance.
        728c6d
        --v----------------------------------------------
        728c6d
        /tmp/centos-art.sh-a07e824a-5953-4c21-90ae-f5e8e9781f5f-file.svg
        728c6d
        -------------------------------------------------
        728c6d
        3 | Render PNG image from template instance.
        728c6d
        --v----------------------------------------------
        728c6d
        trunk/Identity/NewDir/Img/file.png
        728c6d
        -------------------------------------------------
        728c6d
        4 | Remove design template instance.
        728c6d
        728c6d
        728c6d
        728c6d

        2.68.1.3 Design template with translation (optimized)

        728c6d
        728c6d

        Producing translated images satisfies almost all our production images

        728c6d
        needs, but there is still a pitfall in them. In order to produce
        728c6d
        translated images as in the "one-to-one" configuration describes
        728c6d
        previously, it is required that one translation file has one design
        728c6d
        template. That's useful in many cases, but what would happen if we
        728c6d
        need to apply many different translation files to the same design
        728c6d
        template?  Should we have to duplicate the same design template file
        728c6d
        for each translation file, in order to satisfy the "one-to-one"
        728c6d
        relation? What if we need to assign translation files to design
        728c6d
        templates arbitrarily?
        728c6d

        728c6d

        Certenly, that's something the "one-to-one" configuration cannot

        728c6d
        handle.  So, that's why we had to "optimize" it. The optimized
        728c6d
        configuration consists on using a matching list (MATCHINGLIST)
        728c6d
        variable that specifies the relationship between translation files and
        728c6d
        design templates in an arbitrary way. Using such matching list between
        728c6d
        translation files and design templates let us use as many assignment
        728c6d
        combinations as translation files and design templates we are working
        728c6d
        with.
        728c6d

        728c6d

        The MATCHINGLIST variable is set in the pre-rendition

        728c6d
        configuration script of the component we want to produce images for.
        728c6d
        By default, the MATCHINGLIST variable is empty which means no
        728c6d
        matching list is used. Otherwise, if MATCHINGLIST variable has a
        728c6d
        value different to empty value then, <tt>`centos-art.sh'</tt> interprets
        728c6d
        the matching list in order to know how translation files are applied
        728c6d
        to design templates.
        728c6d

        728c6d

        For example, consider the following configuration:

        728c6d

        728c6d
        728c6d
        One entry under <tt>`trunk/Identity/'</tt>:
        728c6d
        728c6d

        In this configuration we want to produce three images using a

        728c6d
        paragraph-based style, controlled by <tt>`paragraph.svg'</tt> design
        728c6d
        template; and one image using a list-based style, controlled by
        728c6d
        <tt>`list.svg'</tt> design template.
        728c6d

        728c6d
        trunk/Identity/Path/To/Dir
        728c6d
        |-- Tpl
        728c6d
        |   |-- paragraph.svg
        728c6d
        |   `-- list.svg
        728c6d
        `-- Img
        728c6d
            |-- 01-welcome.png
        728c6d
            |-- 02-donate.png
        728c6d
            |-- 03-docs.png
        728c6d
            `-- 04-support.png
        728c6d
        728c6d
        728c6d
        One entry under <tt>`trunk/Translations/'</tt>:
        728c6d
        728c6d

        In order to produce translated images we need to have one translation

        728c6d
        file for each translated image we want to produce. Notice how
        728c6d
        translation names do match final image file names, but how translation
        728c6d
        names do not match design template names. When we use matching list
        728c6d
        there is no need for translation files to match the names of design
        728c6d
        templates, such name relation is set inside the matching list itself.
        728c6d

        728c6d
        trunk/Translations/Identity/Path/To/Dir
        728c6d
        |-- 01-welcome.sed
        728c6d
        |-- 02-donate.sed
        728c6d
        |-- 03-docs.sed
        728c6d
        `-- 04-support.sed
        728c6d
        728c6d
        728c6d
        One entry under <tt>`trunk/trunk/Scripts/Bash/Functions/Render/Config/'</tt>:
        728c6d
        728c6d

        In order to produce different translated images using specific design

        728c6d
        templates, we need to specify the relation between translation files
        728c6d
        and design templates in a way that <tt>`centos-art.sh'</tt> could know
        728c6d
        exactly what translation file to apply to what design template. This
        728c6d
        relation between translation files and design templates is set using
        728c6d
        the matching list MATCHINGLIST variable inside the pre-rendition
        728c6d
        configuration script of the component we want to produce images for.  
        728c6d

        728c6d
        trunk/Scripts/Bash/Functions/Render/Config/Identity/Path/To/Dir
        728c6d
        `-- render.conf.sh
        728c6d
        728c6d

        In this configuration the pre-rendition configuration script

        728c6d
        (<tt>`render.conf.sh'</tt>) would look like the following:
        728c6d

        728c6d
        function render_loadConfig {
        728c6d
        728c6d
            # Define rendition actions.
        728c6d
            ACTIONS[0]='BASE:renderImage'
        728c6d
        728c6d
            # Define matching list.
        728c6d
            MATCHINGLIST="\
        728c6d
            paragraph.svg:\
        728c6d
                01-welcome.sed\
        728c6d
                02-donate.sed\
        728c6d
                04-support.sed
        728c6d
            list.svg:\
        728c6d
                03-docs.sed
        728c6d
            "
        728c6d
        728c6d
        }
        728c6d
        728c6d

        As result, <tt>`centos-art.sh'</tt> will produce <tt>`01-welcome.png'</tt>,

        728c6d
        <tt>`02-donate.png'</tt> and <tt>`04-support.png'</tt> using the
        728c6d
        paragraph-based design template, but <tt>`03-docs.png'</tt> using the
        728c6d
        list-based design template.
        728c6d

        728c6d
        728c6d
        728c6d
        728c6d
        728c6d

        2.68.1.4 Design template with translation (optimized+flexibility)

        728c6d
        728c6d

        In the production models we've seen so far, there are design templates

        728c6d
        to produce untranslated images and translation files which combiend
        728c6d
        with design templates produce translated images. That may seems like
        728c6d
        all our needs are covered, doesn't it? Well, it almost does.
        728c6d

        728c6d

        Generally, we use design templates to define how final images will

        728c6d
        look like. Generally, each renderable directory structure has one
        728c6d
        <tt>`Tpl/'</tt> directory where we organize design templates for that
        728c6d
        identity component. So, we can say that there is only one unique
        728c6d
        design template definition for each identity component; or what is the
        728c6d
        same, said differently, identity components can be produced in one way
        728c6d
        only, the way its own design template directory specifies.  This is
        728c6d
        not enough for theme production. It is a limitation, indeed.
        728c6d

        728c6d

        Initially, to create one theme, we created one renderable directory

        728c6d
        structure for each theme component. When we found ourselves with many
        728c6d
        themes, and components inside them, it was obvious that the same
        728c6d
        design model was duplicated inside each theme. As design models were
        728c6d
        independently one another, if we changed one theme's design model,
        728c6d
        that change was useless to other themes. So, in order to reuse design
        728c6d
        model changes, we unified design models into one common directory
        728c6d
        structure.
        728c6d

        728c6d

        With design models unified in a common structure, another problem rose

        728c6d
        up. As design models also had the visual style of theme components,
        728c6d
        there was no difference between themes, so there was no apparent need
        728c6d
        to have an independent theme directory structure for each different
        728c6d
        theme.  So, it was also needed to separate visual styles from design
        728c6d
        models.
        728c6d

        728c6d

        At this point there are two independent worklines: one directory

        728c6d
        structure to store design models (the final image characteristics
        728c6d
        [i.e., dimensions, translation markers, etc.]) and one directory
        728c6d
        structure to store visual styles (the final image visual style [i.e.,
        728c6d
        the image look and feel]).  So, it is possible to handle both
        728c6d
        different design models and different visual styles independtly one
        728c6d
        another and later create combinations among them using
        728c6d
        <tt>`centos-art.sh'</tt>. 
        728c6d

        728c6d

        For example, consider the following configuration:

        728c6d

        728c6d
        728c6d
        One entry under <tt>`trunk/Identity/Themes/Models/'</tt>:
        728c6d
        728c6d

        The design model entry exists to organize design model files (similar

        728c6d
        to design templates). Both design models and design templates are very
        728c6d
        similar; they both should have the CENTOSARTWORK export id
        728c6d
        present to identify the exportation area, translation marks, etc.
        728c6d
        However, design models do use dynamic backgrounds inclusion while
        728c6d
        design templates don't.
        728c6d

        728c6d
                                THEMEMODEL | | The bond component
        728c6d
                                     |<----| |--------------------->|
        728c6d
        trunk/Identity/Themes/Models/Default/Distro/Anaconda/Progress/
        728c6d
        |-- paragraph.svg
        728c6d
        `-- list.svg
        728c6d
        728c6d

        Inisde design models, dynamic backgrounds are required in order for

        728c6d
        different artistic motifs to reuse common design models. Firstly, in
        728c6d
        order to create dynamic backgrounds inside design models, we import a
        728c6d
        bitmap to cover design model's background and later, update design
        728c6d
        model's path information to replace fixed values to dynamic values.
        728c6d

        728c6d
        728c6d
        One entry under <tt>`trunk/Identity/Themes/Motifs/'</tt>:
        728c6d
        728c6d

        The artistic motif entry defines the visual style we want to produce

        728c6d
        images for, only. Final images (i.e., those built from combining both
        728c6d
        design models and artistic motif backrounds) are not stored here, but
        728c6d
        under branches directory structure. In the artistic motif entry, we
        728c6d
        only define those images that cannot be produced automatically by
        728c6d
        <tt>`centos-art.sh'</tt> (e.g., Backgrounds, Color information,
        728c6d
        Screenshots, etc.).
        728c6d

        728c6d
                          Artistic motif name | | Artistic motif backgrounds
        728c6d
                                     |<-------| |-------->|
        728c6d
        trunk/Identity/Themes/Motifs/TreeFlower/Backgrounds/
        728c6d
        |-- Img
        728c6d
        |   |-- Png
        728c6d
        |   |   |-- 510x300.png
        728c6d
        |   |   `-- 510x300-final.png
        728c6d
        |   `-- Jpg
        728c6d
        |       |-- 510x300.jpg
        728c6d
        |       `-- 510x300-final.jpg
        728c6d
        |-- Tpl
        728c6d
        |   `-- 510x300.svg
        728c6d
        `-- Xcf
        728c6d
            `-- 510x300.xcf
        728c6d
        728c6d
        728c6d
        One entry under <tt>`trunk/Translations/'</tt>:
        728c6d
        728c6d

        The translation entry specifies, by means of translation files, the

        728c6d
        language-specific information we want to produce image for. When we
        728c6d
        create the translation entry we don't use the name of neither design
        728c6d
        model nor artistic motif, just the design model component we want to
        728c6d
        produce images for.
        728c6d

        728c6d
                                           | The bond component
        728c6d
                                           |--------------------->|
        728c6d
        trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
        728c6d
        `-- 5
        728c6d
            |-- en
        728c6d
            |   |-- 01-welcome.sed
        728c6d
            |   |-- 02-donate.sed
        728c6d
            |   `-- 03-docs.sed
        728c6d
            `-- es
        728c6d
                |-- 01-welcome.sed
        728c6d
                |-- 02-donate.sed
        728c6d
                `-- 03-docs.sed
        728c6d
        728c6d
        728c6d
        One entry under <tt>`trunk/Scripts/Bash/Functions/Render/Config/'</tt>:
        728c6d
        728c6d

        There is one pre-rendition configuration script for each theme

        728c6d
        component. So, each time a theme component is rendered, its
        728c6d
        pre-rendition configuration script is evaluated to teach
        728c6d
        <tt>`centos-art.sh'</tt> how to render the component.
        728c6d

        728c6d
        trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Progress/
        728c6d
        `-- render.conf.sh
        728c6d
        728c6d

        In this configuration the pre-rendition configuration script

        728c6d
        (<tt>`render.conf.sh'</tt>) would look like the following:
        728c6d

        728c6d
        function render_loadConfig {
        728c6d
        728c6d
            # Define rendition actions.
        728c6d
            ACTIONS[0]='BASE:renderImage'
        728c6d
        728c6d
            # Define matching list.
        728c6d
            MATCHINGLIST="\
        728c6d
            paragraph.svg:\
        728c6d
                01-welcome.sed\
        728c6d
                02-donate.sed
        728c6d
            list.svg:\
        728c6d
                03-docs.sed
        728c6d
                "
        728c6d
        728c6d
            # Deifne theme model.
        728c6d
            THEMEMODEL='Default'
        728c6d
        728c6d
        }
        728c6d
        728c6d
        728c6d
        728c6d

        The production flow of "optimize+flexibility" configuration…

        728c6d

        728c6d
        728c6d

        2.68.2 Renderable translation directory structures

        728c6d
        728c6d

        Translation directory structures are auxiliar structures of renderable

        728c6d
        identity directory structures. There is one translation directory
        728c6d
        structure for each renderable identity directory structure.  Inside
        728c6d
        translation directory structures we organize translation files used by
        728c6d
        renderable identity directory structures that produce translated
        728c6d
        images. Renderable identity directory structures that produce
        728c6d
        untranslated images don't use translation files, but they do use a
        728c6d
        translation directory structure, an empty translation directory
        728c6d
        structure, to be precise.
        728c6d

        728c6d

        In order to aliviate production of translation file, we made

        728c6d
        translation directory structures renderable adding a template
        728c6d
        (<tt>`Tpl/'</tt>) directory structure to handle common content inside
        728c6d
        translation files.  This way, we work on translation templates and
        728c6d
        later use <tt>`centos-art.sh'</tt> to produce specific translation files
        728c6d
        (based on translation templates) for different information (e.g.,
        728c6d
        languages, release numbers, architectures, etc.).  
        728c6d

        728c6d

        If for some reason, translation files get far from translation

        728c6d
        templates and translation templates become incovenient to produce such
        728c6d
        translation files then, care should be taken to avoid replacing the
        728c6d
        content of translation files with the content of translation templates
        728c6d
        when <tt>`centos-art.sh'</tt> is executed to produce translation files
        728c6d
        from translation templates.
        728c6d

        728c6d

        Inside renderable translation directory structures,

        728c6d
        <tt>`centos-art.sh'</tt> can produce text-based files only.
        728c6d

        728c6d
        728c6d
        728c6d

        2.68.3 Copying renderable directory structures

        728c6d
        728c6d

        A renderable layout is formed by design models, design images,

        728c6d
        pre-rendition configuration scripts and translations files. This way,
        728c6d
        when we say to duplicate rendition stuff we are saying to duplicate
        728c6d
        these four directory structures (i.e., design models, design images,
        728c6d
        pre-rendition configuration scripts, and related translations files).
        728c6d

        728c6d

        When we duplicate directories, inside `trunk/Identity' directory

        728c6d
        structure, we need to be aware of renderable layout described above
        728c6d
        and the source location used to perform the duplication action.  The
        728c6d
        source location is relevant to centos-art.sh script in order to
        728c6d
        determine the required auxiliar information inside directory
        728c6d
        structures that need to be copied too (otherwise we may end up with
        728c6d
        orphan directory structures unable to be rendered, due the absence of
        728c6d
        required information).
        728c6d

        728c6d

        In order for a renderable directory structure to be valid, the new

        728c6d
        directory structure copied should match the following conditions:
        728c6d

        728c6d
          728c6d
        1. To have a unique directory structure under
        2. 728c6d
          <tt>`trunk/Identity'</tt>, organized by any one of the above
          728c6d
          organizational designs above.
          728c6d
          728c6d
        3. To have a unique directory structure under
        4. 728c6d
          <tt>`trunk/Translations'</tt> to store translation files.
          728c6d
          728c6d
        5. To have a unique directory structure under
        6. 728c6d
          <tt>`trunk/Scripts/Bash/Functions/Render/Config'</tt> to set pre-rendition
          728c6d
          configuration script.
          728c6d
          728c6d
          728c6d

          As convenction, the render_doCopy function uses

          728c6d
          <tt>`trunk/Identity'</tt> directory structure as source location.  Once
          728c6d
          the <tt>`trunk/Identity'</tt> directory structure has been specified and
          728c6d
          verified, the related path information is built from it and copied
          728c6d
          automatically to the new location specified by FLAG_TO variable.
          728c6d

          728c6d

          Design templates + No translation:

          728c6d

          728c6d

          Command:

          728c6d
          - centos-art render -copy=trunk/Identity/Path/To/Dir -to=trunk/Identity/NewPath/To/Dir
          728c6d

          728c6d

          Sources:

          728c6d
          - trunk/Identity/Path/To/Dir
          728c6d
          - trunk/Translations/Identity/Path/To/Dir
          728c6d
          - trunk/Scripts/Bash/Functions/Render/Config/Identity/Path/To/Dir
          728c6d

          728c6d

          Targets:

          728c6d
          - trunk/Identity/NewPath/To/Dir
          728c6d
          - trunk/Translations/Identity/NewPath/To/Dir
          728c6d
          - trunk/Scripts/Bash/Functions/Render/Config/Identity/NewPath/To/Dir
          728c6d

          728c6d

          Renderable layout 2:

          728c6d

          728c6d

          Command:

          728c6d
          - centos-art render -copy=trunk/Identity/Themes/Motifs/TreeFlower \
          728c6d
                              -to=trunk/Identity/Themes/Motifs/NewPath/To/Dir
          728c6d

          728c6d

          Sources:

          728c6d
          - trunk/Identity/Themes/Motifs/TreeFlower
          728c6d
          - trunk/Translations/Identity/Themes
          728c6d
          - trunk/Translations/Identity/Themes/Motifs/TreeFlower
          728c6d
          - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes
          728c6d
          - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Motifs/TreeFlower
          728c6d

          728c6d

          Targets:

          728c6d
          - trunk/Identity/Themes/Motifs/NewPath/To/Dir
          728c6d
          - trunk/Translations/Identity/Themes
          728c6d
          - trunk/Translations/Identity/Themes/Motifs/NewPath/To/Dir
          728c6d
          - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes
          728c6d
          - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Motifs/NewPath/To/Dir
          728c6d

          728c6d

          Notice that design models are not included in source or target

          728c6d
          locations. This is intentional. In "Renderable layout 2", design
          728c6d
          models live by their own, they just exist, they are there, available
          728c6d
          for any artistic motif to use. By default `Themes/Models/Default'
          728c6d
          design model directory structure is used, but other design models
          728c6d
          directory structures (under Themes/Models/) can be created and used
          728c6d
          changing the value of THEMEMODEL variable inside the pre-rendition
          728c6d
          configuration script of the artistic motif source location you want to
          728c6d
          produce.
          728c6d

          728c6d

          Notice how translations and pre-rendition configuration scripts may

          728c6d
          both be equal in source and target. This is because such structures
          728c6d
          are common to all artistic motifs (the default values to use when no
          728c6d
          specific values are provided).
          728c6d

          728c6d

          - The common directory structures are not copied or deleted. We cannot

          728c6d
            copy a directory structure to itself.
          728c6d

          728c6d

          - The common directory structures represent the default value to use

          728c6d
            when no specific translations and/or pre-rendition configuration
          728c6d
            script are provided inside source location.
          728c6d

          728c6d

          - The specific directory structures, if present, are both copiable and

          728c6d
            removable. This is, when you perform a copy or delete action from
          728c6d
            source, that source specific auxiliar directories are transfered in
          728c6d
            the copy action to a new location (that specified by FLAG_TO
          728c6d
            variable).
          728c6d

          728c6d

          - When translations and/or pre-rendition configuration scripts are

          728c6d
            found inside the source directory structure, the centos-art.sh
          728c6d
            script loads common auxiliar directories first and later specific
          728c6d
            auxiliar directories.  This way, identity rendition of source
          728c6d
            locations can be customized idividually over the base of common
          728c6d
            default values.
          728c6d

          728c6d

          - The specific auxiliar directories are optional.

          728c6d

          728c6d

          - The common auxiliar directories should be present always. This is,

          728c6d
            in order to provide the information required by render functionality
          728c6d
            (i.e., to make it functional in the more basic level of its
          728c6d
            existence).
          728c6d

          728c6d

          Notice how the duplication process is done from `trunk/Identity' on,

          728c6d
          not the oposite. If you try to duplicate a translation structure (or
          728c6d
          similar auxiliar directory structures like pre-rendition configuration
          728c6d
          scripts), the `trunk/Identity' for that translation is not created.
          728c6d
          This limitation is impossed by the fact that many `trunk/Identity'
          728c6d
          directory structures may reuse/share the same translation directory
          728c6d
          structure. We cannot delete one translation (or similar) directory
          728c6d
          structures while a related `trunk/Identity/' directory structure is
          728c6d
          still in need of it.
          728c6d

          728c6d

          The `render_doCopy' functionality does duplicate directory structures

          728c6d
          directly involved in rendition process only. Once such directories
          728c6d
          have been duplicated, the functionality stops thereat. 
          728c6d

          728c6d
          728c6d
          728c6d

          2.68.4 Usage

          728c6d
          728c6d
            728c6d
          • ...
          • 728c6d
            728c6d
            728c6d
            728c6d
            728c6d

            2.68.5 See also

            728c6d
            728c6d
            728c6d
            728c6d
            728c6d
            [Contents]
            728c6d
            [Index]
            728c6d
            [ ? ]
            728c6d
            728c6d

            728c6d
             <font size="-1">
            728c6d
              This document was generated on March, 30 2011 using texi2html 1.76.
            728c6d
             </font>
            728c6d
             
            728c6d
            728c6d

            728c6d
            </body>
            728c6d
            </html>