Code cleanup and port on argument
This commit is contained in:
parent
4f267ca3ff
commit
d0c2b55478
1 changed files with 4 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
# TODO:
|
||||
# - Support for a list of tags
|
||||
# - Cleanup on ctrl-c
|
||||
# - Default port if failure
|
||||
# - ...
|
||||
|
||||
use strict;
|
||||
|
@ -20,8 +21,9 @@ use Date::Parse;
|
|||
use Date::Format;
|
||||
use threads;
|
||||
|
||||
our $port = 7071;
|
||||
our %entries = ();
|
||||
our ($port) = @ARGV;
|
||||
|
||||
print "Port is " . $port . "\n";
|
||||
|
||||
$SIG{INT} = \&signal_handler_interrupt;
|
||||
|
||||
|
@ -144,7 +146,6 @@ sub read_entry_file {
|
|||
sub map_blog_entry {
|
||||
my ($entry_file, $entry_dir) = @_;
|
||||
my $entry_title = read_entry_file($entry_dir . "/" . $entry_file);
|
||||
print "Entry : " . $entry_dir . " + " . $entry_file . " + " . $entry_title . "\n";
|
||||
return "0" . $entry_title . "\t" . $entry_dir . "/" . $entry_file . "\tlocalhost\t" . $port;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue