From 06af9770d83aa599bc726eec6b79d510cd1fa56a Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Apr 18 2011 02:32:37 +0000 Subject: Rename repository.init to repository-init.pl. --- diff --git a/Manual/repository-init.pl b/Manual/repository-init.pl new file mode 100755 index 0000000..1f8a3a1 --- /dev/null +++ b/Manual/repository-init.pl @@ -0,0 +1,393 @@ +#!/usr/bin/perl +# +# repository.init -- This file initializes Texi2HTML program to +# produce the repository documentation manual using the CentOS Web +# Environment XHTML and CSS standard definition. +# +# Copyright (C) 2009-2011 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$ +# ---------------------------------------------------------------------- + +# -iso +# if set, ISO8859 characters are used for special symbols (like copyright, etc) +$USE_ISO = 1; + +# -I +# add a directory to the list of directories where @include files are +# searched for (besides the directory of the file). additional '-I' +# args are appended to this list. (APA: Don't implicitely search ., +# to conform with the docs!) my @INCLUDE_DIRS = ("."); +@INCLUDE_DIRS = ("/home/centos/artwork"); + +# Extension used on output files. +$EXTENSION = "xhtml"; + +# Horizontal rules. +$DEFAULT_RULE = '

'; +$SMALL_RULE = $DEFAULT_RULE; +$MIDDLE_RULE = $DEFAULT_RULE; +$BIG_RULE = $DEFAULT_RULE; + +# -split section|chapter|node|none +# if $SPLIT is set to 'section' (resp. 'chapter') one html file per +# section (resp. chapter) is generated. If $SPLIT is set to 'node' one +# html file per node or sectionning element is generated. In all these +# cases separate pages for Top, Table of content (Toc), Overview and +# About are generated. Otherwise a monolithic html file that contains +# the whole document is created. +$SPLIT = 'section'; + +# -sec-nav|-nosec-nav +# if this is set then navigation panels are printed at the beginning +# of each section. If the document is split at nodes then navigation +# panels are printed at the end if there were more than $WORDS_IN_PAGE +# words on page. +# +# If the document is split at sections this is ignored. +# +# This is most useful if you do not want to have section navigation +# with -split chapter. There will be chapter navigation panel at the +# beginning and at the end of chapters anyway. +$SECTION_NAVIGATION = 0; + +# Layout control +$print_page_head = \&T2H_XHTML_print_page_head; +$print_page_foot = \&T2H_XHTML_print_page_foot; +$print_frame = \&T2H_XHTML_print_frame; +$button_icon_img = \&T2H_XHTML_button_icon_img; +$print_navigation = \&T2H_XHTML_print_navigation; + +#FIXME update once it is more stabilized in texi2html.init +sub T2H_XHTML_print_page_head +{ + my $fh = shift; + my $longtitle = "$Texi2HTML::THISDOC{'title_unformatted'}"; + $longtitle .= ": $Texi2HTML::UNFORMATTED{'This'}" if exists $Texi2HTML::UNFORMATTED{'This'}; + $T2H_LANG='en'; + @date=localtime(time); + $year=$date[5] += 1900; + print $fh < + + + + + $longtitle + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + +EOT +} + +sub T2H_XHTML_print_page_foot +{ + my $fh = shift; + print $fh <
+ +
+ +
+ +

