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

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

9bfd15
9bfd15
06d106
9bfd15

2.74.1 Goals

9bfd15
06d106

This section exists to organize files related to svg

06d106
functionality of <tt>`centos-art.sh'</tt> script.
06d106

9bfd15
06d106
9bfd15

2.74.2 Description

9bfd15
06d106

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

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

06d106
9bfd15
06d106
06d106

2.74.2.1 Metadata maintainance

9bfd15
06d106

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

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

06d106

The metadata template was created using the metadata information of a

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

06d106

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

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

06d106

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

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

06d106

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

06d106

06d106
06d106
<samp>`Title'</samp>
06d106

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

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

06d106
06d106
<samp>`Date'</samp>
06d106

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

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

06d106
06d106
<samp>`Creator'</samp>
06d106

Name of entity primarily responsible for making the content of this

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

06d106
06d106
<samp>`Rights'</samp>
06d106

Name of entity with rights to the intellectual Property of this

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

06d106
06d106
<samp>`Publisher'</samp>
06d106

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

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

06d106
06d106
<samp>`Identifier'</samp>
06d106

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

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

06d106
06d106
<samp>`Source'</samp>
06d106

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

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

06d106
06d106
<samp>`Relation'</samp>
06d106

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

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

06d106
06d106
<samp>`Language'</samp>
06d106

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

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

06d106
06d106
<samp>`Keywords'</samp>
06d106

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

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

06d106
06d106
<samp>`Coverage'</samp>
06d106

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

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

06d106
06d106
<samp>`Description'</samp>
06d106

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

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

06d106
06d106
<samp>`Contributors'</samp>
06d106

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

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

06d106
9bfd15
06d106

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

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

06d106
9bfd15
06d106
06d106

2.74.2.2 Unused definitions

9bfd15
06d106

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

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

06d106

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

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

06d106

To remove unused definitions from several scalable vector graphics

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

9bfd15
06d106
06d106

2.74.3 Usage

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

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

06d106
under <samp>`path/to/dir'</samp> directory.
06d106

06d106
06d106
centos-art svg --vacuum-defs='path/to/dir'
06d106
centos-art svg --vacuum-defs='path/to/dir' --filter='regex'
06d106

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

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

06d106
9bfd15
06d106

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

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

06d106
Warning

Warning

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

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

06d106
06d106

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

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

06d106

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

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

06d106
06d106
06d106

2.74.4 See also

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

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

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