aboutsummaryrefslogtreecommitdiffstats
path: root/tools/piwigo_remote.pl
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-09-22 21:47:03 +0000
committerplegall <plg@piwigo.org>2008-09-22 21:47:03 +0000
commitaa41a468e53655e186ea667631466bff65cc42fc (patch)
treef94ac80207a3c5721b61d02efdc484926ea3258d /tools/piwigo_remote.pl
parentd2d9f7a2d263a06168a26aec8582febcf3387416 (diff)
improvement: WebService method pwg.images.add can set fill #images table
columns. rank is directly related to a category and several categories can be linked at once. Basic technical metadata {filesize, width, height} are automaticaly filled. git-svn-id: http://piwigo.org/svn/trunk@2569 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'tools/piwigo_remote.pl')
-rw-r--r--tools/piwigo_remote.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl
index dcc6ba2cd..30b8743b4 100644
--- a/tools/piwigo_remote.pl
+++ b/tools/piwigo_remote.pl
@@ -10,7 +10,7 @@ use Getopt::Long;
my %opt = ();
GetOptions(
\%opt,
- qw/action=s file=s thumbnail=s category_id=i name=s rank=s/
+ qw/action=s file=s thumbnail=s categories=s define=s%/
);
our $ua = LWP::UserAgent->new;
@@ -59,11 +59,13 @@ if ($opt{action} eq 'pwg.images.add') {
file_content => $file_content,
thumbnail_sum => $thumbnail_sum,
thumbnail_content => $thumbnail_content,
- category_id => $opt{category_id},
- name => $opt{name},
- rank => defined($opt{rank}) ? $opt{rank} : 'auto',
+ categories => $opt{categories},
};
+ foreach my $key (keys %{ $opt{define} }) {
+ $form->{$key} = $opt{define}{$key};
+ }
+
my $response = $ua->post(
$conf{base_url}.'/ws.php?format=json',
$form