Blame Manuals/Repository/repository-html/repository_57.html

4c79b5
4c79b5
<html>
ccb7a3
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
-->
acd47b
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>
c2a1bc
<title>CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render</title>
4c79b5
c2a1bc
<meta name="description" content="CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render">
c2a1bc
<meta name="keywords" content="CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render">
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
300762
c2a1bc
[ < ]
c2a1bc
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
c2a1bc
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
c2a1bc
[Index]
4c79b5
[ ? ]
4c79b5
c2a1bc
c2a1bc
c2a1bc

3.54 trunk/Scripts/Bash/Functions/Render

b0644c
c2a1bc

The render functionality exists to produce both identity and

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

c2a1bc

The render functionality relies on "renderable directory

c2a1bc
structures" to produce files. Renderable directory structures can be
c2a1bc
either "identity directory structures" or "translation directory
c2a1bc
structures" with special directories inside.
2b5e61

2b5e61
7fa1fb
c2a1bc

3.54.1 Renderable identity directory structures

c2a1bc
c2a1bc

Renderable identity directory structures are the starting point of

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

c2a1bc

Inside the working copy, one renderable identity directory structures

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

c2a1bc

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

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

c2a1bc

Inside renderable identity directory structures, content production is

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

c2a1bc
c2a1bc
c2a1bc

3.54.1.1 Design template without translation

166893
c2a1bc

The design template without translation configuration is based on a

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

c2a1bc

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

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

c2a1bc
c2a1bc
One renderable identity directory structure:
c2a1bc
c2a1bc

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

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

c2a1bc

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

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

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

Inside design template directory, design template files are based on

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

c2a1bc

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

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

c2a1bc

The CENTOSARTWORK word itself is a convenction name we use to

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

c2a1bc
info

Note

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

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

2b5e61
c2a1bc

When a renderable identity directory structure is configured to

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

c2a1bc

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

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

c2a1bc

See section trunk/Identity, for more information.

c2a1bc

c2a1bc
c2a1bc
One translation directory structure:
c2a1bc
c2a1bc

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

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

c2a1bc

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

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

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

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

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

c2a1bc

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

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

c2a1bc

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

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

c2a1bc

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

c2a1bc

c2a1bc
c2a1bc
One pre-rendition configuration script:
c2a1bc
c2a1bc

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

c2a1bc
(<tt>`render.conf.sh'</tt>) would look like the following:
2b5e61

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

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

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

c2a1bc

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

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

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

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

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

c2a1bc

See section trunk/Scripts/Bash/Functions/Render/Config, for more

c2a1bc
information.
c2a1bc

c2a1bc
c2a1bc
166893
7fa1fb
c2a1bc

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

c2a1bc
c2a1bc

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

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

c2a1bc

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

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

c2a1bc

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

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

c2a1bc

The pre-rendition configuration script used to produce untranslated

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

c2a1bc
info

Note

If we use no translation file in the translation entry

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

c2a1bc
c2a1bc

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

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

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

3.54.1.3 Design template with translation (optimized)

c2a1bc
c2a1bc

Producing translated images satisfies almost all our production images

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

c2a1bc

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

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

c2a1bc

The MATCHINGLIST variable is set in the pre-rendition

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

c2a1bc

For example, consider the following configuration:

c2a1bc

2b5e61
c2a1bc
One entry under <tt>`trunk/Identity/'</tt>:
2b5e61
c2a1bc

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

2b5e61
2b5e61
7fa1fb
c2a1bc
c2a1bc

3.54.1.4 Design template with translation (optimized+flexibility)

c2a1bc
c2a1bc

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

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

c2a1bc

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

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

c2a1bc

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

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

c2a1bc

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

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

c2a1bc

At this point there are two independent worklines: one directory

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

c2a1bc

For example, consider the following configuration:

c2a1bc

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

c2a1bc

c2a1bc
c2a1bc

3.54.2 Renderable translation directory structures

c2a1bc
c2a1bc

Translation directory structures are auxiliar structures of renderable

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

c2a1bc

In order to aliviate production of translation file, we made

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

c2a1bc

If for some reason, translation files get far from translation

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

c2a1bc

Inside renderable translation directory structures,

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

c2a1bc
c2a1bc
c2a1bc

3.54.3 Copying renderable directory structures

c2a1bc
c2a1bc

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

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

c2a1bc

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

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

c2a1bc

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

c2a1bc
directory structure copied should match the following conditions:
c2a1bc

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

    As convenction, the render_doCopy function uses

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

    c2a1bc

    Design templates + No translation:

    c2a1bc

    c2a1bc

    Command:

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

    c2a1bc

    Sources:

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

    c2a1bc

    Targets:

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

    c2a1bc

    Renderable layout 2:

    c2a1bc

    c2a1bc

    Command:

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

    c2a1bc

    Sources:

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

    c2a1bc

    Targets:

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

    c2a1bc

    Notice that design models are not included in source or target

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

    c2a1bc

    Notice how translations and pre-rendition configuration scripts may

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

    c2a1bc

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

    c2a1bc
      copy a directory structure to itself.
    c2a1bc

    c2a1bc

    - The common directory structures represent the default value to use

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

    c2a1bc

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

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

    c2a1bc

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

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

    c2a1bc

    - The specific auxiliar directories are optional.

    c2a1bc

    c2a1bc

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

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

    c2a1bc

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

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

    c2a1bc

    The `render_doCopy' functionality does duplicate directory structures

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

    c2a1bc
    c2a1bc
    c2a1bc

    3.54.4 Usage

    c2a1bc
    c2a1bc
      c2a1bc
    • ...
    • c2a1bc
      c2a1bc
      c2a1bc
      c2a1bc
      c2a1bc

      3.54.5 See also

      300762
      ec5f63
      c2a1bc
      3.55 trunk/Scripts/Bash/Functions/Render/Config  
      ec5f63
      ec5f63
      ec5f63
      300762
      300762
      c2a1bc
      [ < ]
      c2a1bc
      [ > ]
      300762
         
      300762
      [ << ]
      c2a1bc
      [ Up ]
      c2a1bc
      [ >> ]
      300762
      4c79b5

      4c79b5
       <font size="-1">
      acd47b
        This document was generated on February, 26 2011 using texi2html 1.76.
      4c79b5
       </font>
      4c79b5
       
      4c79b5
      4c79b5

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