+ + + + + + +EOT +} + +# / in +sub T2H_XHTML_button_icon_img +{ + my $button = shift; + my $icon = shift; + my $name = shift; + return '' if (!defined($icon)); + if (defined($name) && $name) + { + $name = ": $name"; + } + else + { + $name = ''; + } + $button = "" if (!defined ($button)); + return qq{$button$name}; +} + +$simple_map{'*'} = '
'; + +# formatting functions + +$def_line = \&t2h_xhtml_def_line; +$index_summary = \&t2h_xhtml_index_summary; +$image = \&t2h_xhtml_image; + +# need / in +sub t2h_xhtml_image($$$) +{ + my $file = shift; + my $base = shift; + my $preformatted = shift; + return "[ $base ]" if ($preformatted); + return "\"$base\""; +} + +# process definition commands line @deffn for example +# replaced by +sub t2h_xhtml_def_line($$$$$) +{ + my $category = shift; + my $name = shift; + my $type = shift; + my $arguments = shift; + my $index_label = shift; + $index_label = '' if (!defined($index_label)); + $name = '' if (!defined($name) or ($name =~ /^\s*$/)); + $type = '' if (!defined($type) or $type =~ /^\s*$/); + if (!defined($arguments) or $arguments =~ /^\s*$/) + { + $arguments = ''; + } + else + { + $arguments = '' . $arguments . ''; + } + my $type_name = ''; + $type_name = " $type" if ($type ne ''); + $type_name .= ' ' . $name . '' if ($name ne ''); + $type_name .= $arguments . "\n"; + if (! $DEF_TABLE) + { + return '
'. '' . $category . ':' . $type_name . $index_label . "
\n"; + } + else + { + + return "\n" . $type_name . + "\n" . $category . $index_label . "\n" . "\n"; + } +} + +# There is a br which needs / +sub t2h_xhtml_index_summary($$) +{ + my $alpha = shift; + my $nonalpha = shift; + my $join = ''; + my $nonalpha_text = ''; + my $alpha_text = ''; + $join = "   \n
\n" if (@$nonalpha and @$alpha); + if (@$nonalpha) + { + $nonalpha_text = join("\n   \n", @$nonalpha) . "\n"; + } + if (@$alpha) + { + $alpha_text = join("\n   \n", @$alpha) . "\n   \n"; + } + #I18n + return "
Jump to:   " . + $nonalpha_text . $join . $alpha_text . '
'; +} + +# Layout of navigation panel +sub T2H_XHTML_print_navigation +{ + my $fh = shift; + my $buttons = shift; + my $vertical = shift; + print $fh '"; +} + +# Use icons for navigation. +$ICONS = 1; + +# specify in this array which "buttons" should appear in which order +# in the navigation panel for sections; use ' ' for empty buttons (space) +@SECTION_BUTTONS = + ( + 'Back', 'Top', 'Forward' + ); + +# insert here name of icon images for buttons +# Icons are used, if $ICONS and resp. value are set +%ACTIVE_ICONS = + ( + 'Top', 'file:///usr/share/gimp/2.0/help/images/home.png', + 'Contents', '', + 'Overview', '', + 'Index', '', + 'This', '', + 'Back', 'file:///usr/share/gimp/2.0/help/images/prev.png', + 'FastBack', '', + 'Prev', 'file:///usr/share/gimp/2.0/help/images/prev.png', + 'Up', 'file:///usr/share/gimp/2.0/help/images/up.png', + 'Next', 'file:///usr/share/gimp/2.0/help/images/next.png', + 'NodeUp', 'file:///usr/share/gimp/2.0/help/images/up.png', + 'NodeNext', 'file:///usr/share/gimp/2.0/help/images/next.png', + 'NodePrev', 'file:///usr/share/gimp/2.0/help/images/next.png', + 'Following', 'file:///usr/share/gimp/2.0/help/images/next.png', + 'Forward', 'file:///usr/share/gimp/2.0/help/images/next.png', + 'FastForward', '', + 'About' , '', + 'First', '', + 'Last', '', + ' ', '' + ); + +# insert here name of icon images for these, if button is inactive +%PASSIVE_ICONS = + ( + 'Top', '', + 'Contents', '', + 'Overview', '', + 'Index', '', + 'This', '', + 'Back', '', + 'FastBack', '', + 'Prev', '', + 'Up', '', + 'Next', '', + 'NodeUp', '', + 'NodeNext', '', + 'NodePrev', '', + 'Following', '', + 'Forward', '', + 'FastForward', '', + 'About', '', + 'First', '', + 'Last', '', + ); diff --git a/Manual/repository.init b/Manual/repository.init deleted file mode 100755 index 1f8a3a1..0000000 --- a/Manual/repository.init +++ /dev/null @@ -1,393 +0,0 @@ -#!/usr/bin/perl -# -# repository.init -- This file initializes Texi2HTML program to -# produce the repository documentation manual using the CentOS Web -# Environment XHTML and CSS standard definition. -# -# Copyright (C) 2009-2011 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$ -# ---------------------------------------------------------------------- - -# -iso -# if set, ISO8859 characters are used for special symbols (like copyright, etc) -$USE_ISO = 1; - -# -I -# add a directory to the list of directories where @include files are -# searched for (besides the directory of the file). additional '-I' -# args are appended to this list. (APA: Don't implicitely search ., -# to conform with the docs!) my @INCLUDE_DIRS = ("."); -@INCLUDE_DIRS = ("/home/centos/artwork"); - -# Extension used on output files. -$EXTENSION = "xhtml"; - -# Horizontal rules. -$DEFAULT_RULE = '

