summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rwxr-xr-xconfigure10
-rwxr-xr-xfetch-feeds-frn.pl10
-rwxr-xr-xfetch-files-cba.pl10
-rwxr-xr-xrhautoimport-btl (renamed from rhimport-btl)26
-rwxr-xr-xrhautoimport-dn (renamed from rhimport-dn)32
-rwxr-xr-xrhautoimport-fe (renamed from rhimport-fe)30
-rwxr-xr-xrhautoimport-fw (renamed from rhimport-fw)34
-rwxr-xr-xrhautoimport-mz (renamed from rhimport-mz)30
-rwxr-xr-xrhautoimport-nw (renamed from rhimport-nw)26
-rwxr-xr-xrhautoimport-o94n (renamed from rhimport-o94n)26
-rwxr-xr-xrhautoimport-oi (renamed from rhimport-oi)30
-rwxr-xr-xrhautoimport-ra (renamed from rhimport-ra)32
-rwxr-xr-xrhautoimport-rs (renamed from rhimport-rs)26
-rwxr-xr-xrhautoimport-sm (renamed from rhimport-sm)26
-rwxr-xr-xrhautoimport-sv (renamed from rhimport-sv)26
-rwxr-xr-xrhautoimport-tr (renamed from rhimport-tr)26
-rwxr-xr-xrhautoimport-ut (renamed from rhimport-ut)32
-rwxr-xr-xrhautoimport-zf (renamed from rhimport-zf)32
-rwxr-xr-xrhautoimport-zffe (renamed from rhimport-zffe)26
-rwxr-xr-xrhautoimport-zfw (renamed from rhimport-zfw)26
-rw-r--r--rhautoimport.pm (renamed from rhimport.pm)18
-rwxr-xr-xrhimport126
23 files changed, 275 insertions, 404 deletions
diff --git a/Makefile b/Makefile
index 7202ab4..d1efa33 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,22 @@
##
-## rhimport
+## rhautoimport
##
## Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
##
-## This file is part of rhimport.
+## This file is part of rhautoimport.
##
-## rhimport is free software: you can redistribute it and/or modify
+## rhautoimport is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
-## rhimport is distributed in the hope that it will be useful,
+## rhautoimport is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
-## along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+## along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
##
ifneq ($(MAKECMDGOALS),distclean)
@@ -25,7 +25,7 @@ endif
.PHONY: clean distclean
-EXECUTABLE := rhimport
+EXECUTABLE := rhautoimport
IMPORTER := btl dn fe fw mz nw oi o94n rs ra sm sv tr ut zf zffe zfw
EXECUTABLES := $(IMPORTER:%=$(EXECUTABLE)-%)
@@ -44,23 +44,20 @@ install: $(INSTALL_TARGETS)
install-bin:
$(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR)
- @sed s#/usr/local/share/rhimport/#$(SHAREDIR)/$(EXECUTABLE)/#g -i $(DESTDIR)$(BINDIR)/$(EXECUTABLE)
$(INSTALL) -m 755 $(EXECUTABLES) $(DESTDIR)$(BINDIR)
@for exe in $(EXECUTABLES); do \
- sed s#/usr/local/share/rhimport/#$(SHAREDIR)/$(EXECUTABLE)/#g -i $(DESTDIR)$(BINDIR)/$$exe ; \
+ sed s#/usr/local/share/rhautoimport/#$(SHAREDIR)/$(EXECUTABLE)/#g -i $(DESTDIR)$(BINDIR)/$$exe ; \
done
install-share:
$(INSTALL) -d $(DESTDIR)$(SHAREDIR)/$(EXECUTABLE)
- $(INSTALL) -m 644 rhimport.pm $(DESTDIR)$(SHAREDIR)/$(EXECUTABLE)
+ $(INSTALL) -m 644 rhautoimport.pm $(DESTDIR)$(SHAREDIR)/$(EXECUTABLE)
uninstall: remove
remove: $(REMOVE_TARGETS)
remove-bin:
- rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE)
rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLES)
remove-share:
diff --git a/configure b/configure
index 5b2df89..3184c68 100755
--- a/configure
+++ b/configure
@@ -1,24 +1,24 @@
#!/bin/sh
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
PREFIX='/usr/local'
diff --git a/fetch-feeds-frn.pl b/fetch-feeds-frn.pl
index ff8cd16..bae84a1 100755
--- a/fetch-feeds-frn.pl
+++ b/fetch-feeds-frn.pl
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
diff --git a/fetch-files-cba.pl b/fetch-files-cba.pl
index a812b1c..04db78e 100755
--- a/fetch-files-cba.pl
+++ b/fetch-files-cba.pl
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
diff --git a/rhimport-btl b/rhautoimport-btl
index b7e841f..98252d3 100755
--- a/rhimport-btl
+++ b/rhautoimport-btl
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,10 +34,10 @@ use HTML::Entities;
use LWP::Simple;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-btl.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-btl.stat";
my $RSS_URL = "http://www.btlonline.org/rss/btl128.xml";
my $PV_ID = '221';
@@ -115,7 +115,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -127,7 +127,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
last;
}
@@ -151,12 +151,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-dn b/rhautoimport-dn
index 8362f4b..9e54460 100755
--- a/rhimport-dn
+++ b/rhautoimport-dn
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,10 +33,10 @@ use IO::Handle;
use IPC::Open3;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-dn.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-dn.stat";
my $FILES_RSS_URL = "http://www.democracynow.org/podcast-stations.xml";
my $HEADLINES_RSS_URL = "http://www.democracynow.org/podcast.xml";
my $IGNORE_HEADLINE = 0;
@@ -52,7 +52,7 @@ if($#ARGV >= 0 && $ARGV[0] eq 'last') {
if($#ARGV >= 0 && $ARGV[0] eq 'noheadline') {
$IGNORE_HEADLINE = 1;
- $STAT_FILE = $ENV{'HOME'} . "/rhimport-dn-noheadline.stat";
+ $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-dn-noheadline.stat";
}
my $user = `/usr/bin/id -un`;
@@ -128,7 +128,7 @@ for my $entry ($files_feed->entries) {
exit 0;
}
$out_file = $path[-1];
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -174,9 +174,9 @@ unless($IGNORE_HEADLINE) {
next if($y ne $1);
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1", 0);
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1", 0);
print "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1", 1);
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1", 1);
print "\n";
last;
@@ -189,7 +189,7 @@ unless($IGNORE_HEADLINE) {
my $sum_title = sprintf("Democracy Now! %04d-%02d-%02d %s", @broadcast_day, $dow_string);
my $sum_text = "";
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @broadcast_day), "1", 2);
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @broadcast_day), "1", 2);
print "\n";
}
@@ -212,13 +212,13 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
my $log;
-$log = rhimport::clear_carts($dbh, $group, $to_cart);
+$log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-fe b/rhautoimport-fe
index c396f18..9c7738d 100755
--- a/rhimport-fe
+++ b/rhautoimport-fe
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,12 +34,12 @@ use HTML::Entities;
use File::Touch;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-fe.stat";
-my $NOTE_FILE = $ENV{'HOME'} . "/rhimport-fe.last_note";
-my $NEW_FILE = $ENV{'HOME'} . "/rhimport-fe.is_new";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-fe.stat";
+my $NOTE_FILE = $ENV{'HOME'} . "/rhautoimport-fe.last_note";
+my $NEW_FILE = $ENV{'HOME'} . "/rhautoimport-fe.is_new";
my $RSS_URL = "http://freie-radios.net/portal/podcast.php?serie=208&rss";
#my $PV_ID = '359';
@@ -130,7 +130,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -145,7 +145,7 @@ for my $entry ($feed->entries) {
# if($#ARGV >= 0 && $ARGV[0] eq 'nopv') {
# print "not adding note to PV\n";
# } else {
- # rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_day[0], $import_day[1], $import_day[2]), "1");
+ # rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_day[0], $import_day[1], $import_day[2]), "1");
# }
# print "\n";
@@ -177,12 +177,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-fw b/rhautoimport-fw
index ef8b159..d1914b6 100755
--- a/rhimport-fw
+++ b/rhautoimport-fw
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,11 +33,11 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-fw.stat";
-my $LAST_FILE = $ENV{'HOME'} . "/rhimport-fw.last";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-fw.stat";
+my $LAST_FILE = $ENV{'HOME'} . "/rhautoimport-fw.last";
my $RSS_URL = "http://cba.fro.at/seriesrss/263965?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '382';
@@ -141,7 +141,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -153,9 +153,9 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
print "\n";
last;
@@ -184,16 +184,16 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
-$import_log = rhimport::clear_carts($dbh, $group, $to_cart_reb);
+$import_log = rhautoimport::clear_carts($dbh, $group, $to_cart_reb);
$log .= $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox_reb, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox_reb, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-mz b/rhautoimport-mz
index 29b355a..fa50a69 100755
--- a/rhimport-mz
+++ b/rhautoimport-mz
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -30,15 +30,15 @@ use IPC::Open3;
use File::Slurp;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
my @STATIC_FILES = ($ENV{'HOME'} . "/frontex", $ENV{'HOME'} . "/maribor" );
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-mz.stat";
-my $ZF_NOTE_FILE = $ENV{'HOME'} . "/rhimport-zf.last_note";
-my $ZF_NEW_FILE = $ENV{'HOME'} . "/rhimport-zf.is_new";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-mz.stat";
+my $ZF_NOTE_FILE = $ENV{'HOME'} . "/rhautoimport-zf.last_note";
+my $ZF_NEW_FILE = $ENV{'HOME'} . "/rhautoimport-zf.is_new";
my $PV_ID = '352';
binmode(STDIN, ":utf8");
@@ -191,7 +191,7 @@ foreach my $dir (@STATIC_FILES) {
$sum_text = $sum_text . "<br/><br/>\n";
print "\nsummary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
-rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1");
+rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1");
print "\n";
@@ -205,11 +205,11 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret = 1;
-my $log = rhimport::clear_carts($dbh, $group, 0);
-my ($cart, $high_cart) = rhimport::get_cart_range($dbh, $group);
+my $log = rhautoimport::clear_carts($dbh, $group, 0);
+my ($cart, $high_cart) = rhautoimport::get_cart_range($dbh, $group);
foreach my $file (@files) {
if($cart > $high_cart) {
print "not enough carts - will ignore remaining files!!!";
@@ -217,7 +217,7 @@ foreach my $file (@files) {
}
print " importing $file to cart $cart\n";
my $import_log;
- ($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+ ($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
last unless $ret;
diff --git a/rhimport-nw b/rhautoimport-nw
index 8adea51..3d6656b 100755
--- a/rhimport-nw
+++ b/rhautoimport-nw
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,10 +33,10 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-nw.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-nw.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/262514?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '73';
@@ -124,7 +124,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -136,7 +136,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
print "\n";
last;
@@ -164,12 +164,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-o94n b/rhautoimport-o94n
index 2f1fcec..c3f8ab6 100755
--- a/rhimport-o94n
+++ b/rhautoimport-o94n
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,10 +33,10 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-o94n.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-o94n.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/264131?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '430';
@@ -143,7 +143,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -155,7 +155,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_date), "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_date), "1");
print "\n";
last;
@@ -183,12 +183,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-oi b/rhautoimport-oi
index 7b33422..1e637c8 100755
--- a/rhimport-oi
+++ b/rhautoimport-oi
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,11 +33,11 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-oi.stat";
-my $LAST_FILE = $ENV{'HOME'} . "/rhimport-oi.last";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-oi.stat";
+my $LAST_FILE = $ENV{'HOME'} . "/rhautoimport-oi.last";
my $RSS_URL = "http://npla.de/onda/feed/serie=3";
my $PV_ID = '220';
@@ -100,7 +100,7 @@ if($current_id eq $id) {
print "looking for files like '$bdfile' in RSS Feed\n";
print " -> $RSS_URL\n";
-my $feed = rhimport::fetch_parse_rss($RSS_URL)
+my $feed = rhautoimport::fetch_parse_rss($RSS_URL)
or die "Error fetching feed: " . XML::Feed->errstr;
my $file = "";
@@ -115,7 +115,7 @@ for my $entry ($feed->entries) {
my $ff = File::Fetch->new(uri => $entry->enclosure->url);
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -127,7 +127,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
last;
}
@@ -151,12 +151,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-ra b/rhautoimport-ra
index 0063338..3018429 100755
--- a/rhimport-ra
+++ b/rhautoimport-ra
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,10 +33,10 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-ra.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-ra.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/262430?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '76';
@@ -126,7 +126,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -138,9 +138,9 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
print "\n";
last;
@@ -169,16 +169,16 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
-$import_log = rhimport::clear_carts($dbh, $group, $to_cart_reb);
+$import_log = rhautoimport::clear_carts($dbh, $group, $to_cart_reb);
$log .= $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox_reb, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox_reb, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-rs b/rhautoimport-rs
index 71d9e27..99a3b19 100755
--- a/rhimport-rs
+++ b/rhautoimport-rs
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,10 +34,10 @@ use HTML::Entities;
use LWP::Simple;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-rs.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-rs.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/262433?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '75';
@@ -160,7 +160,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -172,7 +172,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
print "\n";
last;
@@ -200,12 +200,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-sm b/rhautoimport-sm
index e28276f..6678d35 100755
--- a/rhimport-sm
+++ b/rhautoimport-sm
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,10 +34,10 @@ use HTML::Entities;
use LWP::Simple;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-sm.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-sm.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/263673?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '304';
@@ -147,7 +147,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -159,7 +159,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
print "\n";
last;
@@ -187,12 +187,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-sv b/rhautoimport-sv
index 6056f69..12c975c 100755
--- a/rhimport-sv
+++ b/rhautoimport-sv
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,10 +34,10 @@ use HTML::Entities;
use LWP::Simple;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-sv.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-sv.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/262457?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '396';
@@ -146,7 +146,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -158,7 +158,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
print "\n";
last;
@@ -186,12 +186,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-tr b/rhautoimport-tr
index 6551780..d467658 100755
--- a/rhimport-tr
+++ b/rhautoimport-tr
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,10 +33,10 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-tr.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-tr.stat";
my $RSS_URL = "http://cba.fro.at/series/tierrechtsradio/feed?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '506';
@@ -126,7 +126,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -138,7 +138,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
last;
@@ -166,12 +166,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-ut b/rhautoimport-ut
index 8edb30b..22b27d9 100755
--- a/rhimport-ut
+++ b/rhautoimport-ut
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -33,10 +33,10 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-ut.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-ut.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/264016?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '393';
@@ -126,7 +126,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -138,9 +138,9 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
print "\n";
last;
@@ -169,16 +169,16 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
-$import_log = rhimport::clear_carts($dbh, $group, $to_cart_reb);
+$import_log = rhautoimport::clear_carts($dbh, $group, $to_cart_reb);
$log .= $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox_reb, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox_reb, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-zf b/rhautoimport-zf
index 0f28ed7..264232c 100755
--- a/rhimport-zf
+++ b/rhautoimport-zf
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,12 +34,12 @@ use HTML::Entities;
use File::Touch;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-zf.stat";
-my $NOTE_FILE = $ENV{'HOME'} . "/rhimport-zf.last_note";
-my $NEW_FILE = $ENV{'HOME'} . "/rhimport-zf.is_new";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-zf.stat";
+my $NOTE_FILE = $ENV{'HOME'} . "/rhautoimport-zf.last_note";
+my $NEW_FILE = $ENV{'HOME'} . "/rhautoimport-zf.is_new";
my $RSS_URL = "http://freie-radios.net/portal/podcast.php?serie=53&rss";
my $PV_ID = '300';
@@ -118,7 +118,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -133,9 +133,9 @@ for my $entry ($feed->entries) {
if($#ARGV >= 0 && $ARGV[0] eq 'nopv') {
print "not adding note to PV for regular entry - only for rebroadcast\n";
} else {
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @broadcast_day), "1", 1);
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @broadcast_day), "1", 1);
}
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @rebroadcast_day), "2", 0) unless $dow == 5;
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @rebroadcast_day), "2", 0) unless $dow == 5;
print "\n";
unlink($NOTE_FILE);
@@ -166,12 +166,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport-zffe b/rhautoimport-zffe
index a896551..eb4c1a1 100755
--- a/rhimport-zffe
+++ b/rhautoimport-zffe
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -29,14 +29,14 @@ use IO::Handle;
use IPC::Open3;
use File::Slurp;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-zffe.stat";
-my $ZF_NOTE_FILE = $ENV{'HOME'} . "/rhimport-zf.last_note";
-my $ZF_NEW_FILE = $ENV{'HOME'} . "/rhimport-zf.is_new";
-my $FE_NOTE_FILE = $ENV{'HOME'} . "/rhimport-fe.last_note";
-my $FE_NEW_FILE = $ENV{'HOME'} . "/rhimport-fe.is_new";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-zffe.stat";
+my $ZF_NOTE_FILE = $ENV{'HOME'} . "/rhautoimport-zf.last_note";
+my $ZF_NEW_FILE = $ENV{'HOME'} . "/rhautoimport-zf.is_new";
+my $FE_NOTE_FILE = $ENV{'HOME'} . "/rhautoimport-fe.last_note";
+my $FE_NEW_FILE = $ENV{'HOME'} . "/rhautoimport-fe.is_new";
my $PV_ID = '359';
binmode(STDIN, ":utf8");
@@ -104,7 +104,7 @@ $sum_text = $sum_text . "<br/>\n" . get_note($ZF_NOTE_FILE) . "<br/>\n";
$sum_text = $sum_text . "<br/><br/>\n";
print "\nsummary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
-rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1");
+rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_day), "1");
print "\n";
unlink($STAT_FILE);
diff --git a/rhimport-zfw b/rhautoimport-zfw
index a04e249..9cdb169 100755
--- a/rhimport-zfw
+++ b/rhautoimport-zfw
@@ -1,24 +1,24 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
@@ -34,10 +34,10 @@ use IPC::Open3;
use HTML::Entities;
use RHRD::rddb;
-use lib '/usr/local/share/rhimport/';
-use rhimport;
+use lib '/usr/local/share/rhautoimport/';
+use rhautoimport;
-my $STAT_FILE = $ENV{'HOME'} . "/rhimport-zfw.stat";
+my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-zfw.stat";
my $RSS_URL = "http://cba.fro.at/seriesrss/263764?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $PV_ID = '360';
@@ -129,7 +129,7 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
- if(!rhimport::check_file_extension($out_file)) {
+ if(!rhautoimport::check_file_extension($out_file)) {
print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
RHRD::rddb::closedb($dbh);
exit 1;
@@ -141,7 +141,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, $id, "1");
print "\n";
last;
@@ -169,12 +169,12 @@ my $error_cb = sub {
return 0;
};
-rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+rhautoimport::check_key_file() or die "Import Key not found, use rhautoimport-create-id to create one\n";
my $ret;
-my $log = rhimport::clear_carts($dbh, $group, $to_cart);
+my $log = rhautoimport::clear_carts($dbh, $group, $to_cart);
my $import_log;
-($ret, $import_log) = rhimport::import_single($file, $dropbox, $user, 0, $error_cb);
+($ret, $import_log) = rhautoimport::import_single($file, $dropbox, $user, 0, $error_cb);
$log .= $import_log;
RHRD::rddb::closedb($dbh);
diff --git a/rhimport.pm b/rhautoimport.pm
index 09c5082..76e3893 100644
--- a/rhimport.pm
+++ b/rhautoimport.pm
@@ -1,29 +1,29 @@
#!/usr/bin/perl -w
#
#
-# rhimport
+# rhautoimport
#
# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
#
-# This file is part of rhimport.
+# This file is part of rhautoimport.
#
-# rhimport is free software: you can redistribute it and/or modify
+# rhautoimport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhimport is distributed in the hope that it will be useful,
+# rhautoimport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
+# along with rhautoimport. If not, see <http://www.gnu.org/licenses/>.
#
use strict;
-package rhimport;
+package rhautoimport;
use IO::Handle;
use IPC::Open3;
@@ -34,9 +34,9 @@ use LWP::Simple;
use XML::Feed;
my $ssh_host = "airplay";
-my $ssh_user = "rhimport";
-my $ssh_key_file = "$ENV{'HOME'}/.rhimport/import.key";
-my $ssh_dir = "/programm/.rhimport";
+my $ssh_user = "rhautoimport";
+my $ssh_key_file = "$ENV{'HOME'}/.rhautoimport/import.key";
+my $ssh_dir = "/programm/.rhautoimport";
my $rdimport_wrapper = "/usr/local/bin/dropbox_newfile.pl";
sub fetch_parse_rss
diff --git a/rhimport b/rhimport
deleted file mode 100755
index f0be9df..0000000
--- a/rhimport
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/perl -w
-#
-#
-# rhimport
-#
-# Copyright (C) 2009-2015 Christian Pointner <equinox@helsinki.at>
-#
-# This file is part of rhimport.
-#
-# rhimport is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# any later version.
-#
-# rhimport is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with rhimport. If not, see <http://www.gnu.org/licenses/>.
-#
-
-use strict;
-use Getopt::Long;
-use RHRD::rddb;
-
-use lib '/usr/local/share/rhimport/';
-use rhimport;
-
-my $HELP = 0;
-my $FILE = "";
-my $DROPBOX = "";
-my $LISTALLOWED = 0;
-
-GetOptions ("help!" => \$HELP,
- "file=s" => \$FILE,
- "dropbox=s" => \$DROPBOX,
- "list-allowed!" => \$LISTALLOWED,
- ) or die();
-
-if($HELP) {
- print << "EOF";
-usage: $0 --file <audio file> --dropbox <path to dropbox> --list-allowed
-
-options:
- -f | --file the media file or playlist to import
- -i | --id the show id to import to
- -l | --list-allowed list allowed shows and exit
-
-EOF
- exit 0;
-}
-
-my $user = `/usr/bin/id -un`;
-$user =~ s/\n//;
-$user = 'heslinki';
-
-my ($dbh, undef, $errorstring) = RHRD::rddb::opendb();
-if(!defined $dbh) {
- print "$errorstring\n";
- exit 1;
-}
-my @allowed_dbs = RHRD::rddb::get_dropboxes($dbh, $user);
-if(!defined $allowed_dbs[0] && defined $allowed_dbs[2]) {
- print "$allowed_dbs[2]\n";
- exit 1;
-}
-
-if($LISTALLOWED) {
- print "| id | Title\n";
- print "+-------+-------------------------------------------------------------------\n";
- for my $href ( @allowed_dbs ) {
- if($href->{'TYPE'} eq 'show') {
- my @show_carts = RHRD::rddb::get_show_carts($dbh, $href->{'SHOWLOG'}, $href->{'GROUPLOWCART'}, $href->{'GROUPHIGHCART'});
- if(!defined $show_carts[0] && defined $show_carts[2]) {
- print "$show_carts[2]\n";
- exit 1;
- }
- print "| $href->{'SHOWID'} | $href->{'SHOWTITLE'}, Carts: [" . join(', ', @show_carts) . "]\n";
- }
- }
- RHRD::rddb::closedb($dbh);
- exit 0;
-}
-
-my $cl_error_cb = sub {
- my ($text) = @_;
-
- print "\n$text .. cancel operation [Y/n]? ";
- my $x = scalar(<STDIN>);
- $x =~ /^n/i;
-};
-
-(-e "$FILE") or die "file '$FILE' not found\n";
-print "will import $FILE, with user $user\n\n";
-
-my $group = '';
-my $to_cart = 0;
-for my $href (@allowed_dbs) {
- if($href->{'PATH'} eq $DROPBOX) {
- $group = $href->{'GROUP'};
- $to_cart = $href->{'TO_CART'};
- last;
- }
-}
-
-if($group eq '') {
- print "Dropbox not found or not allowed\n";
- exit 1
-}
-
-my $ret;
-my $log;
-$log = rhimport::clear_carts($dbh, $group, $to_cart);
-my $import_log;
-($ret, $import_log) = rhimport::import_single($FILE, $DROPBOX, $user, 0, $cl_error_cb);
-$log .= $import_log;
-
-RHRD::rddb::closedb($dbh);
-
-if(!$ret) {
- exit 1;
-}
-
-exit 0;