From 1f0473c9844b6e32338d1c1af6e368f3387e8890 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 16 Oct 2019 12:37:52 +0100 Subject: Combine and improve fetch-comments/reports scripts Make them take start/end hour arguments, cope if only one given, optional body, and combine them together in one `fetch` script. --- bin/fetch-comments | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'bin/fetch-comments') diff --git a/bin/fetch-comments b/bin/fetch-comments index 55ba70d85..0fb30f236 100755 --- a/bin/fetch-comments +++ b/bin/fetch-comments @@ -1,25 +1,6 @@ -#!/usr/bin/env perl +#!/bin/bash # -# This script utilises the Open311 extension explained at -# https://github.com/mysociety/FixMyStreet/wiki/Open311-FMS---Proposed-differences-to-Open311 -# to fetch updates on service requests. +# Wrapper to call new script -use strict; -use warnings; -require 5.8.0; - -BEGIN { - use File::Basename qw(dirname); - use File::Spec; - my $d = dirname(File::Spec->rel2abs($0)); - require "$d/../setenv.pl"; -} - -use CronFns; -my ($verbose, $nomail) = CronFns::options(); - -use Open311::GetServiceRequestUpdates; - -my $updates = Open311::GetServiceRequestUpdates->new( verbose => $verbose ); - -$updates->fetch; +DIR="$(cd "$(dirname "$BASH_SOURCE")" && pwd -P)" +$DIR/fetch --updates -- cgit v1.2.3