Blame Manual/repository-html/repository_58.html

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

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

aaf678
aaf678

The render functionality exists to produce both identity and

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

aaf678

The render functionality relies on "renderable directory

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

aaf678
aaf678
aaf678

1.57.1 Renderable identity directory structures

aaf678
aaf678

Renderable identity directory structures are the starting point of

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

aaf678

Inside the working copy, one renderable identity directory structures

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

aaf678

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

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

aaf678

Inside renderable identity directory structures, content production is

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

aaf678
aaf678
aaf678

1.57.1.1 Design template without translation

aaf678
aaf678

The design template without translation configuration is based on a

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

aaf678

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

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

aaf678
aaf678
One renderable identity directory structure:
aaf678
aaf678

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

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

aaf678

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

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

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

Inside design template directory, design template files are based on

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

aaf678

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

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

aaf678

The CENTOSARTWORK word itself is a convenction name we use to

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

aaf678
info

Note

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

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

010b2d
aaf678

When a renderable identity directory structure is configured to

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

aaf678

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

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

861ed3

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

aaf678

aaf678
aaf678
One translation directory structure:
aaf678
aaf678

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

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

aaf678

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

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

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

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

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

aaf678

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

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

aaf678

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

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

aaf678

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

aaf678

aaf678
aaf678
One pre-rendition configuration script:
aaf678
aaf678

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

aaf678

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

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

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

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

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

aaf678

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

aaf678
information.
aaf678

aaf678
aaf678
aaf678
aaf678
aaf678

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

aaf678
aaf678

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

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

aaf678

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

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

aaf678

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

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

aaf678

The pre-rendition configuration script used to produce untranslated

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

aaf678
info

Note

If we use no translation file in the translation entry

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

ee1f37
aaf678

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

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

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

1.57.1.3 Design template with translation (optimized)

aaf678
aaf678

Producing translated images satisfies almost all our production images

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

aaf678

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

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

aaf678

The MATCHINGLIST variable is set in the pre-rendition

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

aaf678

For example, consider the following configuration:

aaf678

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

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

aaf678
aaf678
aaf678
aaf678
aaf678

1.57.1.4 Design template with translation (optimized+flexibility)

aaf678
aaf678

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

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

aaf678

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

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

aaf678

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

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

aaf678

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

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

aaf678

At this point there are two independent worklines: one directory

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

aaf678

For example, consider the following configuration:

aaf678

010b2d
aaf678
One entry under <tt>`trunk/Identity/Themes/Models/'</tt>:
010b2d
aaf678

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

010b2d
aaf678
One entry under <tt>`trunk/Identity/Themes/Motifs/'</tt>:
010b2d
aaf678

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

aaf678

aaf678
aaf678

1.57.2 Renderable translation directory structures

aaf678
aaf678

Translation directory structures are auxiliar structures of renderable

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

aaf678

In order to aliviate production of translation file, we made

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

aaf678

If for some reason, translation files get far from translation

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

aaf678

Inside renderable translation directory structures,

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

aaf678
aaf678
aaf678

1.57.3 Copying renderable directory structures

aaf678
aaf678

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

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

aaf678

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

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

aaf678

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

aaf678
directory structure copied should match the following conditions:
aaf678

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

    As convenction, the render_doCopy function uses

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

    aaf678

    Design templates + No translation:

    aaf678

    aaf678

    Command:

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

    aaf678

    Sources:

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

    aaf678

    Targets:

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

    aaf678

    Renderable layout 2:

    aaf678

    aaf678

    Command:

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

    aaf678

    Sources:

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

    aaf678

    Targets:

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

    aaf678

    Notice that design models are not included in source or target

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

    aaf678

    Notice how translations and pre-rendition configuration scripts may

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

    aaf678

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

    aaf678
      copy a directory structure to itself.
    aaf678

    aaf678

    - The common directory structures represent the default value to use

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

    aaf678

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

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

    aaf678

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

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

    aaf678

    - The specific auxiliar directories are optional.

    aaf678

    aaf678

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

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

    aaf678

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

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

    aaf678

    The `render_doCopy' functionality does duplicate directory structures

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

    aaf678
    aaf678
    aaf678

    1.57.4 Usage

    aaf678
    aaf678
      aaf678
    • ...
    • aaf678
      010b2d
      010b2d
      aaf678
      aaf678

      1.57.5 See also

      aaf678
      ee1f37
      ee1f37
      ee1f37
      aaf678
      [ < ]
      aaf678
      [ > ]
      ee1f37
         
      aaf678
      [ << ]
      aaf678
      [ Up ]
      aaf678
      [ >> ]
      ee1f37
      ee1f37

      ee1f37
       <font size="-1">
      406f69
        This document was generated on March, 1 2011 using texi2html 1.76.
      ee1f37
       </font>
      ee1f37
       
      ee1f37
      ee1f37

      ee1f37
      </body>
      ee1f37
      </html>