#!/bin/bash
+# Copyright (C) 2011-2012 Equinox Software Inc.
+# Ben Ostrowsky <ben@esilibrary.com>
+# Galen Charlton <gmc@esilibrary.com>
+#
+# Original version sponsored by the King County Library System
+#
+# This program 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 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
LIBRARYNAME="LIBRARYCODE" # library code assigned by collectionHQ
DATE=`date +%Y%m%d`
FILE="$LIBRARYNAME""$DATE".DAT
-- Functions used by collectionHQ reporting. This only needs to be run once.
--
+-- Copyright (C) 2011-2012 Equinox Software Inc.
+-- Ben Ostrowsky <ben@esilibrary.com>
+-- Galen Charlton <gmc@esilibrary.com>
+--
+-- Original version sponsored by the King County Library System
+--
+-- This program 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 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program 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 this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
CREATE SCHEMA collectionHQ;
CREATE OR REPLACE FUNCTION collectionHQ.attempt_year (TEXT) RETURNS TEXT AS $$
+-- Copyright (C) 2011-2012 Equinox Software Inc.
+-- Ben Ostrowsky <ben@esilibrary.com>
+-- Galen Charlton <gmc@esilibrary.com>
+--
+-- Original version sponsored by the King County Library System
+--
+-- This program 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 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program 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 this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
SELECT collectionHQ.write_bib_rows_to_stdout('LIBRARYCODE',1);
+-- Copyright (C) 2011-2012 Equinox Software Inc.
+-- Ben Ostrowsky <ben@esilibrary.com>
+-- Galen Charlton <gmc@esilibrary.com>
+--
+-- Original version sponsored by the King County Library System
+--
+-- This program 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 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program 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 this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
SELECT collectionHQ.write_item_rows_to_stdout('LIBRARYCODE',1);
#!/usr/bin/perl -w
+# Copyright (C) 2011-2012 Equinox Software Inc.
+# Ben Ostrowsky <ben@esilibrary.com>
+# Galen Charlton <gmc@esilibrary.com>
+#
+# Original version sponsored by the King County Library System
+#
+# This program 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 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
use strict;
use Email::Sender::Simple qw(sendmail);
use Email::Simple;