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