Blame Manual/repository-html/repository_72.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
-->
ff7772
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>
632e8b
<title>CentOS Artwork Repository: 2.68 The trunk/Scripts/Bash/Cli/Functions/Render Directory</title>
632e8b
632e8b
<meta name="description" content="CentOS Artwork Repository: 2.68 The trunk/Scripts/Bash/Cli/Functions/Render Directory">
632e8b
<meta name="keywords" content="CentOS Artwork Repository: 2.68 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
ff7772
[ < ]
ff7772
[ > ]
632e8b
   
632e8b
[ << ]
632e8b
[ Up ]
ff7772
[ >> ]
632e8b
   
632e8b
   
632e8b
   
632e8b
   
632e8b
[Top]
632e8b
[Contents]
ff7772
[Index]
632e8b
[ ? ]
632e8b
632e8b
ff7772
632e8b

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

632e8b
632e8b

The render functionality exists to produce both identity and

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

632e8b

The render functionality relies on "renderable directory

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

632e8b
ff7772
632e8b

2.68.1 Renderable identity directory structures

632e8b
632e8b

Renderable identity directory structures are the starting point of

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

632e8b

Inside the working copy, one renderable identity directory structures

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

632e8b

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

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

632e8b

Inside renderable identity directory structures, content production is

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

632e8b
ff7772
632e8b

2.68.1.1 Design template without translation

632e8b
632e8b

The design template without translation configuration is based on a

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

632e8b

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

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

632e8b
632e8b
One renderable identity directory structure:
632e8b
632e8b

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

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

632e8b

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

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

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

Inside design template directory, design template files are based on

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

632e8b

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

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

632e8b

The CENTOSARTWORK word itself is a convenction name we use to

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

632e8b
info

Note

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

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

632e8b
632e8b

When a renderable identity directory structure is configured to

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

632e8b

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

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

632e8b

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

632e8b

632e8b
632e8b
One translation directory structure:
632e8b
632e8b

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

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

632e8b

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

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

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

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

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

632e8b

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

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

632e8b

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

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

632e8b

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

632e8b

632e8b
632e8b
One pre-rendition configuration script:
632e8b
632e8b

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

632e8b

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

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

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

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

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

632e8b

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

632e8b
information.
632e8b

632e8b
632e8b
632e8b
ff7772
632e8b

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

632e8b
632e8b

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

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

632e8b

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

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

632e8b

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

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

632e8b

The pre-rendition configuration script used to produce untranslated

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

632e8b
info

Note

If we use no translation file in the translation entry

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

632e8b
632e8b

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

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

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

2.68.1.3 Design template with translation (optimized)

632e8b
632e8b

Producing translated images satisfies almost all our production images

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

632e8b

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

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

632e8b

The MATCHINGLIST variable is set in the pre-rendition

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

632e8b

For example, consider the following configuration:

632e8b

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

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

632e8b
632e8b
632e8b
ff7772
632e8b

2.68.1.4 Design template with translation (optimized+flexibility)

632e8b
632e8b

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

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

632e8b

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

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

632e8b

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

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

632e8b

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

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

632e8b

At this point there are two independent worklines: one directory

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

632e8b

For example, consider the following configuration:

632e8b

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

632e8b

ff7772
632e8b

2.68.2 Renderable translation directory structures

632e8b
632e8b

Translation directory structures are auxiliar structures of renderable

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

632e8b

In order to aliviate production of translation file, we made

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

632e8b

If for some reason, translation files get far from translation

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

632e8b

Inside renderable translation directory structures,

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

632e8b
ff7772
632e8b

2.68.3 Copying renderable directory structures

632e8b
632e8b

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

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

632e8b

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

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

632e8b

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

632e8b
directory structure copied should match the following conditions:
632e8b

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

    As convenction, the render_doCopy function uses

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

    632e8b

    Design templates + No translation:

    632e8b

    632e8b

    Command:

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

    632e8b

    Sources:

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

    632e8b

    Targets:

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

    632e8b

    Renderable layout 2:

    632e8b

    632e8b

    Command:

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

    632e8b

    Sources:

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

    632e8b

    Targets:

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

    632e8b

    Notice that design models are not included in source or target

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

    632e8b

    Notice how translations and pre-rendition configuration scripts may

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

    632e8b

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

    632e8b
      copy a directory structure to itself.
    632e8b

    632e8b

    - The common directory structures represent the default value to use

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

    632e8b

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

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

    632e8b

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

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

    632e8b

    - The specific auxiliar directories are optional.

    632e8b

    632e8b

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

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

    632e8b

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

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

    632e8b

    The `render_doCopy' functionality does duplicate directory structures

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

    632e8b
    ff7772
    632e8b

    2.68.4 Usage

    632e8b
    632e8b
      632e8b
    • ...
    • 632e8b
      632e8b
      632e8b
      ff7772
      632e8b

      2.68.5 See also

      632e8b
      632e8b
      632e8b
      632e8b
      ff7772
      [ < ]
      ff7772
      [ > ]
      632e8b
         
      632e8b
      [ << ]
      ff7772
      [ Up ]
      ff7772
      [ >> ]
      632e8b
      632e8b

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

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