cvs commit: modperl-docs/lib/DocSet/Doc Common.pm
stas2003/07/22 07:42:42 Modified:lib DocSet.pm lib/DocSet 5005compat.pm lib/DocSet/Doc Common.pm Log: docset sync: - fix fetch_pdf_doc_ver not to try to copy the pdf version of the document to the same directory. Revision ChangesPath 1.10 +1 -1 modperl-docs/lib/DocSet.pm Index: DocSet.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- DocSet.pm 9 Apr 2003 06:23:38 - 1.9 +++ DocSet.pm 22 Jul 2003 14:42:41 - 1.10 @@ -1,6 +1,6 @@ package DocSet; -$VERSION = '0.16'; +$VERSION = '0.17'; =head1 NAME 1.4 +2 -5 modperl-docs/lib/DocSet/5005compat.pm Index: 5005compat.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/5005compat.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- 5005compat.pm 4 Sep 2002 16:01:18 - 1.3 +++ 5005compat.pm 22 Jul 2003 14:42:41 - 1.4 @@ -1,5 +1,7 @@ package DocSet::5005compat; +$DocSet::5005compat::VERSION = '0.01'; + use strict; use Symbol (); use File::Basename; @@ -18,11 +20,6 @@ eval { require File::Spec::Functions; } or die this is only Perl $], you need to install File-Spec from CPAN; - -# ExtUtils::MakeMaker v 6.00 stupidly tries to parse any VERSION -# it sees, so it fails latter on in the import() function. so we -# have to workaround it. even the following comment will do -# $DocSet::5005compat::VERSION = 0.01; my $min_version = 0.82; unless ($File::Spec::VERSION = $min_version) { 1.16 +2 -1 modperl-docs/lib/DocSet/Doc/Common.pm Index: Common.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Common.pm 30 Jun 2002 15:52:41 - 1.15 +++ Common.pm 22 Jul 2003 14:42:41 - 1.16 @@ -50,7 +50,8 @@ #print TRYING $dst_path $pdf_path \n; my %pdf = (); -if (-e $pdf_path) { +# if in the pdf tree (rel_pdf) there is nothing to copy +if (-e $pdf_path $pdf_path ne $dst_path) { copy_file($pdf_path, $dst_path); %pdf = ( size = format_bytes(-s $dst_path), - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/lib/DocSet/Doc Common.pm
stas2002/06/29 12:13:49 Modified:lib/DocSet Cache.pm Config.pm Doc.pm DocSet.pm NavigateCache.pm RunTime.pm lib/DocSet/Doc Common.pm Log: DocSet sync: - fix the html title rendering, not to have a href= name= as some older browsers crush on that, use a href=/aa name=/a instead - in each document verify that there are no duplicated anchors and croak if there are. - added the croak method to the rendering class, so if there is a problem the context is dumped (the problematic source file). - croak if the config file includes both: grouped and non-grouped items. - added docset id duplication checking, the program will croak when a duplication is detected and report the offending config file and the config file it was previous seen in. - fix a bug with properly setting doc.dir.abs_doc_root, for the docs in the very root e.g, src/404.html. - added a new special attribute: 'changes', which points to a hidden chapter including changes for each docset (if such exists). this is an improvement over the inclusion of the changes.pod or alike along with all other chapters because usually people don't want to see changes and when the docset pdf is created huge changes files can be an unwanted burden, so now if this attribute is included, the pdf for the docset won't include this file in it. - overload Carp.pm's subs in Config.pm and when die'ing or warn'ing start dumping the relevant object attributes, like the used config file, to aid the problem analysis. Revision ChangesPath 1.6 +18 -11modperl-docs/lib/DocSet/Cache.pm Index: Cache.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Cache.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Cache.pm 29 Apr 2002 17:36:54 - 1.5 +++ Cache.pm 29 Jun 2002 19:13:49 - 1.6 @@ -189,15 +189,14 @@ my($self) = shift; if (@_) { +my %args = @_; +my %required = map { $_ = 1} qw(id title stitle); + +for (keys %required) { +croak must specify the index_node's $_ unless exists $args{$_}; +} # set -my($id, $stitle, $title, $abstract) = @_; -croak must specify the index_node's id unless defined $id; -croak must specify the index_node's stitle unless defined $stitle; -croak must specify the index_node's title unless defined $title; -$self-{cache}{_index}{id} = $id; -$self-{cache}{_index}{stitle} = $stitle; -$self-{cache}{_index}{title}= $title; -$self-{cache}{_index}{abstract} = $abstract; +$self-{cache}{_index} = \%args; } else { # get @@ -215,8 +214,10 @@ if (@_) { # set my($cache_path, $id, $rel_path) = @_; -croak must specify a path to the parent cache unless defined $cache_path; -croak must specify a relative to parent path unless defined $rel_path; +croak must specify a path to the parent cache +unless defined $cache_path; +croak must specify a path relative to parent docset +unless defined $rel_path; croak must specify a parent id unless defined $id; $self-{cache}{_parent}{cache_path} = $cache_path; $self-{cache}{_parent}{id} = $id; @@ -299,7 +300,13 @@ my @ids = $cache-ordered_ids; my $total_ids = $cache-total_ids; - $cache-index_node($id, $stitle, $title, $abstract); + $cache-index_node( + id = $id, + stitle = $stitle, + title= $title, + abstract = $abstract, + #... + ); my %index_node = $cache-index_node(); $cache-parent_node($cache_path, $id, $rel_path); 1.9 +122 -34 modperl-docs/lib/DocSet/Config.pm Index: Config.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Config.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Config.pm 29 Apr 2002 17:36:54 - 1.8 +++ Config.pm 29 Jun 2002 19:13:49 - 1.9 @@ -3,8 +3,6 @@ use strict; use warnings; -use Carp; - use File::Basename (); use File::Spec::Functions; @@ -46,18 +44,23 @@ sub conv_class { my($self, $src_mime, $dst_mime) = @_; # convert -die src_mime is not defined unless defined $src_mime; -die dst_mime is not defined unless defined $dst_mime; -my $conv_class = $conv_class{$src_mime}{$dst_mime} -or die unknown input/output MIME mapping: $src_mime = $dst_mime; -return $conv_class; +$self-croak(src_mime is not defined) unless defined $src_mime; +
cvs commit: modperl-docs/lib/DocSet/Doc Common.pm POD2HTML.pm POD2HTMLPS.pm
stas2002/06/13 02:20:16 Modified:lib/DocSet/Doc Common.pm POD2HTML.pm POD2HTMLPS.pm Log: DocSet sync: - implement the splitting of the long EltpreEgt text only in DocSet::Doc::POD2HTMLPS's view_verbatim, where it's needed. Use the simple view_verbatim() in DocSet::Doc::POD2HTML. Revision ChangesPath 1.13 +0 -27 modperl-docs/lib/DocSet/Doc/Common.pm Index: Common.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Common.pm 12 Jun 2002 02:53:46 - 1.12 +++ Common.pm 13 Jun 2002 09:20:16 - 1.13 @@ -145,26 +145,6 @@ return qq{a name=$anchor href=#toc_$anchor$link/a}; } -# the pre section uses class pre-section, which allows to use a custom -# look-n-feel via the CSS -sub pod_pom_html_view_verbatim { -my ($self, $text) = @_; -for ($text) { -s//amp;/g; -s//lt;/g; -s//gt;/g; -} - -# if the pre section is too long ps2pdf fails to generate pdf, -# so split it into 40 lines chunks. -my $result = ''; -while ($text =~ /((?:[^\n]*\n?){1,40})/sg) { -next unless length($1); # skip empty matches -$result .= qq{pre class=pre-section$1/pre\n}; -} - -return $result; -} @@ -256,13 +236,6 @@ this is a common function that takes the C$title Pod::POM object, converts it into a Elta nameEgt html anchor and returns it. - -=item * pod_pom_html_view_verbatim - -this is an overloaded CPod::POM::HTML::view_verbatim() method which -renders the EltpreEgt...Elt/preEgt html, but embeds a virtual -colored line as the left column, so the rendered text will stand out -from the normal text. =back 1.6 +19 -2 modperl-docs/lib/DocSet/Doc/POD2HTML.pm Index: POD2HTML.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/POD2HTML.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- POD2HTML.pm 29 Apr 2002 17:36:55 - 1.5 +++ POD2HTML.pm 13 Jun 2002 09:20:16 - 1.6 @@ -136,6 +136,20 @@ return -e $file ? qq{a href=$path$path/a} : qq{i$path/i}; } +# the pre section uses class pre-section, which allows to use a custom +# look-n-feel via the CSS +sub view_verbatim { +my ($self, $text) = @_; +for ($text) { +s//amp;/g; +s//lt;/g; +s//gt;/g; +} + +return qq{pre class=pre-section$text/pre\n}; +} + + #sub view_for { #my $self = shift; #my ($for) = @_; @@ -150,7 +164,6 @@ #} *anchor= \DocSet::Doc::Common::pod_pom_html_anchor; -*view_verbatim = \DocSet::Doc::Common::pod_pom_html_view_verbatim; *view_seq_link_transform_path = \DocSet::Doc::Common::pod_pom_html_view_seq_link_transform_path; #*view_seq_link = \DocSet::Doc::Common::pod_pom_html_view_seq_link; @@ -209,7 +222,11 @@ otherwise the default behaviour applies (the file path is turned into italics). -The following rendering methods: view_verbatim(), anchor() and +view_verbatim() is overriden: renders the +EltpreEgt...Elt/preEgt html, but defines a CSS class +Cpre-section so the look-n-feel can be adjusted. + +The following rendering methods: anchor() and view_seq_link_transform_path() are defined in the CDocSet::Doc::Common class and documented there. 1.4 +44 -2 modperl-docs/lib/DocSet/Doc/POD2HTMLPS.pm Index: POD2HTMLPS.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/POD2HTMLPS.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- POD2HTMLPS.pm 22 Mar 2002 02:01:51 - 1.3 +++ POD2HTMLPS.pm 13 Jun 2002 09:20:16 - 1.4 @@ -136,9 +136,30 @@ return qq{i$path/i:\n\npre$content/pre\n\n}; } +# the pre section uses class pre-section, which allows to use a custom +# look-n-feel via the CSS +sub view_verbatim { +my ($self, $text) = @_; +for ($text) { +s//amp;/g; +s//lt;/g; +s//gt;/g; +} + +# if the pre section is too long ps2pdf fails to generate pdf, +# so split it into 40 lines chunks. +my $result = ''; +while ($text =~ /((?:[^\n]*\n?){1,40})/sg) { +next unless length($1); # skip empty matches +$result .= qq{pre class=pre-section$1/pre\n}; +} + +return $result; +} + + *anchor= \DocSet::Doc::Common::pod_pom_html_anchor; -*view_verbatim = \DocSet::Doc::Common::pod_pom_html_view_verbatim; *view_seq_link_transform_path =
cvs commit: modperl-docs/lib/DocSet/Doc Common.pm
stas2002/06/11 19:53:46 Modified:lib/DocSet Doc.pm lib/DocSet/Doc Common.pm Log: move the URI normalization closer to the source Revision ChangesPath 1.7 +1 -1 modperl-docs/lib/DocSet/Doc.pm Index: Doc.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Doc.pm3 Apr 2002 07:26:24 - 1.6 +++ Doc.pm12 Jun 2002 02:53:46 - 1.7 @@ -134,7 +134,7 @@ if (my $path = find_src_doc($path)) { $path = catfile $self-{dir}{abs_doc_root}, $path; $path =~ s|/\./|/|; # avoid .././foo links. -return $path; +return path2uri($path); } return undef; 1.12 +0 -1 modperl-docs/lib/DocSet/Doc/Common.pm Index: Common.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Common.pm 11 Jun 2002 19:55:07 - 1.11 +++ Common.pm 12 Jun 2002 02:53:46 - 1.12 @@ -110,7 +110,6 @@ my $doc_obj = get_render_obj(); my $res_path = $doc_obj-transform_src_doc($path); -$res_path = path2uri($res_path); # win32 fix, convert to URI unless ($res_path) { # report broken links if we were told to if (DocSet::RunTime::get_opts('validate_links')) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/lib/DocSet/Doc Common.pm
pereinar2002/06/11 12:55:07 Modified:lib/DocSet/Doc Common.pm Log: Fix Win32, convert POD URI links to '/' instead of '\'. Revision ChangesPath 1.11 +1 -0 modperl-docs/lib/DocSet/Doc/Common.pm Index: Common.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Common.pm 14 May 2002 10:13:32 - 1.10 +++ Common.pm 11 Jun 2002 19:55:07 - 1.11 @@ -110,6 +110,7 @@ my $doc_obj = get_render_obj(); my $res_path = $doc_obj-transform_src_doc($path); +$res_path = path2uri($res_path); # win32 fix, convert to URI unless ($res_path) { # report broken links if we were told to if (DocSet::RunTime::get_opts('validate_links')) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/lib/DocSet/Doc Common.pm
stas02/02/07 00:43:40 Modified:lib/DocSet/Doc Common.pm Log: - thinner left bar for pre secs, from allan's design Revision ChangesPath 1.2 +1 -1 modperl-docs/lib/DocSet/Doc/Common.pm Index: Common.pm === RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Common.pm 5 Feb 2002 10:27:19 - 1.1 +++ Common.pm 7 Feb 2002 08:43:40 - 1.2 @@ -174,7 +174,7 @@ tr td bgcolor=#cc width=1 - nbsp; + br /td td - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]