Blame Manual/repository-html/repository_76.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
-->
9bfd15
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>
9bfd15
<title>CentOS Artwork Repository: 2.72 The trunk/Scripts/Bash/Cli/Functions/Svg Directory</title>
632e8b
9bfd15
<meta name="description" content="CentOS Artwork Repository: 2.72 The trunk/Scripts/Bash/Cli/Functions/Svg Directory">
9bfd15
<meta name="keywords" content="CentOS Artwork Repository: 2.72 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
9bfd15
[ < ]
9bfd15
[ > ]
632e8b
   
632e8b
[ << ]
632e8b
[ Up ]
9bfd15
[ >> ]
632e8b
   
632e8b
   
632e8b
   
632e8b
   
632e8b
[Top]
632e8b
[Contents]
9bfd15
[Index]
632e8b
[ ? ]
632e8b
9bfd15
9bfd15
9bfd15

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

632e8b
632e8b
9bfd15
632e8b

2.72.1 Goals

632e8b
9bfd15

This section exists to organize files related to svg

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

632e8b
9bfd15
632e8b

2.72.2 Description

632e8b
9bfd15

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

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

9bfd15
632e8b
9bfd15
9bfd15

2.72.2.1 Metadata maintainance

9bfd15
9bfd15

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

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

9bfd15

The metadata template was created using the metadata information of a

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

9bfd15

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

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

9bfd15

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

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

9bfd15

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

632e8b

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

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

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

9bfd15
9bfd15
<samp>`Date'</samp>
9bfd15

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

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

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

Name of entity primarily responsible for making the content of this

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

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

Name of entity with rights to the intellectual Property of this

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

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

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

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

9bfd15
9bfd15
<samp>`Identifier'</samp>
9bfd15

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

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

9bfd15
9bfd15
<samp>`Source'</samp>
9bfd15

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

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

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

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

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

9bfd15
9bfd15
<samp>`Language'</samp>
9bfd15

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

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

9bfd15
9bfd15
<samp>`Keywords'</samp>
9bfd15

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

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

9bfd15
9bfd15
<samp>`Coverage'</samp>
9bfd15

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

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

9bfd15
9bfd15
<samp>`Description'</samp>
9bfd15

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

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

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

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

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

632e8b
632e8b
9bfd15

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

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

9bfd15
632e8b
9bfd15
9bfd15

2.72.2.2 Unused definitions

632e8b
9bfd15

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

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

9bfd15

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

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

9bfd15

To remove unused definitions from several scalable vector graphics

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

9bfd15
9bfd15
9bfd15

2.72.3 Usage

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

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

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

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

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

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

632e8b
632e8b
9bfd15

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

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

9bfd15
Warning

Warning

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

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

632e8b
9bfd15

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

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

9bfd15

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

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

9bfd15
9bfd15
632e8b

2.72.4 See also

632e8b
632e8b
9bfd15
2.61 The <tt>`trunk/Scripts/Bash'</tt> Directory  
632e8b
632e8b
632e8b
632e8b
632e8b
9bfd15
[ < ]
9bfd15
[ > ]
632e8b
   
632e8b
[ << ]
9bfd15
[ Up ]
9bfd15
[ >> ]
632e8b
632e8b

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

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