1

Compare commits

...

2 Commits

Author SHA1 Message Date
eleksir
42c5d147d5 Remove debug in fortune_seed.pl, remove unused botlib in fortune.pm and friday.pm 2020-11-23 00:53:16 +03:00
eleksir
66bca8ebf5 Update .gitignore 2020-11-23 00:49:23 +03:00
4 changed files with 6 additions and 10 deletions

9
.gitignore vendored
View File

@@ -1,9 +1,10 @@
vendor_perl/** vendor_perl/**
data/config.json data/config.json
data/*.sqlite data/*.sqlite
data/*/** data/cache/**
data/*.orig data/fortune/**
data/*.new data/friday/**
data/*.bak data/karma/**
data/lat/**
TODO TODO
*.pid *.pid

View File

@@ -22,8 +22,6 @@ BEGIN {
use lib ("$workdir/lib", "$workdir/vendor_perl", "$workdir/vendor_perl/lib/perl5"); use lib ("$workdir/lib", "$workdir/vendor_perl", "$workdir/vendor_perl/lib/perl5");
use fortune qw(seed fortune); use fortune qw(seed fortune);
use Carp;
$SIG{__DIE__} = sub { Carp::confess @_ };
seed (); seed ();

View File

@@ -19,7 +19,6 @@ use SQLite_File;
use MIME::Base64; use MIME::Base64;
use File::Path qw(mkpath); use File::Path qw(mkpath);
use conf qw(loadConf); use conf qw(loadConf);
use botlib qw(logger);
my $c = loadConf(); my $c = loadConf();
my $dir = $c->{fortune}->{dir}; my $dir = $c->{fortune}->{dir};
@@ -42,9 +41,8 @@ sub seed () {
while (my $fortunefile = readdir ($srcdirhandle)) { while (my $fortunefile = readdir ($srcdirhandle)) {
my $srcfile = sprintf '%s/%s', $srcdir, $fortunefile; my $srcfile = sprintf '%s/%s', $srcdir, $fortunefile;
# next;
next unless (-f $srcfile); next unless (-f $srcfile);
# next if (m/[\.|\$|\@]/); next if ($fortunefile =~ m/\./);
open (my $fh, '<', $srcfile) || croak "Unable to open $srcfile, $OS_ERROR\n"; open (my $fh, '<', $srcfile) || croak "Unable to open $srcfile, $OS_ERROR\n";
# set correct phrase delimiter # set correct phrase delimiter
local $INPUT_RECORD_SEPARATOR = "\n%\n"; local $INPUT_RECORD_SEPARATOR = "\n%\n";

View File

@@ -19,7 +19,6 @@ use SQLite_File;
use MIME::Base64; use MIME::Base64;
use File::Path qw(mkpath); use File::Path qw(mkpath);
use conf qw(loadConf); use conf qw(loadConf);
use botlib qw(logger);
my $c = loadConf(); my $c = loadConf();
my $dir = $c->{friday}->{dir}; my $dir = $c->{friday}->{dir};