Add entries_cache_meta and recententries to MANIFEST.medium.
[blosxom-plugins.git] / general / readme
blob37f03d0ceb6781146a777cfca6edc1b564396261
1 # Blosxom Plugin: readme
2 # Author(s): Rael Dornfest <rael@oreilly.com> 
3 # Version: 2003-11-12
4 # Documentation: See the bottom of this file or type: perldoc readme
6 package readme;
8 # --- Configurable variables -----
10 my $before_readme = qq{<span class="readme">};
11 my $after_readme = qq{</span>};
13 # --------------------------------
15 $readme; # use as $readme::readme in flavour templates
17 use FileHandle;
19 my $fh = new FileHandle;
21 sub start {
22   1;
25 sub head {
26   my($pkg, $path, $head_ref) = @_;
28   LOOK: {
29     do {
30       $fh->open("< $blosxom::datadir/$path/readme") || $fh->open("< $blosxom::datadir/$path/readme.$blosxom::flavour") and $readme = join('', $before_readme, <$fh>, $after_readme), $fh->close, last LOOK;
31     } while ($path =~ s/(\/*[^\/]*)$// and $1);
32   }
33   
34   return 1;
39 __END__
41 =head1 NAME
43 Blosxom Plug-in: readme
45 =head1 SYNOPSIS
47 Purpose: Populates $readme::readme with the contents of any readme.flavour
48 (specific to a particular flavour) or readme (general, regardless of flavour)
49 file found along a particular category path/directory, preferring those found 
50 closest to the point of the path at hand.
52 =head1 VERSION
54 2003-11-12
56 Version number coincides with the version of Blosxom with which the 
57 current version was first bundled.
59 =head1 AUTHOR
61 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
63 This plugin is now maintained by the Blosxom Sourceforge Team,
64 <blosxom-devel@lists.sourceforge.net>.
66 =head1 SEE ALSO
68 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
70 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
72 =head1 BUGS
74 None known; please send bug reports and feedback to the Blosxom
75 development mailing list <blosxom-devel@lists.sourceforge.net>.
77 =head1 LICENSE
79 Blosxom and this Blosxom Plug-in
80 Copyright 2003, Rael Dornfest 
82 Permission is hereby granted, free of charge, to any person obtaining a
83 copy of this software and associated documentation files (the "Software"),
84 to deal in the Software without restriction, including without limitation
85 the rights to use, copy, modify, merge, publish, distribute, sublicense,
86 and/or sell copies of the Software, and to permit persons to whom the
87 Software is furnished to do so, subject to the following conditions:
89 The above copyright notice and this permission notice shall be included
90 in all copies or substantial portions of the Software.
92 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
93 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
94 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
95 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
96 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
97 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
98 OTHER DEALINGS IN THE SOFTWARE.