From 4a8b0cd665dc9ae4a44cade22e0d82a0be6fffef Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jun 11 2011 00:21:33 +0000 Subject: Update directory structure of `tuneup' functionality: - Create Svg, Shell, and Xhtml backend directories. - The file `output_forHeadingsToc.awk' was renamed to `xhtml_toc.awk'. - Move backend-specific configuration files from common Config directory to backend-specific Config directory. - Remove common Config directory. --- 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$ +# --------------------------------------------------- +/\ + \ + \ + image/svg+xml\ + \ + \ + =TITLE=\ + =DATE=\ + \ + \ + =COPYRIGHT_HOLDER=\ + \ + \ + \ + \ + =COPYRIGHT_HOLDER=\ + \ + \ + \ + \ + =COPYRIGHT_HOLDER=\ + \ + \ + =URL=\ + =URL=\ + =URL=\ + =LOCALE=\ + \ + \ +=KEYWORDS=\ + \ + \ + =COPYRIGHT_HOLDER=\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + 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 = "" + } + } + + if ($1 > 0 && $2 >= $3 && $3 == 1) { + print "" + print "" + } + + if ($1 > 0 && $2 < $3) { + for (i = 1; i <= $2; i++) { + print "" + } + } + + print "" +} 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 = "" - } - } - - if ($1 > 0 && $2 >= $3 && $3 == 1) { - print "" - print "" - } - - if ($1 > 0 && $2 < $3) { - for (i = 1; i <= $2; i++) { - print "" - } - } - - print "" -} 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$ -# --------------------------------------------------- -/\ - \ - \ - image/svg+xml\ - \ - \ - =TITLE=\ - =DATE=\ - \ - \ - =COPYRIGHT_HOLDER=\ - \ - \ - \ - \ - =COPYRIGHT_HOLDER=\ - \ - \ - \ - \ - =COPYRIGHT_HOLDER=\ - \ - \ - =URL=\ - =URL=\ - =URL=\ - =LOCALE=\ - \ - \ -=KEYWORDS=\ - \ - \ - =COPYRIGHT_HOLDER=\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -