#!/usr/bin/perl -w

use Text::Lorem;
use Getopt::Long;

my ($words,$sentences,$paragraphs,$html);

$paragraphs = 1;

my $result = GetOptions (
	"words=i" => \$words,
	"sentences=i" => \$sentences,
	"paragraphs=i" => \$paragraphs,
	"html"  => \$html,
);

my $text = Text::Lorem->new();

print $text->words($words)  if ($words);

print $text->sentences($sentences) if ($sentences);

if ($html) {
	for my $i (1 .. $paragraphs) {
		print "<p>",$text->paragraphs(1),"</p>\n";
	}
} else {
	print $text->paragraphs($paragraphs) if ($paragraphs);
}

print "\n";
