Skip Menu |

This queue is for tickets about the Module-Install-ReadmeFromPod CPAN distribution.

Report information
The Basics
Id: 70907
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Module-Install-ReadmeFromPod

People
Owner: BINGOS [...] cpan.org
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.12
Fixed in: (no value)



Subject: Support for various formats: text, html, pdf
Hi Chris, Very handy module that you have there. I was wondering if you'd be able to add options for having the README in different formats, e.g. text, html, pdf. For text, you can use pod2text, which is bundled with Perl. For html, you can also use a utility bundled with Perl, pod2html. For pdf, you can use pod2pdf, but it is a separate CPAN module: http://search.cpan.org/dist/pod2pdf/bin/pod2pdf I attached an example of how I currently generate readme files in my modules. I am happy to help implementing that in M::I::RFP. Florent
Subject: auto_readme.pl
sub auto_readme { print "*** Building README files...\n"; my $source = 'lib/Grinder.pm'; generate_readme_text( $source, 'README' ); generate_readme_html( $source, 'README.htm' ); return 1; } sub generate_readme_text { my ($in, $out) = @_; `pod2text $in $out`; warn "Warning: Could not generate $out.\n$!\n" if $? == -1; return $?; # exit status } sub generate_readme_html { my ($in, $out) = @_; `pod2html --infile=$in --outfile=$out`; warn "Warning: Could not generate $out.\n$!\n" if $? == -1; rm_files(['pod2htmd.tmp', 'pod2htmi.tmp']); return $?; # exit status } sub rm_files { my ($files) = @_; for my $file (@$files) { if (-e $file) { unlink $file or warn "Warning: Could not remove file '$file'.\n$!\n"; } } return 1; }
Subject: [PATCH] Support for additional formats: html, pdf, manpage
I have created a patch that addresses this issue. Please, pull it from: https://github.com/bingos/module-install-readmefrompod/pull/1 Regards, Florent
All applied and released. Many thanks