Blame Identity/Manual/repository-xhtml/repository_77.xhtml

c8f7b7
728c6d
728c6d
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
728c6d
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
728c6d
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
728c6d
<head>
632e8b
a6f1b3
    <title>CentOS Artwork Repository: 2.70 The trunk/Scripts/Functions/Render Directory</title>
c8f7b7
c8f7b7
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
a6f1b3
    <meta name="description" content="CentOS Artwork Repository: 2.70 The trunk/Scripts/Functions/Render Directory" />
a6f1b3
    <meta name="keywords" content="CentOS Artwork Repository: 2.70 The trunk/Scripts/Functions/Render Directory" />
728c6d
    <meta name="resource-type" content="document" />
728c6d
    <meta name="distribution" content="global" />
728c6d
    <meta name="generator" content="texi2html 1.76" />
728c6d
    <meta name="copyright" content="2009-2011 Alain Reguera Delgado" />
632e8b
c8f7b7
    <link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection" />
632e8b
728c6d
</head>
632e8b
728c6d
<body>
632e8b
728c6d
632e8b
728c6d
632e8b
728c6d
    
632e8b
728c6d
        
c8f7b7
a6f1b3
632e8b
a6f1b3
[ < ]
a6f1b3
[ > ]
632e8b
   
c8f7b7
[ << ]
c8f7b7
[ Up ]
a6f1b3
[ >> ]
632e8b
   
632e8b
   
632e8b
   
632e8b
   
c8f7b7
[Top]
c8f7b7
[Contents]
a6f1b3
[Index]
c8f7b7
[ ? ]
632e8b
a6f1b3
a6f1b3
a6f1b3

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

632e8b
a6f1b3

The render functionality exists to produce both identity and

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

a6f1b3

The render functionality relies on "renderable directory

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

728c6d

a6f1b3
a6f1b3

2.70.1 Renderable identity directory structures

52772c
a6f1b3

Renderable identity directory structures are the starting point of

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

a6f1b3

Inside the working copy, one renderable identity directory structures

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

a6f1b3

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

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

a6f1b3

Inside renderable identity directory structures, content production is

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

728c6d

a6f1b3
a6f1b3

2.70.1.1 Design template without translation

a6f1b3
a6f1b3

The design template without translation configuration is based on a

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

a6f1b3

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

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

a6f1b3
a6f1b3
One renderable identity directory structure:
a6f1b3
a6f1b3

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

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

a6f1b3

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

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

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

Inside design template directory, design template files are based on

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

a6f1b3

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

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

a6f1b3

The CENTOSARTWORK word itself is a convenction name we use to

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

a6f1b3
Info

Note

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

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

52772c
a6f1b3

When a renderable identity directory structure is configured to

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

a6f1b3

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

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

a6f1b3

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

a6f1b3

a6f1b3
a6f1b3
One translation directory structure:
a6f1b3
a6f1b3

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

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

a6f1b3

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

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

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

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

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

a6f1b3

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

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

a6f1b3

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

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

a6f1b3

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

52772c

a6f1b3
a6f1b3
One pre-rendition configuration script:
a6f1b3
a6f1b3

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

a6f1b3
function render_loadConfig {
a6f1b3
a6f1b3
    # Define rendition actions.
a6f1b3
    ACTIONS[0]='BASE:renderImage'
52772c
a6f1b3
}
ed9de5
a6f1b3

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

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

a6f1b3

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

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

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

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

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

a6f1b3

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

a6f1b3
information.
a6f1b3

a6f1b3
a6f1b3
a6f1b3

a6f1b3
a6f1b3

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

a6f1b3
a6f1b3

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

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

a6f1b3

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

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

a6f1b3

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

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

a6f1b3

The pre-rendition configuration script used to produce untranslated

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

a6f1b3
Info

Note

If we use no translation file in the translation entry

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

9bfd15
a6f1b3

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

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

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

a6f1b3
a6f1b3

2.70.1.3 Design template with translation (optimized)

52772c
a6f1b3

Producing translated images satisfies almost all our production images

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

a6f1b3

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

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

a6f1b3

The MATCHINGLIST variable is set in the pre-rendition

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

a6f1b3

For example, consider the following configuration:

a6f1b3

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

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

ed9de5
632e8b
a6f1b3

a6f1b3
a6f1b3

2.70.1.4 Design template with translation (optimized+flexibility)

a6f1b3
a6f1b3

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

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

a6f1b3

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

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

a6f1b3

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

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

a6f1b3

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

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

a6f1b3

At this point there are two independent worklines: one directory

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

a6f1b3

For example, consider the following configuration:

a6f1b3

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

a6f1b3


a6f1b3
a6f1b3

2.70.2 Renderable translation directory structures

a6f1b3
a6f1b3

Translation directory structures are auxiliar structures of renderable

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

a6f1b3

In order to aliviate production of translation file, we made

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

a6f1b3

If for some reason, translation files get far from translation

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

a6f1b3

Inside renderable translation directory structures,

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

a6f1b3

a6f1b3
a6f1b3

2.70.3 Copying renderable directory structures

a6f1b3
a6f1b3

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

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

a6f1b3

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

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

a6f1b3

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

a6f1b3
directory structure copied should match the following conditions:
a6f1b3

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

    As convenction, the render_doCopy function uses

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

    a6f1b3

    Design templates + No translation:

    a6f1b3

    a6f1b3

    Command:

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

    a6f1b3

    Sources:

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

    a6f1b3

    Targets:

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

    a6f1b3

    Renderable layout 2:

    a6f1b3

    a6f1b3

    Command:

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

    a6f1b3

    Sources:

    a6f1b3
    - trunk/Identity/Themes/Motifs/TreeFlower
    a6f1b3
    - trunk/Translations/Identity/Themes
    a6f1b3
    - trunk/Translations/Identity/Themes/Motifs/TreeFlower
    a6f1b3
    - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes
    a6f1b3
    - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Motifs/TreeFlower
    52772c

    a6f1b3

    Targets:

    a6f1b3
    - trunk/Identity/Themes/Motifs/NewPath/To/Dir
    a6f1b3
    - trunk/Translations/Identity/Themes
    a6f1b3
    - trunk/Translations/Identity/Themes/Motifs/NewPath/To/Dir
    a6f1b3
    - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes
    a6f1b3
    - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Motifs/NewPath/To/Dir
    52772c

    a6f1b3

    Notice that design models are not included in source or target

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

    a6f1b3

    Notice how translations and pre-rendition configuration scripts may

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

    a6f1b3

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

    a6f1b3
      copy a directory structure to itself.
    a6f1b3

    a6f1b3

    - The common directory structures represent the default value to use

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

    a6f1b3

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

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

    a6f1b3

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

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

    a6f1b3

    - The specific auxiliar directories are optional.

    a6f1b3

    a6f1b3

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

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

    a6f1b3

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

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

    a6f1b3

    The `render_doCopy' functionality does duplicate directory structures

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

    a6f1b3

    a6f1b3
    a6f1b3

    2.70.4 Usage

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

      ed9de5
      a6f1b3

      2.70.5 See also

      632e8b
      632e8b
      728c6d

      632e8b
      ed9de5
      [ < ]
      c8f7b7
      [ > ]
      632e8b
         
      c8f7b7
      [ << ]
      a6f1b3
      [ Up ]
      a6f1b3
      [ >> ]
      632e8b
      632e8b
      728c6d
                  

      728c6d
      728c6d
              
      728c6d
      728c6d
          
      728c6d
      728c6d
          

      728c6d
      728c6d
      728c6d
      632e8b
      </body>
      728c6d
      632e8b
      </html>