aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-alerts
diff options
context:
space:
mode:
authormatthew <matthew>2007-01-26 01:01:22 +0000
committermatthew <matthew>2007-01-26 01:01:22 +0000
commit83e3b8245775ff439ed20c654eaca8b66d2cc141 (patch)
tree03a96d8a9f882477edeec86699f1371e9870afb8 /bin/send-alerts
parent4afab0044d781b2ea39ff2153d71b65a12ce3433 (diff)
RSS/email alerts for updates, local problems.
Diffstat (limited to 'bin/send-alerts')
-rwxr-xr-xbin/send-alerts35
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/send-alerts b/bin/send-alerts
new file mode 100755
index 000000000..a9ccb8dba
--- /dev/null
+++ b/bin/send-alerts
@@ -0,0 +1,35 @@
+#!/usr/bin/perl -w
+
+# send-alerts:
+# Email alerts for Neighbourhood Fix-It
+#
+# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
+# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
+#
+# $Id: send-alerts,v 1.1 2007-01-26 01:01:22 matthew Exp $
+
+use strict;
+require 5.8.0;
+
+# Horrible boilerplate to set up appropriate library paths.
+use FindBin;
+use lib "$FindBin::Bin/../perllib";
+use lib "$FindBin::Bin/../../perllib";
+
+use mySociety::Config;
+use mySociety::DBHandle qw(dbh);
+use mySociety::Alert;
+
+BEGIN {
+ mySociety::Config::set_file("$FindBin::Bin/../conf/general");
+ mySociety::DBHandle::configure(
+ Name => mySociety::Config::get('BCI_DB_NAME'),
+ User => mySociety::Config::get('BCI_DB_USER'),
+ Password => mySociety::Config::get('BCI_DB_PASS'),
+ Host => mySociety::Config::get('BCI_DB_HOST', undef),
+ Port => mySociety::Config::get('BCI_DB_PORT', undef)
+ );
+}
+
+mySociety::Alert::email_alerts();
+