'; -$SMALL_RULE = $DEFAULT_RULE; -$MIDDLE_RULE = $DEFAULT_RULE; -$BIG_RULE = $DEFAULT_RULE; - -# -split section|chapter|node|none -# if $SPLIT is set to 'section' (resp. 'chapter') one html file per -# section (resp. chapter) is generated. If $SPLIT is set to 'node' one -# html file per node or sectionning element is generated. In all these -# cases separate pages for Top, Table of content (Toc), Overview and -# About are generated. Otherwise a monolithic html file that contains -# the whole document is created. -$SPLIT = 'section'; - -# -sec-nav|-nosec-nav -# if this is set then navigation panels are printed at the beginning -# of each section. If the document is split at nodes then navigation -# panels are printed at the end if there were more than $WORDS_IN_PAGE -# words on page. -# -# If the document is split at sections this is ignored. -# -# This is most useful if you do not want to have section navigation -# with -split chapter. There will be chapter navigation panel at the -# beginning and at the end of chapters anyway. -$SECTION_NAVIGATION = 0; - -# Layout control -$print_page_head = \&T2H_XHTML_print_page_head; -$print_page_foot = \&T2H_XHTML_print_page_foot; -$print_frame = \&T2H_XHTML_print_frame; -$button_icon_img = \&T2H_XHTML_button_icon_img; -$print_navigation = \&T2H_XHTML_print_navigation; - -#FIXME update once it is more stabilized in texi2html.init -sub T2H_XHTML_print_page_head -{ - my $fh = shift; - my $longtitle = "$Texi2HTML::THISDOC{'title_unformatted'}"; - $longtitle .= ": $Texi2HTML::UNFORMATTED{'This'}" if exists $Texi2HTML::UNFORMATTED{'This'}; - $T2H_LANG='en'; - @date=localtime(time); - $year=$date[5] += 1900; - print $fh < - - - - - $longtitle - - - - - - - - - - - - - - - -
- -
- -
- -
- - -EOT -} - -sub T2H_XHTML_print_page_foot -{ - my $fh = shift; - print $fh <
- -
- -
- -

- - - - - - -EOT -} - -# / in -sub T2H_XHTML_button_icon_img -{ - my $button = shift; - my $icon = shift; - my $name = shift; - return '' if (!defined($icon)); - if (defined($name) && $name) - { - $name = ": $name"; - } - else - { - $name = ''; - } - $button = "" if (!defined ($button)); - return qq{$button$name}; -} - -$simple_map{'*'} = '
'; - -# formatting functions - -$def_line = \&t2h_xhtml_def_line; -$index_summary = \&t2h_xhtml_index_summary; -$image = \&t2h_xhtml_image; - -# need / in -sub t2h_xhtml_image($$$) -{ - my $file = shift; - my $base = shift; - my $preformatted = shift; - return "[ $base ]" if ($preformatted); - return "\"$base\""; -} - -# process definition commands line @deffn for example -# replaced by -sub t2h_xhtml_def_line($$$$$) -{ - my $category = shift; - my $name = shift; - my $type = shift; - my $arguments = shift; - my $index_label = shift; - $index_label = '' if (!defined($index_label)); - $name = '' if (!defined($name) or ($name =~ /^\s*$/)); - $type = '' if (!defined($type) or $type =~ /^\s*$/); - if (!defined($arguments) or $arguments =~ /^\s*$/) - { - $arguments = ''; - } - else - { - $arguments = '' . $arguments . ''; - } - my $type_name = ''; - $type_name = " $type" if ($type ne ''); - $type_name .= ' ' . $name . '' if ($name ne ''); - $type_name .= $arguments . "\n"; - if (! $DEF_TABLE) - { - return '
'. '' . $category . ':' . $type_name . $index_label . "
\n"; - } - else - { - - return "\n" . $type_name . - "\n" . $category . $index_label . "\n" . "\n"; - } -} - -# There is a br which needs / -sub t2h_xhtml_index_summary($$) -{ - my $alpha = shift; - my $nonalpha = shift; - my $join = ''; - my $nonalpha_text = ''; - my $alpha_text = ''; - $join = "   \n
\n" if (@$nonalpha and @$alpha); - if (@$nonalpha) - { - $nonalpha_text = join("\n   \n", @$nonalpha) . "\n"; - } - if (@$alpha) - { - $alpha_text = join("\n   \n", @$alpha) . "\n   \n"; - } - #I18n - return "
Jump to:   " . - $nonalpha_text . $join . $alpha_text . '
'; -} - -# Layout of navigation panel -sub T2H_XHTML_print_navigation -{ - my $fh = shift; - my $buttons = shift; - my $vertical = shift; - print $fh '"; -} - -# Use icons for navigation. -$ICONS = 1; - -# specify in this array which "buttons" should appear in which order -# in the navigation panel for sections; use ' ' for empty buttons (space) -@SECTION_BUTTONS = - ( - 'Back', 'Top', 'Forward' - ); - -# insert here name of icon images for buttons -# Icons are used, if $ICONS and resp. value are set -%ACTIVE_ICONS = - ( - 'Top', 'file:///usr/share/gimp/2.0/help/images/home.png', - 'Contents', '', - 'Overview', '', - 'Index', '', - 'This', '', - 'Back', 'file:///usr/share/gimp/2.0/help/images/prev.png', - 'FastBack', '', - 'Prev', 'file:///usr/share/gimp/2.0/help/images/prev.png', - 'Up', 'file:///usr/share/gimp/2.0/help/images/up.png', - 'Next', 'file:///usr/share/gimp/2.0/help/images/next.png', - 'NodeUp', 'file:///usr/share/gimp/2.0/help/images/up.png', - 'NodeNext', 'file:///usr/share/gimp/2.0/help/images/next.png', - 'NodePrev', 'file:///usr/share/gimp/2.0/help/images/next.png', - 'Following', 'file:///usr/share/gimp/2.0/help/images/next.png', - 'Forward', 'file:///usr/share/gimp/2.0/help/images/next.png', - 'FastForward', '', - 'About' , '', - 'First', '', - 'Last', '', - ' ', '' - ); - -# insert here name of icon images for these, if button is inactive -%PASSIVE_ICONS = - ( - 'Top', '', - 'Contents', '', - 'Overview', '', - 'Index', '', - 'This', '', - 'Back', '', - 'FastBack', '', - 'Prev', '', - 'Up', '', - 'Next', '', - 'NodeUp', '', - 'NodeNext', '', - 'NodePrev', '', - 'Following', '', - 'Forward', '', - 'FastForward', '', - 'About', '', - 'First', '', - 'Last', '', - );