ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / misc / cronjobs / cloud-kw.pl
index 11aaf88..9686415 100755 (executable)
@@ -5,18 +5,18 @@
 #
 # This file is part of Koha.
 #
-# Koha 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.
+# Koha 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 3 of the License, or
+# (at your option) any later version.
 #
-# Koha 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.
+# Koha 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 Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use strict;
 use warnings;
@@ -26,7 +26,7 @@ use YAML::Syck;
 use Pod::Usage;
 use Getopt::Long;
 use C4::Context;
-
+use C4::Log;
 
 my $verbose     = 0;
 my $help        = 0;
@@ -44,6 +44,7 @@ sub usage {
 
 usage() if $help || !$conf;          
 
+cronlogaction();
 
 my @clouds;
 print "Reading configuration file: $conf\n" if $verbose;
@@ -127,12 +128,12 @@ sub new {
 # RETURN:
 #   A 4-dimensionnal array in $self->{top_terms}
 #   [0] term
-#   [1] term number of occurences
+#   [1] term number of occurrences
 #   [2] term proportional relative weight in terms set E[0-1]
 #   [3] term logarithmic relative weight E [0-levels_cloud]
 #   
 #   This array is sorted alphabetically by terms ([0])
-#   It can be easily sorted by occurences:
+#   It can be easily sorted by occurrences:
 #     @t = sort { $a[1] <=> $a[1] } @{$self->{top_terms}};
 #
 sub scan {
@@ -235,7 +236,7 @@ sub scan {
 
 
 #
-# Returns a HTML version of index top terms formated
+# Returns a HTML version of index top terms formatted
 # as a 'tag cloud'.
 #
 sub html_cloud {
@@ -375,14 +376,14 @@ Configuration file looks like that:
 =head1 IMPROVEMENTS
 
 Generated top terms have more informations than those outputted from
-the time beeing. Some parameters could be easily added to improve
+the time being. Some parameters could be easily added to improve
 this script:
 
 =over
 
 =item B<WithCount>
 
-In order to output terms with the number of occurences they
+In order to output terms with the number of occurrences they
 have been found in Koha Catalogue by Zebra.
 
 =item B<CloudLevels>