Blame Manual/repository-html/repository_75.html

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

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

632e8b
632e8b
ff7772
632e8b

2.71.1 Goals

632e8b
632e8b

This section exists to organize files related to svg

632e8b
functionality of <tt>`centos-art.sh'</tt> script.
632e8b

632e8b
ff7772
632e8b

2.71.2 Description

632e8b
632e8b

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

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

632e8b
632e8b
ff7772
632e8b

2.71.2.1 Metadata maintainance

632e8b
632e8b

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

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

632e8b

The metadata template was created using the metadata information of a

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

632e8b

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

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

632e8b

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

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

632e8b

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

632e8b

632e8b
632e8b
<samp>`Title'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Date'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Creator'</samp>
632e8b

Name of entity primarily responsible for making the content of this

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

632e8b
632e8b
<samp>`Rights'</samp>
632e8b

Name of entity with rights to the intellectual Property of this

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

632e8b
632e8b
<samp>`Publisher'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Identifier'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Source'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Relation'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Language'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Keywords'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Coverage'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Description'</samp>
632e8b

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

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

632e8b
632e8b
<samp>`Contributors'</samp>
632e8b

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

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

632e8b
632e8b
632e8b

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

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

632e8b
632e8b
ff7772
632e8b

2.71.2.2 Unused definitions

632e8b
632e8b

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

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

632e8b

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

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

632e8b

To remove unused definitions from several scalable vector graphics

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

632e8b
ff7772
632e8b

2.71.3 Usage

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

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

632e8b
under <samp>`path/to/dir'</samp> directory.
632e8b

632e8b
632e8b
centos-art svg --vacuum-defs='path/to/dir'
632e8b
centos-art svg --vacuum-defs='path/to/dir' --filter='regex'
632e8b

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

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

632e8b
632e8b
632e8b

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

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

632e8b
Warning

Warning

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

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

632e8b
632e8b

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

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

632e8b

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

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

632e8b
ff7772
632e8b

2.71.4 See also

632e8b
632e8b
ff7772
2.60 The <tt>`trunk/Scripts/Bash'</tt> Directory  
632e8b
632e8b
632e8b
632e8b
632e8b
ff7772
[ < ]
ff7772
[ > ]
632e8b
   
632e8b
[ << ]
ff7772
[ Up ]
ff7772
[ >> ]
632e8b
632e8b

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

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