|
|
ee1f37 |
|
|
|
ee1f37 |
<html>
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
Permission is granted to copy, distribute and/or modify this document
|
|
|
ee1f37 |
under the terms of the GNU Free Documentation License, Version 1.2 or
|
|
|
ee1f37 |
any later version published by the Free Software Foundation; with no
|
|
|
ee1f37 |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
|
|
ee1f37 |
copy of the license is included in the section entitled GNU Free
|
|
|
ee1f37 |
Documentation License.
|
|
|
ee1f37 |
-->
|
|
|
406f69 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
|
ee1f37 |
Karl Berry <karl@freefriends.org>
|
|
|
ee1f37 |
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
|
ee1f37 |
and many others.
|
|
|
ee1f37 |
Maintained by: Many creative people <dev@texi2html.cvshome.org>
|
|
|
ee1f37 |
Send bugs and suggestions to <users@texi2html.cvshome.org>
|
|
|
ee1f37 |
|
|
|
ee1f37 |
-->
|
|
|
ee1f37 |
<head>
|
|
|
063806 |
<title>CentOS Artwork Repository: 2.61 The trunk/Scripts/Bash/Cli/Functions/Svg Directory</title>
|
|
|
ee1f37 |
|
|
|
063806 |
<meta name="description" content="CentOS Artwork Repository: 2.61 The trunk/Scripts/Bash/Cli/Functions/Svg Directory">
|
|
|
063806 |
<meta name="keywords" content="CentOS Artwork Repository: 2.61 The trunk/Scripts/Bash/Cli/Functions/Svg Directory">
|
|
|
ee1f37 |
<meta name="resource-type" content="document">
|
|
|
ee1f37 |
<meta name="distribution" content="global">
|
|
|
ee1f37 |
<meta name="Generator" content="texi2html 1.76">
|
|
|
ee1f37 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
ee1f37 |
<style type="text/css">
|
|
|
ee1f37 |
|
|
|
ee1f37 |
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
|
|
|
ee1f37 |
|
|
|
ee1f37 |
a.summary-letter {text-decoration: none}
|
|
|
ee1f37 |
pre.display {font-family: serif}
|
|
|
ee1f37 |
pre.format {font-family: serif}
|
|
|
ee1f37 |
pre.menu-comment {font-family: serif}
|
|
|
ee1f37 |
pre.menu-preformatted {font-family: serif}
|
|
|
ee1f37 |
pre.smalldisplay {font-family: serif; font-size: smaller}
|
|
|
ee1f37 |
pre.smallexample {font-size: smaller}
|
|
|
ee1f37 |
pre.smallformat {font-family: serif; font-size: smaller}
|
|
|
ee1f37 |
pre.smalllisp {font-size: smaller}
|
|
|
ee1f37 |
span.sansserif {font-family:sans-serif; font-weight:normal;}
|
|
|
ee1f37 |
ul.toc {list-style: none}
|
|
|
ee1f37 |
-->
|
|
|
ee1f37 |
</style>
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
</head>
|
|
|
ee1f37 |
|
|
|
ee1f37 |
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
063806 |
[ < ]
|
|
|
063806 |
[ > ]
|
|
|
ee1f37 |
|
|
|
063806 |
[ << ]
|
|
|
063806 |
[ Up ]
|
|
|
063806 |
[ >> ]
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
56a476 |
[Top]
|
|
|
56a476 |
[Contents]
|
|
|
063806 |
[Index]
|
|
|
56a476 |
[ ? ]
|
|
|
ee1f37 |
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
2.61 The <tt>`trunk/Scripts/Bash/Cli/Functions/Svg'</tt> Directory
|
|
|
b130a0 |
|
|
|
b9dbd3 |
|
|
|
063806 |
|
|
|
063806 |
2.61.1 Goals
|
|
|
b9dbd3 |
|
|
|
063806 |
This section exists to organize files related to svg
|
|
|
063806 |
functionality of <tt>`centos-art.sh'</tt> script.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
2.61.2 Description
|
|
|
b9dbd3 |
|
|
|
063806 |
The svg functionality of <tt>`centos-art.sh'</tt> script helps you
|
|
|
063806 |
to maintain scalable vector graphics (SVG) inside repository. For
|
|
|
063806 |
example, suppose you've been working in CentOS default design models
|
|
|
063806 |
under <tt>`trunk/Identity/Themes/Models/'</tt>, and you want to set common
|
|
|
063806 |
metadata to all of them, and later remove all unused SVG defintions
|
|
|
063806 |
from <samp>`*.svg'</samp> files. Doing so file by file may be a tedious task,
|
|
|
063806 |
so the <tt>`centos-art.sh'</tt> script provides the svg
|
|
|
063806 |
functionality to aid you maintain such actions.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
b9dbd3 |
|
|
|
063806 |
|
|
|
063806 |
2.61.2.1 Metadata maintainance
|
|
|
b9dbd3 |
|
|
|
063806 |
The metadata used is defined by Inkscape 0.46 using the SVG standard
|
|
|
063806 |
markup. The <tt>`centos-art.sh'</tt> script replaces everything
|
|
|
063806 |
in-between <metadata and </metadata> tags with a
|
|
|
063806 |
predefined metadata template we've set for this purpose.
|
|
|
063806 |
|
|
|
063806 |
The metadata template was created using the metadata information of a
|
|
|
063806 |
file which, using Inkscape 0.46, all metadata fields were set. This
|
|
|
063806 |
created a complete markup representation of how SVG metadata would
|
|
|
063806 |
look like. Later, we replaced every single static value with a
|
|
|
063806 |
translation marker in the form <samp>`=SOMETEXT='</samp>, where
|
|
|
063806 |
SOMETEXT is the name of its main opening tag. Later, we
|
|
|
063806 |
transform the metadata template into a sed replacement set of commads
|
|
|
063806 |
escaping new lines at the end of each line.
|
|
|
063806 |
|
|
|
063806 |
With metadata template in place, the <tt>`centos-art.sh'</tt> script uses
|
|
|
063806 |
it to create a metadata template instance for the file being processed
|
|
|
063806 |
currently. The metadata template instance contains the metadata
|
|
|
063806 |
portion of sed replacement commands with translation markers already
|
|
|
063806 |
traduced. In this action, instance creation, is where we take
|
|
|
063806 |
advantage of automation and generate metadata values like title, date,
|
|
|
063806 |
keywords, source, identifier, and relation dynamically, based on the
|
|
|
063806 |
file path <tt>`centos-art.sh'</tt> script is currently creating metadata
|
|
|
063806 |
information for.
|
|
|
063806 |
|
|
|
063806 |
With metadata template instance in place, the <tt>`centos-art.sh'</tt>
|
|
|
063806 |
script uses it to replace real values inside all <samp>`.svg'</samp> files
|
|
|
063806 |
under the current location you're running the <tt>`centos-art.sh'</tt>
|
|
|
063806 |
script on. Default behaviour is to ask user to enter each metadatum
|
|
|
063806 |
required, one by one. If user leaves metadatum empty, by pressing
|
|
|
063806 |
RET key, <tt>`centos-art.sh'</tt> uses its default value.
|
|
|
063806 |
|
|
|
063806 |
The <tt>`centos-art.sh'</tt> script modifies the following metadata:
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Title'</samp>
|
|
|
063806 |
Name by which this document is formally known. If no value is set
|
|
|
063806 |
here, <tt>`centos-art.sh'</tt> script uses the file name as title.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Date'</samp>
|
|
|
063806 |
Date associated with the creation of this document (YYYY-MM-DD). If no
|
|
|
063806 |
value is set here, <tt>`centos-art.sh'</tt> script uses the current date
|
|
|
063806 |
information as in date +%Y-%m-%d .
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Creator'</samp>
|
|
|
063806 |
Name of entity primarily responsible for making the content of this
|
|
|
063806 |
document. If no value is set here, <tt>`centos-art.sh'</tt> script uses
|
|
|
063806 |
the string <samp>`The CentOS Project'</samp>.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Rights'</samp>
|
|
|
063806 |
Name of entity with rights to the intellectual Property of this
|
|
|
063806 |
document. If no value is set here, <tt>`centos-art.sh'</tt> script uses
|
|
|
063806 |
the string <samp>`The CentOS Project'</samp>.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Publisher'</samp>
|
|
|
063806 |
Name of entity responsible for making this document available. If no
|
|
|
063806 |
value is set here, <tt>`centos-art.sh'</tt> script uses the string
|
|
|
063806 |
<samp>`The CentOS Project'</samp>.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Identifier'</samp>
|
|
|
063806 |
Unique URI to reference this document. If no value is set here,
|
|
|
063806 |
<tt>`centos-art.sh'</tt> script uses the current file path to build the
|
|
|
063806 |
related url that points to current file location inside repository
|
|
|
063806 |
central server.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Source'</samp>
|
|
|
063806 |
Unique URI to reference the source of this document. If no value is
|
|
|
063806 |
set here, <tt>`centos-art.sh'</tt> script uses current file path to build
|
|
|
063806 |
the related url that points to current file location inside repository
|
|
|
063806 |
central server.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Relation'</samp>
|
|
|
063806 |
Unique URI to a related document. If no value is set here,
|
|
|
063806 |
<tt>`centos-art.sh'</tt> script uses current file path to build the
|
|
|
063806 |
related url that points to current file location inside repository
|
|
|
063806 |
central server.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Language'</samp>
|
|
|
063806 |
Two-letter language tag with optional subtags for the language of this
|
|
|
063806 |
document. (e.g. <samp>`en-GB'</samp>). If no value is set here,
|
|
|
063806 |
<tt>`centos-art.sh'</tt> script uses the current locale information as in
|
|
|
063806 |
cli_getCurrentLocale function.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Keywords'</samp>
|
|
|
063806 |
The topic of this document as comma-separated key words, prhases, or
|
|
|
063806 |
classifications. If no value is set here, <tt>`centos-art.sh'</tt> script
|
|
|
063806 |
uses file path to build
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Coverage'</samp>
|
|
|
063806 |
Extent or scope of this document. If no value is set here,
|
|
|
063806 |
<tt>`centos-art.sh'</tt> script uses the string <samp>`The CentOS Project'</samp>.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Description'</samp>
|
|
|
063806 |
Description about the document. If no value is set here,
|
|
|
063806 |
<tt>`centos-art.sh'</tt> script uses uses empty value as default.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
<samp>`Contributors'</samp>
|
|
|
063806 |
People that contributes in the creation/maintainance of the document.
|
|
|
063806 |
If no value is set here, <tt>`centos-art.sh'</tt> script uses uses empty
|
|
|
063806 |
value as default.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
b9dbd3 |
|
|
|
063806 |
The <samp>`License'</samp> metadatum is not set as a choise, by now. It is
|
|
|
063806 |
fixed Creative Common Attribution Share-Alike 3.0 License. This is done in order to
|
|
|
063806 |
grant license consistency among all SVG files we manage inside CentOS
|
|
|
063806 |
Artwork Repository.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
b9dbd3 |
|
|
|
063806 |
|
|
|
063806 |
2.61.2.2 Unused definitions
|
|
|
b9dbd3 |
|
|
|
063806 |
Many of the no-longer-used gradients, patterns, and markers (more
|
|
|
063806 |
precisely, those which you edited manually) remain in the
|
|
|
063806 |
corresponding palettes and can be reused for new objects. However if
|
|
|
063806 |
you want to optimize your document, use the <samp>`Vacuum Defs'</samp> command
|
|
|
063806 |
in <samp>`File'</samp> menu. It will remove any gradients, patterns, or
|
|
|
063806 |
markers which are not used by anything in the document, making the
|
|
|
063806 |
file smaller.
|
|
|
063806 |
|
|
|
063806 |
If you have one or two couple of files, removing unused definitions
|
|
|
063806 |
using the graphical interface may be enough to you. In contrast, if
|
|
|
063806 |
you have dozens or even houndreds of scalable vector graphics files to
|
|
|
063806 |
maintain it is not a fun task to use the graphical interface to remove
|
|
|
063806 |
unused definitions editing those files one by one.
|
|
|
063806 |
|
|
|
063806 |
To remove unused definitions from several scalable vector graphics
|
|
|
063806 |
files, the <tt>`centos-art.sh'</tt> script uses Inkscape command-line
|
|
|
063806 |
interface, specifically with the <samp>`--vaccum-defs'</samp> option.
|
|
|
063806 |
|
|
|
b9dbd3 |
|
|
|
063806 |
|
|
|
063806 |
2.61.3 Usage
|
|
|
b9dbd3 |
|
|
|
063806 |
|
|
|
063806 |
centos-art svg --update-metadata='path/to/dir'
|
|
|
063806 |
centos-art svg --update-metadata='path/to/dir' --filter='regex'
|
|
|
063806 |
Use these commands to update metadata information to <samp>`.svg'</samp> files
|
|
|
063806 |
under <samp>`path/to/dir'</samp> directory.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
063806 |
centos-art svg --vacuum-defs='path/to/dir'
|
|
|
063806 |
centos-art svg --vacuum-defs='path/to/dir' --filter='regex'
|
|
|
063806 |
Use these commands to remove unused definitions inside <samp>`.svg'</samp>
|
|
|
063806 |
files under <samp>`path/to/dir'</samp> directory.
|
|
|
063806 |
|
|
|
063806 |
|
|
|
b130a0 |
|
|
|
063806 |
When you provide <samp>`--filter='regex''</samp> argument, the list of files
|
|
|
063806 |
to process is reduced as specified in <samp>`regex'</samp> regular expression.
|
|
|
063806 |
Inside <tt>`centos-art.sh'</tt> script, the <samp>`regex'</samp> regular
|
|
|
063806 |
expression is used in combination with find command to look
|
|
|
063806 |
for files matching the regular expression path pattern.
|
|
|
063806 |
|
|
|
063806 |
Warning In order for <samp>`regex'</samp> regular expression to match
|
|
|
063806 |
a file, the <samp>`regex'</samp> regular expresion must match the whole file
|
|
|
063806 |
path not just the file name.
|
|
|
063806 |
|
|
|
b130a0 |
|
|
|
063806 |
For example, if you want to match all <tt>`summary.svg'</tt> files inside
|
|
|
063806 |
<tt>`path/to/dir'</tt>, use the .+/summary regular expression.
|
|
|
063806 |
Later, <tt>`centos-art.sh'</tt> script uses this value inside
|
|
|
063806 |
^$REGEX\.svg$ expression in order to build the final regular
|
|
|
063806 |
expression (i.e., ^.+/summary\.svg$ ) that is evaluated against
|
|
|
063806 |
available file paths inside the list of files to process.
|
|
|
063806 |
|
|
|
063806 |
Exceptionally, when you provide <samp>`--filter='regex''</samp> in the way
|
|
|
063806 |
that <samp>`regex'</samp>, appended to <samp>`path/to/dir/'</samp> (i.e.
|
|
|
063806 |
<samp>`path/to/dir/regex'</samp>), matches a regular file; the
|
|
|
063806 |
<tt>`centos-art.sh'</tt> script uses the file matching as only file in the
|
|
|
063806 |
list of files to process.
|
|
|
063806 |
|
|
|
b130a0 |
|
|
|
063806 |
|
|
|
063806 |
2.61.4 See also
|
|
|
982d5c |
|
|
|
063806 |
|
|
|
063806 |
2.50 The <tt>`trunk/Scripts/Bash'</tt> Directory
|
|
|
063806 |
|
|
|
063806 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
063806 |
[ < ]
|
|
|
063806 |
[ > ]
|
|
|
ee1f37 |
|
|
|
063806 |
[ << ]
|
|
|
063806 |
[ Up ]
|
|
|
063806 |
[ >> ]
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
<font size="-1">
|
|
|
406f69 |
This document was generated on March, 1 2011 using texi2html 1.76.
|
|
|
ee1f37 |
</font>
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
|
|
|
ee1f37 |
</body>
|
|
|
ee1f37 |
</html>
|