Blame Manual/repository-html/repository_66.html

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

2.61 The <tt>`trunk/Scripts/Bash/Cli/Functions/Svg'</tt> Directory

063806
063806
063806
f66721

2.61.1 Goals

063806
f66721

This section exists to organize files related to svg

f66721
functionality of <tt>`centos-art.sh'</tt> script.
063806

063806
063806
f66721

2.61.2 Description

063806
f66721

The svg functionality of <tt>`centos-art.sh'</tt> script helps you

f66721
to maintain scalable vector graphics (SVG) inside repository. For
f66721
example, suppose you've been working in CentOS default design models
f66721
under <tt>`trunk/Identity/Themes/Models/'</tt>, and you want to set common
f66721
metadata to all of them, and later remove all unused SVG defintions
f66721
from <samp>`*.svg'</samp> files. Doing so file by file may be a tedious task,
f66721
so the <tt>`centos-art.sh'</tt> script provides the svg
f66721
functionality to aid you maintain such actions.
f66721

f66721
063806
063806
f66721

2.61.2.1 Metadata maintainance

063806
f66721

The metadata used is defined by Inkscape 0.46 using the SVG standard

f66721
markup. The <tt>`centos-art.sh'</tt> script replaces everything
f66721
in-between <metadata and </metadata> tags with a
f66721
predefined metadata template we've set for this purpose.
f66721

f66721

The metadata template was created using the metadata information of a

f66721
file which, using Inkscape 0.46, all metadata fields were set. This
f66721
created a complete markup representation of how SVG metadata would
f66721
look like. Later, we replaced every single static value with a
f66721
translation marker in the form <samp>`=SOMETEXT='</samp>, where
f66721
SOMETEXT is the name of its main opening tag. Later, we
f66721
transform the metadata template into a sed replacement set of commads
f66721
escaping new lines at the end of each line.
f66721

f66721

With metadata template in place, the <tt>`centos-art.sh'</tt> script uses

f66721
it to create a metadata template instance for the file being processed
f66721
currently.  The metadata template instance contains the metadata
f66721
portion of sed replacement commands with translation markers already
f66721
traduced.  In this action, instance creation, is where we take
f66721
advantage of automation and generate metadata values like title, date,
f66721
keywords, source, identifier, and relation dynamically, based on the
f66721
file path <tt>`centos-art.sh'</tt> script is currently creating metadata
f66721
information for.
f66721

f66721

With metadata template instance in place, the <tt>`centos-art.sh'</tt>

f66721
script uses it to replace real values inside all <samp>`.svg'</samp> files
f66721
under the current location you're running the <tt>`centos-art.sh'</tt>
f66721
script on.  Default behaviour is to ask user to enter each metadatum
f66721
required, one by one. If user leaves metadatum empty, by pressing
f66721
RET key, <tt>`centos-art.sh'</tt> uses its default value.
f66721

f66721

The <tt>`centos-art.sh'</tt> script modifies the following metadata:

063806

063806
f66721
<samp>`Title'</samp>
f66721

Name by which this document is formally known. If no value is set

f66721
here, <tt>`centos-art.sh'</tt> script uses the file name as title.
063806

f66721
f66721
<samp>`Date'</samp>
f66721

Date associated with the creation of this document (YYYY-MM-DD). If no

f66721
value is set here, <tt>`centos-art.sh'</tt> script uses the current date
f66721
information as in date +%Y-%m-%d.
063806

063806
f66721
<samp>`Creator'</samp>
f66721

Name of entity primarily responsible for making the content of this

f66721
document. If no value is set here, <tt>`centos-art.sh'</tt> script uses
f66721
the string <samp>`The CentOS Project'</samp>.
063806

063806
f66721
<samp>`Rights'</samp>
f66721

Name of entity with rights to the intellectual Property of this

f66721
document. If no value is set here, <tt>`centos-art.sh'</tt> script uses
f66721
the string <samp>`The CentOS Project'</samp>.
063806

063806
f66721
<samp>`Publisher'</samp>
f66721

Name of entity responsible for making this document available. If no

f66721
value is set here, <tt>`centos-art.sh'</tt> script uses the string
f66721
<samp>`The CentOS Project'</samp>.
063806

f66721
f66721
<samp>`Identifier'</samp>
f66721

Unique URI to reference this document. If no value is set here,

f66721
<tt>`centos-art.sh'</tt> script uses the current file path to build the
f66721
related url that points to current file location inside repository
f66721
central server.
063806

f66721
f66721
<samp>`Source'</samp>
f66721

Unique URI to reference the source of this document. If no value is

f66721
set here, <tt>`centos-art.sh'</tt> script uses current file path to build
f66721
the related url that points to current file location inside repository
f66721
central server.
063806

063806
f66721
<samp>`Relation'</samp>
f66721

Unique URI to a related document. If no value is set here,

f66721
<tt>`centos-art.sh'</tt> script uses current file path to build the
f66721
related url that points to current file location inside repository
f66721
central server.
063806

f66721
f66721
<samp>`Language'</samp>
f66721

Two-letter language tag with optional subtags for the language of this

