📄 pod::simple::htmlbatch.3
字号:
This \s-1TODO\s0.ie n .IP "$batchconv\fR\->batch_convert( \fIindirs\fR, \fIoutdir );" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( \fIindirs\fR, \fIoutdir\fR );" 4.IX Item "$batchconv->batch_convert( indirs, outdir );"this \s-1TODO\s0.ie n .IP "$batchconv\->batch_convert( undef , ...);" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( undef , ...);" 4.IX Item "$batchconv->batch_convert( undef , ...);".PD 0.ie n .IP "$batchconv\->batch_convert( q{@INC}, ...);" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( q{@INC}, ...);" 4.IX Item "$batchconv->batch_convert( q{@INC}, ...);".PDThese two values for \fIindirs\fR specify that the normal Perl \f(CW@INC\fR.ie n .IP "$batchconv\->batch_convert( \e@dirs , ...);" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( \e@dirs , ...);" 4.IX Item "$batchconv->batch_convert( @dirs , ...);"This specifies that the input directories are the items inthe arrayref \f(CW\*(C`\e@dirs\*(C'\fR..ie n .IP "$batchconv\->batch_convert( ""somedir"" , ...);" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( ``somedir'' , ...);" 4.IX Item "$batchconv->batch_convert( somedir , ...);"This specifies that the director \*(L"somedir\*(R" is the input.(This can be an absolute or relative path, it doesn't matter.).SpA common value you might want would be just \*(L".\*(R" for the currentdirectory:.Sp.Vb 1\& $batchconv\->batch_convert( "." , ...);.Ve.ie n .IP "$batchconv\->batch_convert( 'somedir:someother:also' , ...);" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( 'somedir:someother:also' , ...);" 4.IX Item "$batchconv->batch_convert( 'somedir:someother:also' , ...);"This specifies that you want the dirs \*(L"somedir\*(R", \*(L"somother\*(R", and \*(L"also\*(R"scanned, just as if you'd passed the arrayref\&\f(CW\*(C`[qw( somedir someother also)]\*(C'\fR. Note that a \*(L":\*(R"\-separator is normalunder Unix, but Under MSWin, you'll need \f(CW\*(Aqsomedir;someother;also\*(Aq\fRinstead, since the pathsep on MSWin is \*(L";\*(R" instead of \*(L":\*(R". (And\&\fIthat\fR is because \*(L":\*(R" often comes up in paths, like\&\f(CW"c:/perl/lib"\fR.).Sp(Exactly what separator character should be used, is gotten from\&\f(CW$Config::Config{\*(Aqpath_sep\*(Aq}\fR, via the Config module.).ie n .IP "$batchconv\->batch_convert( ... , undef );" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( ... , undef );" 4.IX Item "$batchconv->batch_convert( ... , undef );"This specifies that you want the \s-1HTML\s0 output to go into the currentdirectory..Sp(Note that a missing or undefined value means a different thing inthe first slot than in the second. That's so that \f(CW\*(C`batch_convert()\*(C'\fRwith no arguments (or undef arguments) means "go from \f(CW@INC\fR, intothe current directory.).ie n .IP "$batchconv\->batch_convert( ... , 'somedir' );" 4.el .IP "\f(CW$batchconv\fR\->batch_convert( ... , 'somedir' );" 4.IX Item "$batchconv->batch_convert( ... , 'somedir' );"This specifies that you want the \s-1HTML\s0 output to go into thedirectory 'somedir'.(This can be an absolute or relative path, it doesn't matter.).PPNote that you can also call \f(CW\*(C`batch_convert\*(C'\fR as a class method,like so:.PP.Vb 1\& Pod::Simple::HTMLBatch\->batch_convert( ... );.Ve.PPThat is just short for this:.PP.Vb 1\& Pod::Simple::HTMLBatch\-> new\-> batch_convert(...);.Ve.PPThat is, it runs a conversion with default options, forwhatever inputdirs and output dir you specify..Sh "\s-1ACCESSOR\s0 \s-1METHODS\s0".IX Subsection "ACCESSOR METHODS"The following are all accessor methods \*(-- that is, they don't do anythingon their own, but just alter the contents of the conversion object,which comprises the options for this particular batch conversion..PPWe show the \*(L"put\*(R" form of the accessors below (i.e., the syntax you usefor setting the accessor to a specific value). But you can alsocall each method with no parameters to get its current value. Forexample, \f(CW\*(C`$self\->contents_file()\*(C'\fR returns the current value ofthe contents_file attribute..ie n .IP "$batchconv\fR\->verbose( \fInonnegative_integer );" 4.el .IP "\f(CW$batchconv\fR\->verbose( \fInonnegative_integer\fR );" 4.IX Item "$batchconv->verbose( nonnegative_integer );"This controls how verbose to be during batch conversion, as far asnotes to \s-1STDOUT\s0 (or whatever is \f(CW\*(C`select\*(C'\fR'd) about how the conversionis going. If 0, no progress information is printed.If 1 (the default value), some progress information is printed.Higher values print more information..ie n .IP "$batchconv\fR\->index( \fItrue-or-false );" 4.el .IP "\f(CW$batchconv\fR\->index( \fItrue-or-false\fR );" 4.IX Item "$batchconv->index( true-or-false );"This controls whether or not each \s-1HTML\s0 page is liable to have a littletable of contents at the top (which we call an \*(L"index\*(R" for historicalreasons). This is true by default..ie n .IP "$batchconv\fR\->contents_file( \fIfilename );" 4.el .IP "\f(CW$batchconv\fR\->contents_file( \fIfilename\fR );" 4.IX Item "$batchconv->contents_file( filename );"If set, should be the name of a file (in the output directory)to write the \s-1HTML\s0 index to. The default value is \*(L"index.html\*(R".If you set this to a false value, no contents file will be written..ie n .IP "$batchconv\fR\->contents_page_start( \fIHTML_string );" 4.el .IP "\f(CW$batchconv\fR\->contents_page_start( \fIHTML_string\fR );" 4.IX Item "$batchconv->contents_page_start( HTML_string );"This specifies what string should be put at the beginning ofthe contents page.The default is a string more or less like this:.Sp.Vb 4\& <html>\& <head><title>Perl Documentation</title></head>\& <body class=\*(Aqcontentspage\*(Aq>\& <h1>Perl Documentation</h1>.Ve.ie n .IP "$batchconv\fR\->contents_page_end( \fIHTML_string );" 4.el .IP "\f(CW$batchconv\fR\->contents_page_end( \fIHTML_string\fR );" 4.IX Item "$batchconv->contents_page_end( HTML_string );"This specifies what string should be put at the end of the contents page.The default is a string more or less like this:.Sp.Vb 4\& <p class=\*(Aqcontentsfooty\*(Aq>Generated by\& Pod::Simple::HTMLBatch v3.01 under Perl v5.008\& <br >At Fri May 14 22:26:42 2004 GMT,\& which is Fri May 14 14:26:42 2004 local time.</p>.Ve.ie n .IP "$batchconv\fR\->add_css( \f(CW$url );" 4.el .IP "\f(CW$batchconv\fR\->add_css( \f(CW$url\fR );" 4.IX Item "$batchconv->add_css( $url );"\&\s-1TODO\s0.ie n .IP "$batchconv\fR\->add_javascript( \f(CW$url );" 4.el .IP "\f(CW$batchconv\fR\->add_javascript( \f(CW$url\fR );" 4.IX Item "$batchconv->add_javascript( $url );"\&\s-1TODO\s0.ie n .IP "$batchconv\fR\->css_flurry( \fItrue-or-false );" 4.el .IP "\f(CW$batchconv\fR\->css_flurry( \fItrue-or-false\fR );" 4.IX Item "$batchconv->css_flurry( true-or-false );"If true (the default value), we autogenerate some \s-1CSS\s0 files in theoutput directory, and set our \s-1HTML\s0 files to use those.\&\s-1TODO:\s0 continue.ie n .IP "$batchconv\fR\->javascript_flurry( \fItrue-or-false );" 4.el .IP "\f(CW$batchconv\fR\->javascript_flurry( \fItrue-or-false\fR );" 4.IX Item "$batchconv->javascript_flurry( true-or-false );"If true (the default value), we autogenerate a JavaScript in theoutput directory, and set our \s-1HTML\s0 files to use it. Currently,the JavaScript is used only to get the browser to remember whatstylesheet it prefers.\&\s-1TODO:\s0 continue.ie n .IP "$batchconv\fR\->no_contents_links( \fItrue-or-false );" 4.el .IP "\f(CW$batchconv\fR\->no_contents_links( \fItrue-or-false\fR );" 4.IX Item "$batchconv->no_contents_links( true-or-false );"\&\s-1TODO\s0.ie n .IP "$batchconv\fR\->html_render_class( \fIclassname );" 4.el .IP "\f(CW$batchconv\fR\->html_render_class( \fIclassname\fR );" 4.IX Item "$batchconv->html_render_class( classname );"This sets what class is used for rendering the files.The default is \*(L"Pod::Simple::Search\*(R". If you set it to something else,it should probably be a subclass of Pod::Simple::Search, and you should\&\f(CW\*(C`require\*(C'\fR or \f(CW\*(C`use\*(C'\fR that class so that's it's loaded beforePod::Simple::HTMLBatch tries loading it..SH "NOTES ON CUSTOMIZATION".IX Header "NOTES ON CUSTOMIZATION"\&\s-1TODO\s0.PP.Vb 2\& call add_css($someurl) to add stylesheet as alternate\& call add_css($someurl,1) to add as primary stylesheet\&\& call add_javascript\&\& subclass Pod::Simple::HTML and set $batchconv\->html_render_class to\& that classname\& and maybe override\& $page\->batch_mode_page_object_init($self, $module, $infile, $outfile, $depth)\& or maybe override\& $batchconv\->batch_mode_page_object_init($page, $module, $infile, $outfile, $depth).Ve.SH "ASK ME!".IX Header "ASK ME!"If you want to do some kind of big pod-to-HTML version with someparticular kind of option that you don't see how to achieve using thismodule, email me (\f(CW\*(C`sburke@cpan.org\*(C'\fR) and I'll probably have a good ideahow to do it. For reasons of concision and energetic laziness, somemethods and options in this module (and the dozen modules it depends on)are undocumented; but one of those undocumented bits might be just whatyou're looking for..SH "SEE ALSO".IX Header "SEE ALSO"Pod::Simple, Pod::Simple::HTMLBatch, perlpod, perlpodspec.SH "COPYRIGHT AND DISCLAIMERS".IX Header "COPYRIGHT AND DISCLAIMERS"Copyright (c) 2004 Sean M. Burke. All rights reserved..PPThis library is free software; you can redistribute it and/or modify itunder the same terms as Perl itself..PPThis program is distributed in the hope that it will be useful, butwithout any warranty; without even the implied warranty ofmerchantability or fitness for a particular purpose..SH "AUTHOR".IX Header "AUTHOR"Sean M. Burke \f(CW\*(C`sburke@cpan.org\*(C'\fR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -