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
-->
bf28e1
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>
7e35dc
<title>CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render</title>
4c79b5
7e35dc
<meta name="description" content="CentOS Artwork Repository: 3.54 trunk/Scripts/Bash/Functions/Render">
7e35dc
<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
af3979
[ < ]
af3979
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
af3979
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
af3979
[Index]
4c79b5
[ ? ]
4c79b5
7e35dc
af3979
7e35dc

3.54 trunk/Scripts/Bash/Functions/Render

b0644c
7e35dc

The render functionality exists to produce both identity and

7e35dc
translation files on different levels of information (i.e., different
7e35dc
languages, release numbers, architectures, etc.).
2b5e61

7e35dc

The render functionality relies on "renderable directory

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

c2a1bc
af3979
7e35dc

3.54.1 Renderable identity directory structures

7e35dc
7e35dc

Renderable identity directory structures are the starting point of

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

7e35dc

Inside the working copy, one renderable identity directory structures

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

7e35dc

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

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

7e35dc

Inside renderable identity directory structures, content production is

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

7e35dc
af3979
7e35dc

3.54.1.1 Design template without translation

2b5e61
7e35dc

The design template without translation configuration is based on a

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

7e35dc

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

7e35dc
use in producing text-based files without translations), consider the
7e35dc
following configuration:
2b5e61

7e35dc
7e35dc
One renderable identity directory structure:
7e35dc
7e35dc

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

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

7e35dc

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

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

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

Inside design template directory, design template files are based on

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

7e35dc

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

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

7e35dc

The CENTOSARTWORK word itself is a convenction name we use to

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

7e35dc
info

Note

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

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

c2a1bc
7e35dc

When a renderable identity directory structure is configured to

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

7e35dc

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

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

7e35dc

See section trunk/Identity, for more information.

7e35dc

7e35dc
7e35dc
One translation directory structure:
7e35dc
7e35dc

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

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

7e35dc

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

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

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

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

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

7e35dc

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

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

7e35dc

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

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

7e35dc

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

7e35dc

7e35dc
7e35dc
One pre-rendition configuration script:
7e35dc
7e35dc

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

7e35dc

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

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

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

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

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

af3979

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

7e35dc
information.
7e35dc

7e35dc
7e35dc
2b5e61
af3979
7e35dc

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

7e35dc
7e35dc

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

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

7e35dc

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

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

7e35dc

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

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

7e35dc

The pre-rendition configuration script used to produce untranslated

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

7e35dc
info

Note

If we use no translation file in the translation entry

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

7e35dc
7e35dc

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

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

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

3.54.1.3 Design template with translation (optimized)

7e35dc
7e35dc

Producing translated images satisfies almost all our production images

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

7e35dc

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

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

7e35dc

The MATCHINGLIST variable is set in the pre-rendition

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

7e35dc

For example, consider the following configuration:

7e35dc

c2a1bc
7e35dc
One entry under <tt>`trunk/Identity/'</tt>:
c2a1bc
7e35dc

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

c2a1bc
c2a1bc
bf28e1
af3979
7e35dc

3.54.1.4 Design template with translation (optimized+flexibility)

7e35dc
7e35dc

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

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

7e35dc

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

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

7e35dc

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

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

7e35dc

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

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

7e35dc

At this point there are two independent worklines: one directory

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

7e35dc

For example, consider the following configuration:

7e35dc

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

7e35dc

af3979
7e35dc

3.54.2 Renderable translation directory structures

7e35dc
7e35dc

Translation directory structures are auxiliar structures of renderable

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

7e35dc

In order to aliviate production of translation file, we made

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

7e35dc

If for some reason, translation files get far from translation

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

7e35dc

Inside renderable translation directory structures,

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

7e35dc
af3979
7e35dc

3.54.3 Copying renderable directory structures

7e35dc
7e35dc

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

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

7e35dc

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

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

7e35dc

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

7e35dc
directory structure copied should match the following conditions:
7e35dc

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

    As convenction, the render_doCopy function uses

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

    7e35dc

    Design templates + No translation:

    7e35dc

    7e35dc

    Command:

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

    7e35dc

    Sources:

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

    7e35dc

    Targets:

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

    7e35dc

    Renderable layout 2:

    7e35dc

    7e35dc

    Command:

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

    7e35dc

    Sources:

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

    7e35dc

    Targets:

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

    7e35dc

    Notice that design models are not included in source or target

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

    7e35dc

    Notice how translations and pre-rendition configuration scripts may

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

    7e35dc

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

    7e35dc
      copy a directory structure to itself.
    7e35dc

    7e35dc

    - The common directory structures represent the default value to use

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

    7e35dc

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

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

    7e35dc

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

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

    7e35dc

    - The specific auxiliar directories are optional.

    7e35dc

    7e35dc

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

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

    7e35dc

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

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

    7e35dc

    The `render_doCopy' functionality does duplicate directory structures

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

    7e35dc
    af3979
    7e35dc

    3.54.4 Usage

    7e35dc
    7e35dc
      7e35dc
    • ...
    • 7e35dc
      7e35dc
      7e35dc
      af3979
      7e35dc

      3.54.5 See also

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

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

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