csv notify
authorBill Erickson <berick@esilibrary.com>
Wed, 5 Dec 2012 18:20:02 +0000 (13:20 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 5 Dec 2012 18:20:02 +0000 (13:20 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm [deleted file]
Open-ILS/src/support-scripts/csv_notify_pusher.pl [new file with mode: 0644]
itiva_pusher.pl [deleted file]
notify-csv.tt2

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm
deleted file mode 100644 (file)
index c4fd23f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-package OpenILS::Application::Trigger::Reactor::NotifyCSV;
-use base "OpenILS::Application::Trigger::Reactor";
-use strict; use warnings;
-
-sub ABOUT {
-    return q|
-Creates a CSV representation of patron actions for the purposes of notifying 
-the patron via external notification mechanisms.  
-
-Event Environment Requirements
-
-* patron object with card
-* org unit
-
-Required Event Parameters
-
-notify_media (e.g. phone)
-notify_type  (e.g. overdue)
-notify_level (e.g. "1" -- first overdue)
-
-The set of options for each event parameter is dependent on the 3rd-party
-processing the CSV file.  Using iTiva as the reference implementation, event 
-parameter values options include:
-
-notify_media : 'V' (voice), 'T' (text)
-notify_level : '1' (1st notice), '2' (2nd notice...) , '3'
-notify_type : 
-    'FINES', 
-    'OVERDUE', 
-    'PREOVERDUE', 
-    'PRERESERVE', 
-    'RECALL', 
-    'RESERVE', 
-    'RESERVECANCEL', 
-    'RESERVEEXPIRE', 
-    'SUSPEND'
-|;
-}
-
-sub handler {
-    my ($self, $env) = @_;
-    return 1 if $self->run_TT($env);
-    return 0;
-}
-
-1;
diff --git a/Open-ILS/src/support-scripts/csv_notify_pusher.pl b/Open-ILS/src/support-scripts/csv_notify_pusher.pl
new file mode 100644 (file)
index 0000000..b923a7f
--- /dev/null
@@ -0,0 +1,5 @@
+
+
+my $header = <<CSV;
+"Media Type","Language","Notice Type","Notification Level","Patron Number","Patron Title","Patron First Names","Patron Surname","Telephone Number","Email Address","Library Code","Site Code","Site Name","Item Barcode","Due Date","Item Title","Transaction ID"
+CSV
diff --git a/itiva_pusher.pl b/itiva_pusher.pl
deleted file mode 100644 (file)
index b923a7f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-my $header = <<CSV;
-"Media Type","Language","Notice Type","Notification Level","Patron Number","Patron Title","Patron First Names","Patron Surname","Telephone Number","Email Address","Library Code","Site Code","Site Name","Item Barcode","Due Date","Item Title","Transaction ID"
-CSV
index be00608..28d4f68 100644 (file)
@@ -26,7 +26,7 @@
             due_date = date.format(
                 helpers.format_date(circ.due_date), '%d/%m/%Y');
 
-        ELSIF core_type == 'ahr':
+        ELSIF core_type == 'ahr';
             # e.g. hold ready for pickup
             hold = target_obj;
             user = hold.usr;
             user = target_obj.usr;
             org_unit = target_obj.org_unit;
 
-        ELSIF core_type == 'au':
+        ELSIF core_type == 'au';
             # e.g. barred
             user = target_obj;
             org_unit = user.home_ou;
         END;
 
-        user_locale = helpers.get_user_locale(user.id));
+        user_locale = helpers.get_user_locale(user.id);
         user_lang = user_locale | replace('-.*', ''); # ISO 639-1 language
         user_phone = helpers.get_user_setting(
             user.id, 'opac.default_phone') || user.day_phone;