diff --git a/Scripts/Functions/Tuneup/Backends/Shell/Config/shell_topcomment.sed b/Scripts/Functions/Tuneup/Backends/Shell/Config/shell_topcomment.sed new file mode 100644 index 0000000..9da4fdb --- /dev/null +++ b/Scripts/Functions/Tuneup/Backends/Shell/Config/shell_topcomment.sed @@ -0,0 +1,55 @@ +#!/bin/sed +# +# shell_topcomment.sed -- This file standardizes the top comment +# inside centos-art.sh scripts. +# +# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- +/^# +Copyright .*$/a\ +# Copyright (C) =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=\ +#\ +# This program is free software; you can redistribute it and/or modify\ +# it under the terms of the GNU General Public License as published by\ +# the Free Software Foundation; either version 2 of the License, or (at\ +# your option) any later version.\ +#\ +# This program is distributed in the hope that it will be useful, but\ +# WITHOUT ANY WARRANTY; without even the implied warranty of\ +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\ +# General Public License for more details.\ +#\ +# You should have received a copy of the GNU General Public License\ +# along with this program; if not, write to the Free Software\ +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\ +#\ +# ---------------------------------------------------------------------- + +# Remove previous copyright notice, just to be sure the one above be +# used always. +/^# +Copyright .*$/,/^# -{70}$/{ +d +} + +# Remove more than one space after comments. +s/^# +/# / + +# Define script first line. +1c\ +#!/bin/bash diff --git a/Scripts/Functions/Tuneup/Backends/Svg/svg_metadata.sed b/Scripts/Functions/Tuneup/Backends/Svg/svg_metadata.sed new file mode 100644 index 0000000..199c44d --- /dev/null +++ b/Scripts/Functions/Tuneup/Backends/Svg/svg_metadata.sed @@ -0,0 +1,64 @@ +# This file is the metadata information used by CentOS Artwork SIG on +# its scalable vector graphics (SVG) files. This files is used with +# the regular expression '.*\.svg$' only. +# --------------------------------------------------- +# $Id$ +# --------------------------------------------------- +/<metadata/,/<\/metadata/c\ + <metadata\ + id="CENTOSMETADATA">\ + <rdf:RDF>\ + <cc:Work\ + rdf:about="">\ + <dc:format>image/svg+xml</dc:format>\ + <dc:type\ + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\ + <cc:license\ + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />\ + <dc:title>=TITLE=</dc:title>\ + <dc:date>=DATE=</dc:date>\ + <dc:creator>\ + <cc:Agent>\ + <dc:title>=COPYRIGHT_HOLDER=</dc:title>\ + </cc:Agent>\ + </dc:creator>\ + <dc:rights>\ + <cc:Agent>\ + <dc:title>=COPYRIGHT_HOLDER=</dc:title>\ + </cc:Agent>\ + </dc:rights>\ + <dc:publisher>\ + <cc:Agent>\ + <dc:title>=COPYRIGHT_HOLDER=</dc:title>\ + </cc:Agent>\ + </dc:publisher>\ + <dc:identifier>=URL=</dc:identifier>\ + <dc:source>=URL=</dc:source>\ + <dc:relation>=URL=</dc:relation>\ + <dc:language>=LOCALE=</dc:language>\ + <dc:subject>\ + <rdf:Bag>\ +=KEYWORDS=\ + </rdf:Bag>\ + </dc:subject>\ + <dc:coverage>=COPYRIGHT_HOLDER=</dc:coverage>\ + <dc:description />\ + <dc:contributor />\ + </cc:Work>\ + <cc:License\ + rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">\ + <cc:permits\ + rdf:resource="http://creativecommons.org/ns#Reproduction" />\ + <cc:permits\ + rdf:resource="http://creativecommons.org/ns#Distribution" />\ + <cc:requires\ + rdf:resource="http://creativecommons.org/ns#Notice" />\ + <cc:requires\ + rdf:resource="http://creativecommons.org/ns#Attribution" />\ + <cc:permits\ + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />\ + <cc:requires\ + rdf:resource="http://creativecommons.org/ns#ShareAlike" />\ + </cc:License>\ + </rdf:RDF>\ + </metadata> diff --git a/Scripts/Functions/Tuneup/Backends/Xhtml/Config/xhtml_toc.awk b/Scripts/Functions/Tuneup/Backends/Xhtml/Config/xhtml_toc.awk new file mode 100644 index 0000000..7c31b72 --- /dev/null +++ b/Scripts/Functions/Tuneup/Backends/Xhtml/Config/xhtml_toc.awk @@ -0,0 +1,79 @@ +#!/usr/bin/gawk +# +# output_forHadingsToc.awk -- This file provides the output format +# required by tuneup_doXhtmlHeadings function, inside centos-art.sh +# script, to produce the table of contents correctly. +# +# Copyright (C) 2009-2010 Alain Reguera Delgado +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- + +BEGIN {FS=":"} + +{ + if ($1 == 0 && $2 == $3) { + opentags = "<ul><li>" + closetags = "" + } + + if ($1 > 0 && $2 > $3) { + opentags = "<ul><li>" + closetags = "" + } + + if ($1 > 0 && $2 == $3) { + opentags = "</li><li>" + closetags = "" + } + + if ($1 > 0 && $2 < $3) { + opentags = "" + for (i = 1; i <= ($3 - $2); i++) { + opentags = opentags "</li></ul>" + closetags = "" + } + opentags = opentags "</li><li>" + } + + printf "%s%s%s\n",opentags,$4,closetags + +} + +END { + + if ($1 > 0 && $2 >= $3 && $3 > 1) { + for (i = 1; i <= $3; i++) { + print "</li></ul>" + } + } + + if ($1 > 0 && $2 >= $3 && $3 == 1) { + print "</li></ul>" + print "</li></ul>" + } + + if ($1 > 0 && $2 < $3) { + for (i = 1; i <= $2; i++) { + print "</li></ul>" + } + } + + print "</div>" +} diff --git a/Scripts/Functions/Tuneup/Config/output_forHeadingsToc.awk b/Scripts/Functions/Tuneup/Config/output_forHeadingsToc.awk deleted file mode 100644 index 7c31b72..0000000 --- a/Scripts/Functions/Tuneup/Config/output_forHeadingsToc.awk +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/gawk -# -# output_forHadingsToc.awk -- This file provides the output format -# required by tuneup_doXhtmlHeadings function, inside centos-art.sh -# script, to produce the table of contents correctly. -# -# Copyright (C) 2009-2010 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -BEGIN {FS=":"} - -{ - if ($1 == 0 && $2 == $3) { - opentags = "<ul><li>" - closetags = "" - } - - if ($1 > 0 && $2 > $3) { - opentags = "<ul><li>" - closetags = "" - } - - if ($1 > 0 && $2 == $3) { - opentags = "</li><li>" - closetags = "" - } - - if ($1 > 0 && $2 < $3) { - opentags = "" - for (i = 1; i <= ($3 - $2); i++) { - opentags = opentags "</li></ul>" - closetags = "" - } - opentags = opentags "</li><li>" - } - - printf "%s%s%s\n",opentags,$4,closetags - -} - -END { - - if ($1 > 0 && $2 >= $3 && $3 > 1) { - for (i = 1; i <= $3; i++) { - print "</li></ul>" - } - } - - if ($1 > 0 && $2 >= $3 && $3 == 1) { - print "</li></ul>" - print "</li></ul>" - } - - if ($1 > 0 && $2 < $3) { - for (i = 1; i <= $2; i++) { - print "</li></ul>" - } - } - - print "</div>" -} diff --git a/Scripts/Functions/Tuneup/Config/shell_topcomment.sed b/Scripts/Functions/Tuneup/Config/shell_topcomment.sed deleted file mode 100644 index 9da4fdb..0000000 --- a/Scripts/Functions/Tuneup/Config/shell_topcomment.sed +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sed -# -# shell_topcomment.sed -- This file standardizes the top comment -# inside centos-art.sh scripts. -# -# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- -/^# +Copyright .*$/a\ -# Copyright (C) =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=\ -#\ -# This program is free software; you can redistribute it and/or modify\ -# it under the terms of the GNU General Public License as published by\ -# the Free Software Foundation; either version 2 of the License, or (at\ -# your option) any later version.\ -#\ -# This program is distributed in the hope that it will be useful, but\ -# WITHOUT ANY WARRANTY; without even the implied warranty of\ -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\ -# General Public License for more details.\ -#\ -# You should have received a copy of the GNU General Public License\ -# along with this program; if not, write to the Free Software\ -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\ -#\ -# ---------------------------------------------------------------------- - -# Remove previous copyright notice, just to be sure the one above be -# used always. -/^# +Copyright .*$/,/^# -{70}$/{ -d -} - -# Remove more than one space after comments. -s/^# +/# / - -# Define script first line. -1c\ -#!/bin/bash diff --git a/Scripts/Functions/Tuneup/Config/svg_metadata.sed b/Scripts/Functions/Tuneup/Config/svg_metadata.sed deleted file mode 100644 index 199c44d..0000000 --- a/Scripts/Functions/Tuneup/Config/svg_metadata.sed +++ /dev/null @@ -1,64 +0,0 @@ -# This file is the metadata information used by CentOS Artwork SIG on -# its scalable vector graphics (SVG) files. This files is used with -# the regular expression '.*\.svg$' only. -# --------------------------------------------------- -# $Id$ -# --------------------------------------------------- -/<metadata/,/<\/metadata/c\ - <metadata\ - id="CENTOSMETADATA">\ - <rdf:RDF>\ - <cc:Work\ - rdf:about="">\ - <dc:format>image/svg+xml</dc:format>\ - <dc:type\ - rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\ - <cc:license\ - rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />\ - <dc:title>=TITLE=</dc:title>\ - <dc:date>=DATE=</dc:date>\ - <dc:creator>\ - <cc:Agent>\ - <dc:title>=COPYRIGHT_HOLDER=</dc:title>\ - </cc:Agent>\ - </dc:creator>\ - <dc:rights>\ - <cc:Agent>\ - <dc:title>=COPYRIGHT_HOLDER=</dc:title>\ - </cc:Agent>\ - </dc:rights>\ - <dc:publisher>\ - <cc:Agent>\ - <dc:title>=COPYRIGHT_HOLDER=</dc:title>\ - </cc:Agent>\ - </dc:publisher>\ - <dc:identifier>=URL=</dc:identifier>\ - <dc:source>=URL=</dc:source>\ - <dc:relation>=URL=</dc:relation>\ - <dc:language>=LOCALE=</dc:language>\ - <dc:subject>\ - <rdf:Bag>\ -=KEYWORDS=\ - </rdf:Bag>\ - </dc:subject>\ - <dc:coverage>=COPYRIGHT_HOLDER=</dc:coverage>\ - <dc:description />\ - <dc:contributor />\ - </cc:Work>\ - <cc:License\ - rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">\ - <cc:permits\ - rdf:resource="http://creativecommons.org/ns#Reproduction" />\ - <cc:permits\ - rdf:resource="http://creativecommons.org/ns#Distribution" />\ - <cc:requires\ - rdf:resource="http://creativecommons.org/ns#Notice" />\ - <cc:requires\ - rdf:resource="http://creativecommons.org/ns#Attribution" />\ - <cc:permits\ - rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />\ - <cc:requires\ - rdf:resource="http://creativecommons.org/ns#ShareAlike" />\ - </cc:License>\ - </rdf:RDF>\ - </metadata>