Blame Manuals/Filesystem/filesystem-html/filesystem_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
-->
010b2d
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>
65cd8a
<title>CentOS Artwork Repository - Filesystem: 3.55 trunk/Scripts/Bash/centos-art/Functions/Render</title>
ee1f37
65cd8a
<meta name="description" content="CentOS Artwork Repository - Filesystem: 3.55 trunk/Scripts/Bash/centos-art/Functions/Render">
65cd8a
<meta name="keywords" content="CentOS Artwork Repository - Filesystem: 3.55 trunk/Scripts/Bash/centos-art/Functions/Render">
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
010b2d
[ < ]
010b2d
[ > ]
ee1f37
   
db14a4
[ << ]
db14a4
[ Up ]
193ea4
[ >> ]
ee1f37
   
ee1f37
   
ee1f37
   
ee1f37
   
db14a4
[Top]
db14a4
[Contents]
193ea4
[Index]
db14a4
[ ? ]
ee1f37
65cd8a
010b2d
65cd8a

3.55 trunk/Scripts/Bash/centos-art/Functions/Render

010b2d
010b2d

The render functionality exists to produce both identity and

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

010b2d

The render functionality relies on "renderable directory

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

010b2d
010b2d
010b2d

3.55.1 Renderable identity directory structures

010b2d
010b2d

Renderable identity directory structures are the starting point of

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

010b2d

Inside the working copy, one renderable identity directory structures

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

010b2d

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

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

010b2d

Inside renderable identity directory structures, content production is

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

010b2d
010b2d
010b2d

3.55.1.1 Design template without translation

010b2d
010b2d

The design template without translation configuration is based on a

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

010b2d

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

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

010b2d
010b2d
One renderable identity directory structure:
010b2d
010b2d

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

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

010b2d

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

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

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

Inside design template directory, design template files are based on

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

010b2d

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

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

010b2d

The CENTOSARTWORK word itself is a convenction name we use to

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

010b2d
info

Note

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

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

ee1f37
010b2d

When a renderable identity directory structure is configured to

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

010b2d

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

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

010b2d

See section trunk/Identity, for more information.

010b2d

010b2d
010b2d
One translation directory structure:
010b2d
010b2d

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

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

010b2d

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

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

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

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

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

010b2d

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

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

010b2d

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

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

010b2d

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

ee1f37

010b2d
010b2d
One pre-rendition configuration script:
010b2d
010b2d

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

010b2d

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

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

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

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

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

65cd8a

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

010b2d
information.
010b2d

010b2d
010b2d
010b2d
010b2d
010b2d

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

010b2d
010b2d

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

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

010b2d

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

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

010b2d

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

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

010b2d

The pre-rendition configuration script used to produce untranslated

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

010b2d
info

Note

If we use no translation file in the translation entry

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

ee1f37
010b2d

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

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

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

3.55.1.3 Design template with translation (optimized)

ee1f37
010b2d

Producing translated images satisfies almost all our production images

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

010b2d

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

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

010b2d

The MATCHINGLIST variable is set in the pre-rendition

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

010b2d

For example, consider the following configuration:

010b2d

ee1f37
010b2d
One entry under <tt>`trunk/Identity/'</tt>:
010b2d
010b2d

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

ee1f37
ee1f37
010b2d
010b2d
010b2d

3.55.1.4 Design template with translation (optimized+flexibility)

010b2d
010b2d

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

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

010b2d

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

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

010b2d

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

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

010b2d

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

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

010b2d

At this point there are two independent worklines: one directory

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

010b2d

For example, consider the following configuration:

010b2d

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

ee1f37

010b2d
010b2d

3.55.2 Renderable translation directory structures

010b2d
010b2d

Translation directory structures are auxiliar structures of renderable

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

010b2d

In order to aliviate production of translation file, we made

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

010b2d

If for some reason, translation files get far from translation

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

010b2d

Inside renderable translation directory structures,

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

010b2d
010b2d
010b2d

3.55.3 Copying renderable directory structures

ee1f37
010b2d

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

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

010b2d

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

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

010b2d

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

010b2d
directory structure copied should match the following conditions:
010b2d

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

    As convenction, the render_doCopy function uses

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

    010b2d

    Design templates + No translation:

    010b2d

    010b2d

    Command:

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

    010b2d

    Sources:

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

    010b2d

    Targets:

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

    010b2d

    Renderable layout 2:

    010b2d

    010b2d

    Command:

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

    010b2d

    Sources:

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

    010b2d

    Targets:

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

    010b2d

    Notice that design models are not included in source or target

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

    010b2d

    Notice how translations and pre-rendition configuration scripts may

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

    010b2d

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

    010b2d
      copy a directory structure to itself.
    010b2d

    010b2d

    - The common directory structures represent the default value to use

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

    010b2d

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

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

    010b2d

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

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

    010b2d

    - The specific auxiliar directories are optional.

    010b2d

    010b2d

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

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

    010b2d

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

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

    010b2d

    The `render_doCopy' functionality does duplicate directory structures

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

    010b2d
    010b2d
    010b2d

    3.55.4 Usage

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

      3.55.5 See also

      ee1f37
      ee1f37
      ee1f37
      ee1f37
      010b2d
      [ < ]
      010b2d
      [ > ]
      ee1f37
         
      db14a4
      [ << ]
      010b2d
      [ Up ]
      193ea4
      [ >> ]
      ee1f37
      ee1f37

      ee1f37
       <font size="-1">
      010b2d
        This document was generated on February, 28 2011 using texi2html 1.76.
      ee1f37
       </font>
      ee1f37
       
      ee1f37
      ee1f37

      ee1f37
      </body>
      ee1f37
      </html>