diff --git a/Scripts/Bash/Functions/Html/html.sh b/Scripts/Bash/Functions/Html/html.sh new file mode 100755 index 0000000..9f382b2 --- /dev/null +++ b/Scripts/Bash/Functions/Html/html.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# html.sh -- This function provides very basic HTML manipulations to +# help maintain html files inside the repository. +# +# 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$ +# ---------------------------------------------------------------------- + +function html { + + # Initialize documentation functions and path patterns. + html_getActions + +} diff --git a/Scripts/Bash/Functions/Html/html_getActions.sh b/Scripts/Bash/Functions/Html/html_getActions.sh new file mode 100755 index 0000000..a77f282 --- /dev/null +++ b/Scripts/Bash/Functions/Html/html_getActions.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# html_getActions.sh -- This function initializes HTML string +# manipulation functionalities, using the option value of +# centos-art.sh script as reference. +# +# 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$ +# ---------------------------------------------------------------------- + +function html_getActions { + + # Evaluate option name and define which actions does centos-art.sh + # script supports. + case $OPTIONNAM in + + --update-headings ) + # Update html headings to create table of content. + html_updateHeadings + ;; + + esac + +} diff --git a/Scripts/Bash/Functions/Html/html_updateHeadings.sh b/Scripts/Bash/Functions/Html/html_updateHeadings.sh new file mode 100644 index 0000000..3176284 --- /dev/null +++ b/Scripts/Bash/Functions/Html/html_updateHeadings.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# html_updateHeadings.sh -- This function transforms html headings to +# create the page table of content headings as reference. Multiple +# heading levels are supported using nested lists. Use this function +# over html files inside the repository to standardize their headings. +# +# - This function looks for
...
specification +# inside your page and, if present, replace the content inside +# with the link list o headinds. +# +# - If
...
specification is present on the +# page it is updated with headings links. Otherwise only heading +# links are created. +# +# - If
...
specification is malformed (e.g., +# you forgot the closing tag), this function will look the next +# closing div in your html code and replace everything in-between +# with the table of content. +# +# 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$ +# ---------------------------------------------------------------------- + +function html_updateHeadings { + +}