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