Blame Manuals/Repository/repository-html/repository_59.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
-->
acd47b
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>
4a9d2a
<title>CentOS Artwork Repository: 3.56 trunk/Scripts/Bash/Functions/Svg</title>
4c79b5
4a9d2a
<meta name="description" content="CentOS Artwork Repository: 3.56 trunk/Scripts/Bash/Functions/Svg">
4a9d2a
<meta name="keywords" content="CentOS Artwork Repository: 3.56 trunk/Scripts/Bash/Functions/Svg">
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
300762
4a9d2a
[ < ]
4a9d2a
[ > ]
4c79b5
   
4c79b5
[ << ]
300762
[ Up ]
acd47b
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
acd47b
[Index]
4c79b5
[ ? ]
4c79b5
4a9d2a
4a9d2a
4a9d2a

3.56 trunk/Scripts/Bash/Functions/Svg

38bcd9
c9b54d
4a9d2a
63f275

3.56.1 Goals

54b5a5
4a9d2a

This section exists to organize files related to svg

4a9d2a
functionality of <tt>`centos-art.sh'</tt> script.
4a9d2a

4c79b5
4a9d2a
63f275

3.56.2 Description

5fb024
4a9d2a

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

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

4a9d2a
4a9d2a
4a9d2a
4a9d2a

3.56.2.1 Metadata maintainance

4a9d2a
4a9d2a

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

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

4a9d2a

The metadata template was created using the metadata information of a

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

4a9d2a

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

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

4a9d2a

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

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

4a9d2a

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

4a9d2a

4a9d2a
4a9d2a
<samp>`Title'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Date'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Creator'</samp>
4a9d2a

Name of entity primarily responsible for making the content of this

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

4a9d2a
4a9d2a
<samp>`Rights'</samp>
4a9d2a

Name of entity with rights to the intellectual Property of this

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

4a9d2a
4a9d2a
<samp>`Publisher'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Identifier'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Source'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Relation'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Language'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Keywords'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Coverage'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Description'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
<samp>`Contributors'</samp>
4a9d2a

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

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

4a9d2a
4a9d2a
4a9d2a

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

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

4a9d2a
4a9d2a
4a9d2a
4a9d2a

3.56.2.2 Unused definitions

5fb024
4a9d2a

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

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

4a9d2a

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

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

4a9d2a

To remove unused definitions from several scalable vector graphics

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

4a9d2a
4a9d2a
54b5a5

3.56.3 Usage

54b5a5
4a9d2a
4a9d2a
centos-art svg --update-metadata='path/to/dir'
4a9d2a
centos-art svg --update-metadata='path/to/dir' --filter='regex'
4a9d2a

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

4a9d2a
under <samp>`path/to/dir'</samp> directory.
4a9d2a

4a9d2a
4a9d2a
centos-art svg --vacuum-defs='path/to/dir'
4a9d2a
centos-art svg --vacuum-defs='path/to/dir' --filter='regex'
4a9d2a

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

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

4a9d2a
4a9d2a
4a9d2a

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

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

4a9d2a
Warning

Warning

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

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

54b5a5
4a9d2a

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

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

4a9d2a

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

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

4a9d2a
4a9d2a
300762

3.56.4 See also

300762
4a9d2a
4a9d2a
3.47 trunk/Scripts/Bash  
4a9d2a
4a9d2a
3.48 trunk/Scripts/Bash/Functions  
4a9d2a
4a9d2a
081970
081970
300762
4a9d2a
[ < ]
4a9d2a
[ > ]
300762
   
300762
[ << ]
4a9d2a
[ Up ]
acd47b
[ >> ]
300762
4c79b5

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

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