15 May 2003 06:48:13 UTC
- Distribution: FrameMaker-FromHTML
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (1 / 1 / 0)
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (33.13KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
FrameMaker::FromHTML -- class to convert HTML file to FrameMaker MIF
Peter G. Martin The Scribe & Chutney Trust
Version 0.01 1 December 2002
use base 'FrameMaker::FromHTML';
my ($infile, $outfile);
$infile = shift;
($outfile = $infile) =~ s/\.htm[l]*$/\.mif/;
# Insert routine to validate HTML -- eg, use HTML-Tidy
# VERY important -- this script is fragile at any time
# but worse with bad HTML
my $p = FrameMaker::FromHTML->new($outfile) ;
$p->parse_file("$tempfile") or die "Parsing failed on $tempfile: $!\n";
Use to convert properly formed HTML into FrameMaker MIF. Likely to be found buggy, particularly with funny HTML. Errors in MIF are usually flagged in FrameMaker console when FrameMaker is used to open the file.
See example file htmltofm.pl, which may be all you'll need to get it working on some files. In which case, you'll need to have HTML-Tidy installed to clean up your HTML.
Galore. Particularly if expected HTML elements are missing.
Module Install Instructions
To install FrameMaker::FromHTML, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install FrameMaker::FromHTML
For more information on module installation, please visit the detailed CPAN module installation guide.