#!/usr/bin/perl -w # article.pl # Including modules use strict; use LWP::Simple; use HTML::Parser; use HTML::Parse; use HTML::Strip; use HTML::FormatText; use IO::Handle; # Post to log for success or failure print "\n"; print "------------------------------------\n"; print "| |\n"; print "| Welcome the The Elite Noob's |\n"; print "| Article Bot! |\n"; print "| |\n"; print "------------------------------------\n"; print "\n"; print "Remember. Put all links in a file called 'links.txt'\n"; print "Links should be One Per Line. Once you have file\n"; print "Just click press enter any key to begin!\n"; print "\n::\n"; {my $tempIn = } # Redirecting input from file 'links.txt' open fINPUT, '<', "links.txt" or die $!; open TEXT, '>', "main.txt" or die $!; STDIN->fdopen( \*fINPUT, 'r' ) or die $!; my @links; chomp(@links = <>); # Get all input and remove \n if there my $filenum = 1; my $currentLink; close fINPUT; foreach(@links){ $currentLink = get("$_"); $currentLink = tagEdit($currentLink); print TEXT "$currentLink"; # saves Text File that is being edited. } # Removing HTML in tag. sub tagEdit { my $edited = $_[0]; my $hs = HTML::Strip->new(); my $cleanText = $hs->parse($edited); $hs->eof; return $cleanText; }