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