Blame Manual/repository-html/repository_73.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
-->
9bfd15
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>
9bfd15
<title>CentOS Artwork Repository: 2.69 The trunk/Scripts/Bash/Cli/Functions/Render Directory</title>
632e8b
9bfd15
<meta name="description" content="CentOS Artwork Repository: 2.69 The trunk/Scripts/Bash/Cli/Functions/Render Directory">
9bfd15
<meta name="keywords" content="CentOS Artwork Repository: 2.69 The trunk/Scripts/Bash/Cli/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
632e8b
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.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
9bfd15
[ < ]
9bfd15
[ > ]
632e8b
   
632e8b
[ << ]
632e8b
[ Up ]
9bfd15
[ >> ]
632e8b
   
632e8b
   
632e8b
   
632e8b
   
632e8b
[Top]
632e8b
[Contents]
9bfd15
[Index]
632e8b
[ ? ]
632e8b
9bfd15
ff7772
9bfd15

2.69 The <tt>`trunk/Scripts/Bash/Cli/Functions/Render'</tt> Directory

632e8b
9bfd15

The render functionality exists to produce both identity and

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

9bfd15

The render functionality relies on "renderable directory

9bfd15
structures" to produce files. Renderable directory structures can be
9bfd15
either "identity directory structures" or "translation directory
9bfd15
structures" with special directories inside.
632e8b

632e8b
ff7772
9bfd15

2.69.1 Renderable identity directory structures

632e8b
9bfd15

Renderable identity directory structures are the starting point of

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

9bfd15

Inside the working copy, one renderable identity directory structures

9bfd15
represents one visual manifestation of CentOS corporate visual
9bfd15
identity, or said differently, each visual manifestation of CentOS
9bfd15
corporate visual identity should have one renderable identity
9bfd15
directory structure.
632e8b

9bfd15

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

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

9bfd15

Inside renderable identity directory structures, content production is

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

632e8b
ff7772
9bfd15

2.69.1.1 Design template without translation

9bfd15
9bfd15

The design template without translation configuration is based on a

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

9bfd15

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

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

9bfd15
9bfd15
One renderable identity directory structure:
9bfd15
9bfd15

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

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

9bfd15

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

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

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

Inside design template directory, design template files are based on

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

9bfd15

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

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

9bfd15

The CENTOSARTWORK word itself is a convenction name we use to

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

9bfd15
info

Note

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

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

632e8b
9bfd15

When a renderable identity directory structure is configured to

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

9bfd15

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

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

9bfd15

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

9bfd15

9bfd15
9bfd15
One translation directory structure:
9bfd15
9bfd15

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

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

9bfd15

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

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

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

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

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

9bfd15

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

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

9bfd15

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

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

9bfd15

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

9bfd15

9bfd15
9bfd15
One pre-rendition configuration script:
9bfd15
9bfd15

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

9bfd15
function render_loadConfig {
632e8b
9bfd15
    # Define rendition actions.
632e8b
    ACTIONS[0]='BASE:renderImage'
632e8b
632e8b
}
632e8b
9bfd15

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

9bfd15
assumes a "design template without translation" configuration to
9bfd15
produce untranslated images.
632e8b

9bfd15

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

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

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

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

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

9bfd15

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

9bfd15
information.
9bfd15

9bfd15
9bfd15
632e8b
ff7772
9bfd15

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

9bfd15
9bfd15

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

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

9bfd15

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

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

9bfd15

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

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

9bfd15

The pre-rendition configuration script used to produce untranslated

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

9bfd15
info

Note

If we use no translation file in the translation entry

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

632e8b
9bfd15

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

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

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

2.69.1.3 Design template with translation (optimized)

9bfd15
9bfd15

Producing translated images satisfies almost all our production images

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

9bfd15

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

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

9bfd15

The MATCHINGLIST variable is set in the pre-rendition

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

9bfd15

For example, consider the following configuration:

9bfd15

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

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

9bfd15
trunk/Scripts/Bash/Functions/Render/Config/Identity/Path/To/Dir
9bfd15
`-- render.conf.sh
632e8b
9bfd15

In this configuration the pre-rendition configuration script

9bfd15
(<tt>`render.conf.sh'</tt>) would look like the following:
632e8b

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

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

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

9bfd15
9bfd15
632e8b
ff7772
9bfd15

2.69.1.4 Design template with translation (optimized+flexibility)

632e8b
9bfd15

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

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

9bfd15

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

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

9bfd15

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

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

9bfd15

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

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

9bfd15

At this point there are two independent worklines: one directory

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

9bfd15

For example, consider the following configuration:

632e8b

632e8b
9bfd15
One entry under <tt>`trunk/Identity/Themes/Models/'</tt>:
632e8b
9bfd15

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

632e8b
9bfd15
One entry under <tt>`trunk/Identity/Themes/Motifs/'</tt>:
632e8b
9bfd15

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

632e8b

ff7772
9bfd15

2.69.2 Renderable translation directory structures

9bfd15
9bfd15

Translation directory structures are auxiliar structures of renderable

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

9bfd15

In order to aliviate production of translation file, we made

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

9bfd15

If for some reason, translation files get far from translation

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

9bfd15

Inside renderable translation directory structures,

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

9bfd15
9bfd15
9bfd15

2.69.3 Copying renderable directory structures

9bfd15
9bfd15

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

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

9bfd15

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

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

9bfd15

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

9bfd15
directory structure copied should match the following conditions:
9bfd15

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

    As convenction, the render_doCopy function uses

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

    9bfd15

    Design templates + No translation:

    9bfd15

    9bfd15

    Command:

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

    9bfd15

    Sources:

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

    9bfd15

    Targets:

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

    9bfd15

    Renderable layout 2:

    9bfd15

    9bfd15

    Command:

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

    9bfd15

    Sources:

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

    9bfd15

    Targets:

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

    9bfd15

    Notice that design models are not included in source or target

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

    9bfd15

    Notice how translations and pre-rendition configuration scripts may

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

    9bfd15

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

    9bfd15
      copy a directory structure to itself.
    9bfd15

    9bfd15

    - The common directory structures represent the default value to use

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

    9bfd15

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

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

    9bfd15

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

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

    9bfd15

    - The specific auxiliar directories are optional.

    9bfd15

    9bfd15

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

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

    9bfd15

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

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

    9bfd15

    The `render_doCopy' functionality does duplicate directory structures

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

    9bfd15
    9bfd15
    9bfd15

    2.69.4 Usage

    9bfd15
    9bfd15
      9bfd15
    • ...
    • 9bfd15
      9bfd15
      9bfd15
      9bfd15
      9bfd15

      2.69.5 See also

      632e8b
      632e8b
      632e8b
      632e8b
      9bfd15
      [ < ]
      9bfd15
      [ > ]
      632e8b
         
      632e8b
      [ << ]
      9bfd15
      [ Up ]
      9bfd15
      [ >> ]
      632e8b
      632e8b

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

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