Blame Identity/Manual/repository-html/repository_75.html

632e8b
632e8b
<html>
632e8b
632e8b
organization, and administration of CentOS Artwork Repository.
632e8b
632e8b
Copyright C 2009-2011 Alain Reguera Delgado
632e8b
632e8b
Permission is granted to copy, distribute and/or modify this document
632e8b
under the terms of the GNU Free Documentation License, Version 1.2 or
632e8b
any later version published by the Free Software Foundation; with no
632e8b
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
632e8b
copy of the license is included in the section entitled GNU Free
632e8b
Documentation License.  
632e8b
-->
f456e5
632e8b
632e8b
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
632e8b
            Karl Berry  <karl@freefriends.org>
632e8b
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
632e8b
            and many others.
632e8b
Maintained by: Many creative people <dev@texi2html.cvshome.org>
632e8b
Send bugs and suggestions to <users@texi2html.cvshome.org>
632e8b
632e8b
-->
632e8b
<head>
ed9de5
<title>CentOS Artwork Repository: 2.68 The trunk/Scripts/Functions/Render Directory</title>
632e8b
ed9de5
<meta name="description" content="CentOS Artwork Repository: 2.68 The trunk/Scripts/Functions/Render Directory">
ed9de5
<meta name="keywords" content="CentOS Artwork Repository: 2.68 The trunk/Scripts/Functions/Render Directory">
632e8b
<meta name="resource-type" content="document">
632e8b
<meta name="distribution" content="global">
632e8b
<meta name="Generator" content="texi2html 1.76">
632e8b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
632e8b
<style type="text/css">
632e8b
f456e5
@import "/home/centos/artwork/trunk/Identity/Manual/repository.css";
632e8b
632e8b
a.summary-letter {text-decoration: none}
632e8b
pre.display {font-family: serif}
632e8b
pre.format {font-family: serif}
632e8b
pre.menu-comment {font-family: serif}
632e8b
pre.menu-preformatted {font-family: serif}
632e8b
pre.smalldisplay {font-family: serif; font-size: smaller}
632e8b
pre.smallexample {font-size: smaller}
632e8b
pre.smallformat {font-family: serif; font-size: smaller}
632e8b
pre.smalllisp {font-size: smaller}
632e8b
span.sansserif {font-family:sans-serif; font-weight:normal;}
632e8b
ul.toc {list-style: none}
632e8b
-->
632e8b
</style>
632e8b
632e8b
632e8b
</head>
632e8b
632e8b
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
632e8b
632e8b
ed9de5
[ < ]
ed9de5
[ > ]
632e8b
   
1075b9
[ << ]
1075b9
[ Up ]
ed9de5
[ >> ]
632e8b
   
632e8b
   
632e8b
   
632e8b
   
1075b9
[Top]
1075b9
[Contents]
ed9de5
[Index]
1075b9
[ ? ]
632e8b
ed9de5
ed9de5
ed9de5

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

632e8b
ed9de5

The render functionality exists to produce both identity and

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

ed9de5

The render functionality relies on "renderable directory

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

06d106
ed9de5
ed9de5

2.68.1 Renderable identity directory structures

9bfd15
ed9de5

Renderable identity directory structures are the starting point of

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

ed9de5

Inside the working copy, one renderable identity directory structures

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

ed9de5

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

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

ed9de5

Inside renderable identity directory structures, content production is

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

06d106
ed9de5
ed9de5

2.68.1.1 Design template without translation

632e8b
ed9de5

The design template without translation configuration is based on a

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

ed9de5

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

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

ed9de5
ed9de5
One renderable identity directory structure:
ed9de5
ed9de5

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

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

ed9de5

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

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

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

Inside design template directory, design template files are based on

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

ed9de5

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

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

ed9de5

The CENTOSARTWORK word itself is a convenction name we use to

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

f456e5
info

Note

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

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

06d106
ed9de5

