Blame Manuals/Repository/repository-html/repository_58.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>
fa7cae
<title>CentOS Artwork Repository: 3.55 trunk/Scripts/Bash/Functions/Render</title>
4c79b5
fa7cae
<meta name="description" content="CentOS Artwork Repository: 3.55 trunk/Scripts/Bash/Functions/Render">
fa7cae
<meta name="keywords" content="CentOS Artwork Repository: 3.55 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
fa7cae
[ < ]
fa7cae
[ > ]
4c79b5
   
4c79b5
[ << ]
300762
[ Up ]
fa7cae
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
fa7cae
[Index]
4c79b5
[ ? ]
4c79b5
fa7cae
fa7cae
fa7cae

3.55 trunk/Scripts/Bash/Functions/Render

3f9ae1
fa7cae

The render functionality exists to produce both identity and

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

fa7cae

The render functionality relies on "renderable directory

fa7cae
structures" to produce files. Renderable directory structures can be
fa7cae
either "identity directory structures" or "translation directory
fa7cae
structures" with special directories inside.
4a9d2a

008ee0
fa7cae
fa7cae

3.55.1 Renderable identity directory structures

008ee0
fa7cae

Renderable identity directory structures are the starting point of

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

fa7cae

Inside the working copy, one renderable identity directory structures

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

fa7cae

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

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

fa7cae

Inside renderable identity directory structures, content production is

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

2dc146
fa7cae
fa7cae

3.55.1.1 Design template without translation

2dc146
fa7cae

The design template without translation configuration is based on a

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

fa7cae

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

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

fa7cae
fa7cae
One renderable identity directory structure:
fa7cae
fa7cae

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

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

fa7cae

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

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

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

Inside design template directory, design template files are based on

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

fa7cae

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

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

fa7cae

The CENTOSARTWORK word itself is a convenction name we use to

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

fa7cae
info

Note

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

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

2dc146
fa7cae

When a renderable identity directory structure is configured to

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

fa7cae

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

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

fa7cae

See section trunk/Identity, for more information.

fa7cae

fa7cae
fa7cae
One translation directory structure:
fa7cae
fa7cae

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

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

fa7cae

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

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

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

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

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

fa7cae

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

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

fa7cae

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

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

fa7cae

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

fa7cae

fa7cae
fa7cae
One pre-rendition configuration script:
fa7cae
fa7cae

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

fa7cae
function render_loadConfig {
2dc146
fa7cae
    # Define rendition actions.
2dc146
    ACTIONS[0]='BASE:renderImage'
2dc146
2dc146
}
4a9d2a
fa7cae

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

fa7cae
assumes a "design template without translation" configuration to
fa7cae
produce untranslated images.
4a9d2a

fa7cae

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

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

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

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

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

fa7cae

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

fa7cae
information.
fa7cae

fa7cae
2dc146
2dc146
fa7cae
fa7cae

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

fa7cae
fa7cae

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

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

fa7cae

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

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

fa7cae

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

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

fa7cae

The pre-rendition configuration script used to produce untranslated

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

fa7cae
info

Note

If we use no translation file in the translation entry

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

4a9d2a
fa7cae

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

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

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

3.55.1.3 Design template with translation (optimized)

fa7cae
fa7cae

Producing translated images satisfies almost all our production images

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

fa7cae

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

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

fa7cae

The MATCHINGLIST variable is set in the pre-rendition

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

fa7cae

For example, consider the following configuration:

fa7cae

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

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

fa7cae
6ba043
b8013f
fa7cae
fa7cae

3.55.1.4 Design template with translation (optimized+flexibility)

fa7cae
fa7cae

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

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

fa7cae

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

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

fa7cae

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

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

fa7cae

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

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

fa7cae

At this point there are two independent worklines: one directory

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

fa7cae

For example, consider the following configuration:

2dc146

4a9d2a
fa7cae
One entry under <tt>`trunk/Identity/Themes/Models/'</tt>:
2dc146
fa7cae

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

2dc146
fa7cae
One entry under <tt>`trunk/Identity/Themes/Motifs/'</tt>:
2dc146
fa7cae

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

fa7cae

fa7cae
fa7cae

3.55.2 Renderable translation directory structures

fa7cae
fa7cae

Translation directory structures are auxiliar structures of renderable

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

fa7cae

In order to aliviate production of translation file, we made

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

fa7cae

If for some reason, translation files get far from translation

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

fa7cae

Inside renderable translation directory structures,

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

b8013f
fa7cae
fa7cae

3.55.3 Copying renderable directory structures

fa7cae
fa7cae

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

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

fa7cae

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

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

fa7cae

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

fa7cae
directory structure copied should match the following conditions:
fa7cae

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

    As convenction, the render_doCopy function uses

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

    fa7cae

    Design templates + No translation:

    fa7cae

    fa7cae

    Command:

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

    fa7cae

    Sources:

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

    fa7cae

    Targets:

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

    fa7cae

    Renderable layout 2:

    fa7cae

    fa7cae

    Command:

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

    fa7cae

    Sources:

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

    fa7cae

    Targets:

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

    fa7cae

    Notice that design models are not included in source or target

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

    fa7cae

    Notice how translations and pre-rendition configuration scripts may

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

    fa7cae

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

    fa7cae
      copy a directory structure to itself.
    fa7cae

    fa7cae

    - The common directory structures represent the default value to use

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

    fa7cae

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

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

    fa7cae

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

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

    fa7cae

    - The specific auxiliar directories are optional.

    fa7cae

    fa7cae

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

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

    fa7cae

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

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

    fa7cae

    The `render_doCopy' functionality does duplicate directory structures

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

    fa7cae
    fa7cae
    fa7cae

    3.55.4 Usage

    fa7cae
    fa7cae
      fa7cae
    • ...
    • fa7cae
      fa7cae
      fa7cae
      fa7cae
      fa7cae

      3.55.5 See also

      300762
      4a9d2a
      fa7cae
      3.56 trunk/Scripts/Bash/Functions/Render/Config  
      4a9d2a
      4a9d2a
      bc3531
      38bcd9
      300762
      fa7cae
      [ < ]
      fa7cae
      [ > ]
      300762
         
      300762
      [ << ]
      fa7cae
      [ Up ]
      fa7cae
      [ >> ]
      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>