Blame Manuals/Repository/repository-html/repository_56.html

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

3.53 trunk/Scripts/Bash/Functions/Render

7e35dc
c12cdc

The render functionality exists to produce both identity and

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

c12cdc

The render functionality relies on "renderable directory

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

7e35dc
6a8116
c12cdc

3.53.1 Renderable identity directory structures

c12cdc
c12cdc

Renderable identity directory structures are the starting point of

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

c12cdc

Inside the working copy, one renderable identity directory structures

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

c12cdc

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

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

c12cdc

Inside renderable identity directory structures, content production is

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

c12cdc
c12cdc
c12cdc

3.53.1.1 Design template without translation

7e35dc
c12cdc

The design template without translation configuration is based on a

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

c12cdc

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

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

c12cdc
c12cdc
One renderable identity directory structure:
c12cdc
c12cdc

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

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

c12cdc

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

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

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

Inside design template directory, design template files are based on

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

c12cdc

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

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

c12cdc

The CENTOSARTWORK word itself is a convenction name we use to

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

c12cdc
info

Note

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

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

2c3589
c12cdc

When a renderable identity directory structure is configured to

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

c12cdc

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

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

c12cdc

See section trunk/Identity, for more information.

c12cdc

c12cdc
c12cdc
One translation directory structure:
c12cdc
c12cdc

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

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

c12cdc

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

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

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

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

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

c12cdc

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

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

c12cdc

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

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

c12cdc

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

c12cdc

c12cdc
c12cdc
One pre-rendition configuration script:
c12cdc
c12cdc

In order to make an identity directory structure renderable, a

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

c12cdc

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

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

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

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

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

c12cdc

See section trunk/Scripts/Bash/Functions/Render/Config, for more

c12cdc
information.
c12cdc

c12cdc
c12cdc
2c3589
6a8116
c12cdc

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

c12cdc
c12cdc

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

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

c12cdc

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

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

c12cdc

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

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

c12cdc

The pre-rendition configuration script used to produce untranslated

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

c12cdc
info

Note

If we use no translation file in the translation entry

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

c12cdc
c12cdc

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

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

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

3.53.1.3 Design template with translation (optimized)

c12cdc
c12cdc

Producing translated images satisfies almost all our production images

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

c12cdc

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

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

c12cdc

The MATCHINGLIST variable is set in the pre-rendition

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

c12cdc

For example, consider the following configuration:

c12cdc

2c3589
c12cdc
One entry under <tt>`trunk/Identity/'</tt>:
2c3589
c12cdc

In this configuration we want to produce three images using a

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

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

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

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

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

In order to produce different translated images using specific design

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

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

In this configuration the pre-rendition configuration script

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

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

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

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

2c3589
2c3589
6a8116
c12cdc
c12cdc

3.53.1.4 Design template with translation (optimized+flexibility)

c12cdc
c12cdc

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

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

c12cdc

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

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

c12cdc

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

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

c12cdc

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

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

c12cdc

At this point there are two independent worklines: one directory

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

c12cdc

For example, consider the following configuration:

c12cdc

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

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

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

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

Inisde design models, dynamic backgrounds are required in order for

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

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

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

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

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

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

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

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

There is one pre-rendition configuration script for each theme

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

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

In this configuration the pre-rendition configuration script

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

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

The production flow of "optimize+flexibility" configuration…

c12cdc

c12cdc
c12cdc

3.53.2 Renderable translation directory structures

c12cdc
c12cdc

Translation directory structures are auxiliar structures of renderable

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

c12cdc

In order to aliviate production of translation file, we made

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

c12cdc

If for some reason, translation files get far from translation

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

c12cdc

Inside renderable translation directory structures,

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

c12cdc
c12cdc
c12cdc

3.53.3 Copying renderable directory structures

c12cdc
c12cdc

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

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

c12cdc

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

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

c12cdc

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

c12cdc
directory structure copied should match the following conditions:
c12cdc

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

    As convenction, the render_doCopy function uses

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

    c12cdc

    Design templates + No translation:

    c12cdc

    c12cdc

    Command:

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

    c12cdc

    Sources:

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

    c12cdc

    Targets:

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

    c12cdc

    Renderable layout 2:

    c12cdc

    c12cdc

    Command:

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

    c12cdc

    Sources:

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

    c12cdc

    Targets:

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

    c12cdc

    Notice that design models are not included in source or target

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

    c12cdc

    Notice how translations and pre-rendition configuration scripts may

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

    c12cdc

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

    c12cdc
      copy a directory structure to itself.
    c12cdc

    c12cdc

    - The common directory structures represent the default value to use

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

    c12cdc

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

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

    c12cdc

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

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

    c12cdc

    - The specific auxiliar directories are optional.

    c12cdc

    c12cdc

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

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

    c12cdc

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

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

    c12cdc

    The `render_doCopy' functionality does duplicate directory structures

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

    c12cdc
    c12cdc
    c12cdc

    3.53.4 Usage

    c12cdc
    c12cdc
      c12cdc
    • ...
    • c12cdc
      c12cdc
      c12cdc
      c12cdc
      c12cdc

      3.53.5 See also

      300762
      2c3589
      c12cdc
      3.54 trunk/Scripts/Bash/Functions/Render/Config  
      2c3589
      2c3589
      4c79b5
      4c79b5
      4c79b5
      c12cdc
      [ < ]
      c12cdc
      [ > ]
      4c79b5
         
      300762
      [ << ]
      c12cdc
      [ Up ]
      c12cdc
      [ >> ]
      4c79b5
      4c79b5

      4c79b5
       <font size="-1">
      bf28e1
        This document was generated on February, 27 2011 using texi2html 1.76.
      4c79b5
       </font>
      4c79b5
       
      4c79b5
      4c79b5

      4c79b5
      </body>
      4c79b5
      </html>