When a renderable identity directory structure is configured to

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

ed9de5

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

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

ed9de5

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

ed9de5

ed9de5
ed9de5
One translation directory structure:
ed9de5
ed9de5

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

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

ed9de5

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

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

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

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

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

ed9de5

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

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

ed9de5

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

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

ed9de5

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

ed9de5

ed9de5
ed9de5
One pre-rendition configuration script:
ed9de5
ed9de5

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

ed9de5

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

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

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

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

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

ed9de5

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

ed9de5
information.
ed9de5

ed9de5
ed9de5
ed9de5
ed9de5
ed9de5

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

ed9de5
ed9de5

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

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

ed9de5

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

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

ed9de5

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

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

ed9de5

The pre-rendition configuration script used to produce untranslated

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

f456e5
info

Note

If we use no translation file in the translation entry

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

632e8b
ed9de5

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

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

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

2.68.1.3 Design template with translation (optimized)

632e8b
ed9de5

Producing translated images satisfies almost all our production images

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

ed9de5

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

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

ed9de5

The MATCHINGLIST variable is set in the pre-rendition

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

ed9de5

For example, consider the following configuration:

ed9de5

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

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

632e8b
632e8b
06d106
ed9de5
ed9de5

2.68.1.4 Design template with translation (optimized+flexibility)

ed9de5
ed9de5

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

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

ed9de5

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

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

ed9de5

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

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

ed9de5

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

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

ed9de5

At this point there are two independent worklines: one directory

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

ed9de5

For example, consider the following configuration:

ed9de5

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

ed9de5

ed9de5
ed9de5

2.68.2 Renderable translation directory structures

ed9de5
ed9de5

Translation directory structures are auxiliar structures of renderable

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

ed9de5

In order to aliviate production of translation file, we made

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

ed9de5

If for some reason, translation files get far from translation

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

ed9de5

Inside renderable translation directory structures,

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

ed9de5
ed9de5
ed9de5

2.68.3 Copying renderable directory structures

ed9de5
ed9de5

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

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

ed9de5

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

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

ed9de5

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

ed9de5
directory structure copied should match the following conditions:
ed9de5

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

    As convenction, the render_doCopy function uses

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

    ed9de5

    Design templates + No translation:

    ed9de5

    ed9de5

    Command:

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

    ed9de5

    Sources:

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

    ed9de5

    Targets:

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

    ed9de5

    Renderable layout 2:

    ed9de5

    ed9de5

    Command:

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

    ed9de5

    Sources:

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

    ed9de5

    Targets:

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

    ed9de5

    Notice that design models are not included in source or target

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

    ed9de5

    Notice how translations and pre-rendition configuration scripts may

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

    ed9de5

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

    ed9de5
      copy a directory structure to itself.
    ed9de5

    ed9de5

    - The common directory structures represent the default value to use

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

    ed9de5

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

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

    ed9de5

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

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

    ed9de5

    - The specific auxiliar directories are optional.

    ed9de5

    ed9de5

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

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

    ed9de5

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

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

    ed9de5

    The `render_doCopy' functionality does duplicate directory structures

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

    ed9de5
    ed9de5
    ed9de5

    2.68.4 Usage

    ed9de5
    ed9de5
      ed9de5
    • ...
    • ed9de5
      ed9de5
      ed9de5
      ed9de5
      ed9de5

      2.68.5 See also

      632e8b
      632e8b
      632e8b
      632e8b
      ed9de5
      [ < ]
      ed9de5
      [ > ]
      632e8b
         
      1075b9
      [ << ]
      ed9de5
      [ Up ]
      ed9de5
      [ >> ]
      632e8b
      632e8b

      632e8b
       <font size="-1">
      f456e5
        This document was generated on March, 24 2011 using texi2html 1.76.
      632e8b
       </font>
      632e8b
       
      632e8b
      632e8b

      632e8b
      </body>
      632e8b
      </html>