f66721
document. (e.g. <samp>`en-GB'</samp>). If no value is set here,
f66721
<tt>`centos-art.sh'</tt> script uses the current locale information as in
f66721
cli_getCurrentLocale function.
063806

f66721
f66721
<samp>`Keywords'</samp>
f66721

The topic of this document as comma-separated key words, prhases, or

f66721
classifications. If no value is set here, <tt>`centos-art.sh'</tt> script
f66721
uses file path to build 
063806

f66721
f66721
<samp>`Coverage'</samp>
f66721

Extent or scope of this document. If no value is set here,

f66721
<tt>`centos-art.sh'</tt> script uses the string <samp>`The CentOS Project'</samp>.
063806

f66721
f66721
<samp>`Description'</samp>
f66721

Description about the document. If no value is set here,

f66721
<tt>`centos-art.sh'</tt> script uses uses empty value as default.
063806

063806
f66721
<samp>`Contributors'</samp>
f66721

People that contributes in the creation/maintainance of the document.

f66721
If no value is set here, <tt>`centos-art.sh'</tt> script uses uses empty
f66721
value as default.
f66721

063806
063806
f66721

The <samp>`License'</samp> metadatum is not set as a choise, by now. It is

f66721
fixed Creative Common Attribution Share-Alike 3.0 License. This is done in order to
f66721
grant license consistency among all SVG files we manage inside CentOS
f66721
Artwork Repository.
f66721

f66721
063806
063806
f66721

2.61.2.2 Unused definitions

063806
f66721

Many of the no-longer-used gradients, patterns, and markers (more

f66721
precisely, those which you edited manually) remain in the
f66721
corresponding palettes and can be reused for new objects. However if
f66721
you want to optimize your document, use the <samp>`Vacuum Defs'</samp> command
f66721
in <samp>`File'</samp> menu. It will remove any gradients, patterns, or
f66721
markers which are not used by anything in the document, making the
f66721
file smaller. 
f66721

f66721

If you have one or two couple of files, removing unused definitions

f66721
using the graphical interface may be enough to you.  In contrast, if
f66721
you have dozens or even houndreds of scalable vector graphics files to
f66721
maintain it is not a fun task to use the graphical interface to remove
f66721
unused definitions editing those files one by one.
f66721

f66721

To remove unused definitions from several scalable vector graphics

f66721
files, the <tt>`centos-art.sh'</tt> script uses Inkscape command-line
f66721
interface, specifically with the <samp>`--vaccum-defs'</samp> option.
063806

f66721
f66721
f66721

2.61.3 Usage

f66721
f66721
f66721
centos-art svg --update-metadata='path/to/dir'
f66721
centos-art svg --update-metadata='path/to/dir' --filter='regex'
f66721

Use these commands to update metadata information to <samp>`.svg'</samp> files

f66721
under <samp>`path/to/dir'</samp> directory.
063806

063806
f66721
centos-art svg --vacuum-defs='path/to/dir'
f66721
centos-art svg --vacuum-defs='path/to/dir' --filter='regex'
f66721

Use these commands to remove unused definitions inside <samp>`.svg'</samp>

f66721
files under <samp>`path/to/dir'</samp> directory. 
f66721

063806
063806
f66721

When you provide <samp>`--filter='regex''</samp> argument, the list of files

f66721
to process is reduced as specified in <samp>`regex'</samp> regular expression.
f66721
Inside <tt>`centos-art.sh'</tt> script, the <samp>`regex'</samp> regular
f66721
expression is used in combination with find command to look
f66721
for files matching the regular expression path pattern.
f66721

f66721
Warning

Warning

In order for <samp>`regex'</samp> regular expression to match

f66721
a file, the <samp>`regex'</samp> regular expresion must match the whole file
f66721
path not just the file name. 
f66721

063806
f66721

For example, if you want to match all <tt>`summary.svg'</tt> files inside

f66721
<tt>`path/to/dir'</tt>, use the .+/summary regular expression.
f66721
Later, <tt>`centos-art.sh'</tt> script uses this value inside
f66721
^$REGEX\.svg$ expression in order to build the final regular
f66721
expression (i.e., ^.+/summary\.svg$) that is evaluated against
f66721
available file paths inside the list of files to process.
f66721

f66721

Exceptionally, when you provide <samp>`--filter='regex''</samp> in the way

f66721
that <samp>`regex'</samp>, appended to <samp>`path/to/dir/'</samp> (i.e.
f66721
<samp>`path/to/dir/regex'</samp>), matches a regular file; the
f66721
<tt>`centos-art.sh'</tt> script uses the file matching as only file in the
f66721
list of files to process. 
f66721

f66721
f66721
f66721

2.61.4 See also

063806
063806
f66721
2.50 The <tt>`trunk/Scripts/Bash'</tt> Directory  
063806
982d5c
982d5c
010b2d
010b2d
f66721
[ < ]
f66721
[ > ]
010b2d
   
f66721
[ << ]
f66721
[ Up ]
f66721
[ >> ]
010b2d
010b2d

010b2d
 <font size="-1">
982d5c
  This document was generated on March, 1 2011 using texi2html 1.76.
010b2d
 </font>
010b2d
 
010b2d
010b2d

010b2d
</body>
010b2d
</html>