|
|
4c79b5 |
|
|
|
4c79b5 |
<html>
|
|
|
6414c4 |
|
|
|
09d4f2 |
|
|
|
6414c4 |
Copyright C 2009, 2010, 2011 Alain Reguera Delgado
|
|
|
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 |
-->
|
|
|
6414c4 |
|
|
|
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>
|
|
|
280c77 |
<title>The CentOS Artwork Repository: 3.46 trunk/Scripts/Bash/Functions/Svg</title>
|
|
|
4c79b5 |
|
|
|
280c77 |
<meta name="description" content="The CentOS Artwork Repository: 3.46 trunk/Scripts/Bash/Functions/Svg">
|
|
|
280c77 |
<meta name="keywords" content="The CentOS Artwork Repository: 3.46 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 |
|
|
|
4c79b5 |
|
|
|
280c77 |
[ < ]
|
|
|
280c77 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
4c79b5 |
[ Up ]
|
|
|
280c77 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[Top]
|
|
|
4c79b5 |
[Contents]
|
|
|
280c77 |
[Index]
|
|
|
4c79b5 |
[ ? ]
|
|
|
4c79b5 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
3.46 trunk/Scripts/Bash/Functions/Svg
|
|
|
035049 |
|
|
|
035049 |
|
|
|
280c77 |
|
|
|
035049 |
3.46.1 Goals
|
|
|
035049 |
|
|
|
280c77 |
This section exists to organize files related to svg
|
|
|
280c77 |
functionality of <tt>`centos-art.sh'</tt> script.
|
|
|
035049 |
|
|
|
035049 |
|
|
|
280c77 |
|
|
|
035049 |
3.46.2 Description
|
|
|
035049 |
|
|
|
280c77 |
The svg functionality of <tt>`centos-art.sh'</tt> script helps you
|
|
|
280c77 |
to maintain scalable vector graphics (SVG) inside repository. For
|
|
|
280c77 |
example, suppose you've been working in CentOS default design models
|
|
|
280c77 |
under <tt>`trunk/Identity/Themes/Models/'</tt>, and you want to set common
|
|
|
280c77 |
metadata to all of them, and later remove all unused SVG defintions
|
|
|
280c77 |
from <samp>`*.svg'</samp> files. Doing so file by file may be a tedious task,
|
|
|
280c77 |
so the <tt>`centos-art.sh'</tt> script provides the svg
|
|
|
280c77 |
functionality to aid you maintain such actions.
|
|
|
035049 |
|
|
|
280c77 |
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
3.46.2.1 Metadata maintainance
|
|
|
280c77 |
|
|
|
280c77 |
The metadata used is defined by Inkscape 0.46 using the SVG standard
|
|
|
280c77 |
markup. The <tt>`centos-art.sh'</tt> script replaces everything
|
|
|
280c77 |
in-between <metadata and </metadata> tags with a
|
|
|
280c77 |
predefined metadata template we've set for this purpose.
|
|
|
280c77 |
|
|
|
280c77 |
The metadata template was created using the metadata information of a
|
|
|
280c77 |
file which, using Inkscape 0.46, all metadata fields were set. This
|
|
|
280c77 |
created a complete markup representation of how SVG metadata would
|
|
|
280c77 |
look like. Later, we replaced every single static value with a
|
|
|
280c77 |
translation marker in the form <samp>`=SOMETEXT='</samp>, where
|
|
|
280c77 |
SOMETEXT is the name of its main opening tag. Later, we
|
|
|
280c77 |
transform the metadata template into a sed replacement set of commads
|
|
|
280c77 |
escaping new lines at the end of each line.
|
|
|
280c77 |
|
|
|
280c77 |
With metadata template in place, the <tt>`centos-art.sh'</tt> script uses
|
|
|
280c77 |
it to create a metadata template instance for the file being processed
|
|
|
280c77 |
currently. The metadata template instance contains the metadata
|
|
|
280c77 |
portion of sed replacement commands with translation markers already
|
|
|
280c77 |
traduced. In this action, instance creation, is where we take
|
|
|
280c77 |
advantage of automation and generate metadata values like title, date,
|
|
|
280c77 |
keywords, source, identifier, and relation dynamically, based on the
|
|
|
280c77 |
file path <tt>`centos-art.sh'</tt> script is currently creating metadata
|
|
|
280c77 |
information for.
|
|
|
280c77 |
|
|
|
280c77 |
With metadata template instance in place, the <tt>`centos-art.sh'</tt>
|
|
|
280c77 |
script uses it to replace real values inside all <samp>`.svg'</samp> files
|
|
|
280c77 |
under the current location you're running the <tt>`centos-art.sh'</tt>
|
|
|
280c77 |
script on. Default behaviour is to ask user to enter each metadatum
|
|
|
280c77 |
required, one by one. If user leaves metadatum empty, by pressing
|
|
|
280c77 |
RET key, <tt>`centos-art.sh'</tt> uses its default value.
|
|
|
280c77 |
|
|
|
280c77 |
The <tt>`centos-art.sh'</tt> script modifies the following metadata:
|
|
|
035049 |
|
|
|
3207df |
|
|
|
280c77 |
<samp>`Title'</samp>
|
|
|
280c77 |
Name by which this document is formally known. If no value is set
|
|
|
280c77 |
here, <tt>`centos-art.sh'</tt> script uses the file name as title.
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Date'</samp>
|
|
|
280c77 |
Date associated with the creation of this document (YYYY-MM-DD). If no
|
|
|
280c77 |
value is set here, <tt>`centos-art.sh'</tt> script uses the current date
|
|
|
280c77 |
information as in date +%Y-%m-%d .
|
|
|
035049 |
|
|
|
6414c4 |
|
|
|
280c77 |
<samp>`Creator'</samp>
|
|
|
280c77 |
Name of entity primarily responsible for making the content of this
|
|
|
280c77 |
document. If no value is set here, <tt>`centos-art.sh'</tt> script uses
|
|
|
280c77 |
the string <samp>`The CentOS Project'</samp>.
|
|
|
035049 |
|
|
|
035049 |
|
|
|
280c77 |
<samp>`Rights'</samp>
|
|
|
280c77 |
Name of entity with rights to the intellectual Property of this
|
|
|
280c77 |
document. If no value is set here, <tt>`centos-art.sh'</tt> script uses
|
|
|
280c77 |
the string <samp>`The CentOS Project'</samp>.
|
|
|
035049 |
|
|
|
035049 |
|
|
|
280c77 |
<samp>`Publisher'</samp>
|
|
|
280c77 |
Name of entity responsible for making this document available. If no
|
|
|
280c77 |
value is set here, <tt>`centos-art.sh'</tt> script uses the string
|
|
|
280c77 |
<samp>`The CentOS Project'</samp>.
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Identifier'</samp>
|
|
|
280c77 |
Unique URI to reference this document. If no value is set here,
|
|
|
280c77 |
<tt>`centos-art.sh'</tt> script uses the current file path to build the
|
|
|
280c77 |
related url that points to current file location inside repository
|
|
|
280c77 |
central server.
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Source'</samp>
|
|
|
280c77 |
Unique URI to reference the source of this document. If no value is
|
|
|
280c77 |
set here, <tt>`centos-art.sh'</tt> script uses current file path to build
|
|
|
280c77 |
the related url that points to current file location inside repository
|
|
|
280c77 |
central server.
|
|
|
035049 |
|
|
|
035049 |
|
|
|
280c77 |
<samp>`Relation'</samp>
|
|
|
280c77 |
Unique URI to a related document. If no value is set here,
|
|
|
280c77 |
<tt>`centos-art.sh'</tt> script uses current file path to build the
|
|
|
280c77 |
related url that points to current file location inside repository
|
|
|
280c77 |
central server.
|
|
|
749e81 |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Language'</samp>
|
|
|
280c77 |
Two-letter language tag with optional subtags for the language of this
|
|
|
280c77 |
document. (e.g. <samp>`en-GB'</samp>). If no value is set here,
|
|
|
280c77 |
<tt>`centos-art.sh'</tt> script uses the current locale information as in
|
|
|
280c77 |
cli_getCurrentLocale function.
|
|
|
49b888 |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Keywords'</samp>
|
|
|
280c77 |
The topic of this document as comma-separated key words, prhases, or
|
|
|
280c77 |
classifications. If no value is set here, <tt>`centos-art.sh'</tt> script
|
|
|
280c77 |
uses file path to build
|
|
|
0d952c |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Coverage'</samp>
|
|
|
280c77 |
Extent or scope of this document. If no value is set here,
|
|
|
280c77 |
<tt>`centos-art.sh'</tt> script uses the string <samp>`The CentOS Project'</samp>.
|
|
|
0d952c |
|
|
|
280c77 |
|
|
|
280c77 |
<samp>`Description'</samp>
|
|
|
280c77 |
Description about the document. If no value is set here,
|
|
|
280c77 |
<tt>`centos-art.sh'</tt> script uses uses empty value as default.
|
|
|
3207df |
|
|
|
3207df |
|
|
|
280c77 |
<samp>`Contributors'</samp>
|
|
|
280c77 |
People that contributes in the creation/maintainance of the document.
|
|
|
280c77 |
If no value is set here, <tt>`centos-art.sh'</tt> script uses uses empty
|
|
|
280c77 |
value as default.
|
|
|
280c77 |
|
|
|
3207df |
|
|
|
3207df |
|
|
|
280c77 |
The <samp>`License'</samp> metadatum is not set as a choise, by now. It is
|
|
|
280c77 |
fixed Creative Common Attribution Share-Alike 3.0 License. This is done in order to
|
|
|
280c77 |
grant license consistency among all SVG files we manage inside CentOS
|
|
|
280c77 |
Artwork Repository.
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
280c77 |
3.46.2.2 Unused definitions
|
|
|
6414c4 |
|
|
|
280c77 |
Many of the no-longer-used gradients, patterns, and markers (more
|
|
|
280c77 |
precisely, those which you edited manually) remain in the
|
|
|
280c77 |
corresponding palettes and can be reused for new objects. However if
|
|
|
280c77 |
you want to optimize your document, use the <samp>`Vacuum Defs'</samp> command
|
|
|
280c77 |
in <samp>`File'</samp> menu. It will remove any gradients, patterns, or
|
|
|
280c77 |
markers which are not used by anything in the document, making the
|
|
|
280c77 |
file smaller.
|
|
|
6414c4 |
|
|
|
280c77 |
If you have one or two couple of files, removing unused definitions
|
|
|
280c77 |
using the graphical interface may be enough to you. In contrast, if
|
|
|
280c77 |
you have dozens or even houndreds of scalable vector graphics files to
|
|
|
280c77 |
maintain it is not a fun task to use the graphical interface to remove
|
|
|
280c77 |
unused definitions editing those files one by one.
|
|
|
6414c4 |
|
|
|
280c77 |
To remove unused definitions from several scalable vector graphics
|
|
|
280c77 |
files, the <tt>`centos-art.sh'</tt> script uses Inkscape's command-line
|
|
|
280c77 |
interface, specifically with the <samp>`--vaccum-defs'</samp> option.
|
|
|
6414c4 |
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
3.46.3 Usage
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
centos-art svg --update-metadata='path/to/dir'
|
|
|
280c77 |
centos-art svg --update-metadata='path/to/dir' --filter='regex'
|
|
|
280c77 |
Use these commands to update metadata information to <samp>`.svg'</samp> files
|
|
|
280c77 |
under <samp>`path/to/dir'</samp> directory.
|
|
|
3207df |
|
|
|
3207df |
|
|
|
280c77 |
centos-art svg --vacuum-defs='path/to/dir'
|
|
|
280c77 |
centos-art svg --vacuum-defs='path/to/dir' --filter='regex'
|
|
|
280c77 |
Use these commands to remove unused definitions inside <samp>`.svg'</samp>
|
|
|
280c77 |
files under <samp>`path/to/dir'</samp> directory.
|
|
|
280c77 |
|
|
|
3207df |
|
|
|
749e81 |
|
|
|
280c77 |
When you provide <samp>`--filter='regex''</samp> argument, the list of files
|
|
|
280c77 |
to process is reduced as specified in <samp>`regex'</samp> regular expression.
|
|
|
280c77 |
Inside <tt>`centos-art.sh'</tt> script, the <samp>`regex'</samp> regular
|
|
|
280c77 |
expression is used in combination with find command to look
|
|
|
280c77 |
for files matching the regular expression path pattern.
|
|
|
280c77 |
|
|
|
280c77 |
Warning In order for <samp>`regex'</samp> regular expression to match
|
|
|
280c77 |
a file, the <samp>`regex'</samp> regular expresion must match the whole file
|
|
|
280c77 |
path not just the file name.
|
|
|
280c77 |
|
|
|
280c77 |
|
|
|
280c77 |
For example, if you want to match all <tt>`summary.svg'</tt> files inside
|
|
|
280c77 |
<tt>`path/to/dir'</tt>, use the .+/summary regular expression.
|
|
|
280c77 |
Later, <tt>`centos-art.sh'</tt> script uses this value inside
|
|
|
280c77 |
^$REGEX\.svg$ expression in order to build the final regular
|
|
|
280c77 |
expression (i.e., ^.+/summary\.svg$ ) that is evaluated against
|
|
|
280c77 |
available file paths inside the list of files to process.
|
|
|
280c77 |
|
|
|
280c77 |
Exceptionally, when you provide <samp>`--filter='regex''</samp> in the way
|
|
|
280c77 |
that <samp>`regex'</samp>, appended to <samp>`path/to/dir/'</samp> (i.e.
|
|
|
280c77 |
<samp>`path/to/dir/regex'</samp>), matches a regular file; the
|
|
|
280c77 |
<tt>`centos-art.sh'</tt> script uses the file matching as only file in the
|
|
|
280c77 |
list of files to process.
|
|
|
280c77 |
|
|
|
3207df |
|
|
|
280c77 |
|
|
|
4c79b5 |
3.46.4 See also
|
|
|
4c79b5 |
|
|
|
008ee0 |
|
|
|
280c77 |
3.37 trunk/Scripts/Bash
|
|
|
3d6160 |
|
|
|
280c77 |
3.38 trunk/Scripts/Bash/Functions
|
|
|
e37211 |
|
|
|
008ee0 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
280c77 |
[ < ]
|
|
|
280c77 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
280c77 |
[ Up ]
|
|
|
280c77 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<font size="-1">
|
|
|
6414c4 |
This document was generated on January, 3 2011 using texi2html 1.76.
|
|
|
4c79b5 |
</font>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</body>
|
|
|
4c79b5 |
</html>
|