summaryrefslogtreecommitdiff
path: root/search/bin/poetaster
diff options
context:
space:
mode:
Diffstat (limited to 'search/bin/poetaster')
-rwxr-xr-xsearch/bin/poetaster33
1 files changed, 0 insertions, 33 deletions
diff --git a/search/bin/poetaster b/search/bin/poetaster
deleted file mode 100755
index fe973a5..0000000
--- a/search/bin/poetaster
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/perl
-use lib "../lib";
-use Rest;
-use CGI;
-use Poetaster;
-
-my $file = $ARGV[0] || "twain";
-my $data = load_data($file);
-$data =~ s/<[^>]+>//g;
-$data =~ s/\r\n/ /g;
-$data =~ s/\s+/ /g;
-$data =~ s/\. \. \. /... /g;
-my $self = new Poetaster;
-my $poem = $self->poem($data);
-print $poem;
-
-sub load_data
- {
- my ($file) = @_;
- my $data = '';
- if ($file =~ /^http/)
- {
- $data = Rest->new->rest_get_raw($file);
- }
- else
- {
- local $/;
- open F, $file;
- $data = <F>;
- close F;
- }
- return $data;
- }