chiark / gitweb /
WIP commod-update-receiver; before make parse_parser into library
[ypp-sc-tools.db-live.git] / pctb / commod-update-receiver
1 #!/usr/bin/perl -w
2 #
3 # This script is invoked when the YPP SC PCTB client uploads to
4 # the chiark database.
5
6 # This is part of ypp-sc-tools, a set of third-party tools for assisting
7 # players of Yohoho Puzzle Pirates.
8 #
9 # Copyright (C) 2009 Ian Jackson <ijackson@chiark.greenend.org.uk>
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 #
24 # Yohoho and Puzzle Pirates are probably trademarks of Three Rings and
25 # are used without permission.  This program is not endorsed or
26 # sponsored by Three Rings.
27
28
29 # Uploads contain:
30 #  ocean                        canonical mixed case
31 #  island                       canonical mixed case
32 #  clientname                   "ypp-sc-tools"
33 #  clientversion                2.1-g2e06a26  [from git-describe --tags HEAD]
34 #  clientfixes                  "lastpage"  [space separated list]
35 #  deduped.tsv.gz               output of ypp-commodities --tsv
36
37 use strict (qw(vars));
38 use POSIX;
39
40 $CGI::POST_MAX= 3*1024*1024;
41 $CGI::DISABLE_UPLOADS= 1;
42
43 use CGI qw/:standard -private_tempfiles/;
44
45 setlocale(LC_CTYPE, "en_GB.UTF-8");
46