summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrhautoimport-btl6
-rwxr-xr-xrhautoimport-dn6
-rwxr-xr-xrhautoimport-nw6
-rwxr-xr-xrhautoimport-oi6
-rwxr-xr-xrhautoimport-ra6
-rwxr-xr-xrhautoimport-rs9
-rwxr-xr-xrhautoimport-tr6
7 files changed, 30 insertions, 15 deletions
diff --git a/rhautoimport-btl b/rhautoimport-btl
index 87ad7c7..1e2e7cc 100755
--- a/rhautoimport-btl
+++ b/rhautoimport-btl
@@ -38,6 +38,7 @@ my $STAT_FILE = $ENV{'HOME'} . "/rhautoimport-btl.stat";
my $RSS_URL = "http://www.btlonline.org/rss/btl128.xml";
my $RD_GROUP = "betweenlin";
my $PV_ID = '221';
+my $LAST_RUN = 0;
my $curweek = RHRD::utils::get_rd_week();
if($curweek == 2 || $curweek == 4) {
@@ -46,7 +47,8 @@ if($curweek == 2 || $curweek == 4) {
}
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
@@ -120,7 +122,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found for " . Date::Calc::Date_to_Text(@broadcast_date) . " - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";
diff --git a/rhautoimport-dn b/rhautoimport-dn
index 3bb0e58..2a65c8b 100755
--- a/rhautoimport-dn
+++ b/rhautoimport-dn
@@ -38,9 +38,11 @@ my $FILES_RSS_URL = "http://www.democracynow.org/podcast-stations.xml";
my $HEADLINES_RSS_URL = "http://www.democracynow.org/podcast.xml";
my $RD_GROUP = "democracyn";
my $PV_ID = '111';
+my $LAST_RUN = 0;
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
my @today = Date::Calc::Today();
@@ -121,7 +123,7 @@ for my $entry ($files_feed->entries) {
}
if($uri eq "") {
print "No Entry found from day in question - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";
diff --git a/rhautoimport-nw b/rhautoimport-nw
index 47c0281..e3f3dad 100755
--- a/rhautoimport-nw
+++ b/rhautoimport-nw
@@ -38,9 +38,11 @@ my $RSS_URL = "http://cba.fro.at/seriesrss/262514?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $RD_GROUP = "netwatcher";
my $PV_ID = '73';
+my $LAST_RUN = 0;
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
@@ -128,7 +130,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found from $bd - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";
diff --git a/rhautoimport-oi b/rhautoimport-oi
index a261055..ac3ea89 100755
--- a/rhautoimport-oi
+++ b/rhautoimport-oi
@@ -39,6 +39,7 @@ my $LAST_FILE = $ENV{'HOME'} . "/rhautoimport-oi.last";
my $RSS_URL = "http://npla.de/onda/feed/serie=3";
my $RD_GROUP = "ondainfo";
my $PV_ID = '220';
+my $LAST_RUN = 0;
my $curweek = RHRD::utils::get_rd_week();
if($curweek == 1 || $curweek == 3) {
@@ -47,7 +48,8 @@ if($curweek == 1 || $curweek == 3) {
}
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
@@ -121,7 +123,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found with #" . $broadcast_num . " - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";
diff --git a/rhautoimport-ra b/rhautoimport-ra
index 938749e..0710a62 100755
--- a/rhautoimport-ra
+++ b/rhautoimport-ra
@@ -38,9 +38,11 @@ my $RSS_URL = "http://cba.fro.at/seriesrss/262430?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $RD_GROUP = "RadioATTAC";
my $PV_ID = '76';
+my $LAST_RUN = 0;
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
@@ -131,7 +133,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found from $bd - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";
diff --git a/rhautoimport-rs b/rhautoimport-rs
index f525a6e..75eac79 100755
--- a/rhautoimport-rs
+++ b/rhautoimport-rs
@@ -39,6 +39,7 @@ my $RSS_URL = "http://cba.fro.at/seriesrss/262433?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $RD_GROUP = "radioStimm";
my $PV_ID = '75';
+my $LAST_RUN = 0;
my $curweek = RHRD::utils::get_rd_week();
my %week_table = ( 1 => 2, 2 => 6, 3 => 2, 4 => 6 );
@@ -47,11 +48,13 @@ my $nextweek = $curweek == 4 ? 1 : $curweek + 1;
if($#ARGV >= 0) {
if($curweek == 1 || $curweek == 3) {
if($ARGV[0] eq 'lastdi') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
} else {
if($ARGV[0] eq 'lastsa') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
}
}
@@ -171,7 +174,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found from $bd - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";
diff --git a/rhautoimport-tr b/rhautoimport-tr
index c604f9d..488c5ed 100755
--- a/rhautoimport-tr
+++ b/rhautoimport-tr
@@ -38,6 +38,7 @@ my $RSS_URL = "http://cba.fro.at/series/tierrechtsradio/feed?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $RD_GROUP = "tierrecht";
my $PV_ID = '506';
+my $LAST_RUN = 0;
my @today = Date::Calc::Standard_to_Business(Date::Calc::Today());
if($today[2] == 5) {
@@ -46,7 +47,8 @@ if($today[2] == 5) {
}
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
@@ -128,7 +130,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found from $bd - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";