Changeset 27797


Ignore:
Timestamp:
03/17/14 15:11:27 (5 years ago)
Author:
plg
Message:

version 1.0: compatible with Piwigo 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/piwigo_import_tree/piwigo_import_tree.pl

    r18695 r27797  
    11#!/usr/bin/perl 
    22 
     3# author: Pierrick Le Gall (plg) 
     4# version: 1.0 
     5# documentation: http://piwigo.org/doc/doku.php?id=user_documentation:tools:piwigo_import_tree 
     6# 
    37# usage: 
    4 # perl piwigo_import_tree.pl --directory=/Users/pierrick/piwigo/album1 
     8# perl piwigo_import_tree.pl 
     9#    --base_url=http://address/of/your/piwigo 
     10#    --user=admin_username 
     11#    --password=?? 
     12#    --directory="my photos directory" 
     13#    [--parent_album_id=NN] 
     14#    [--quiet] 
     15#    [--only_write_cache] 
     16#    [--reload_properties] 
     17#    [--debug] 
     18#    [--short_lines] 
    519 
    620use strict; 
     
    139153    ); 
    140154 
    141     foreach my $image_href (@{from_json($response->content)->{result}{images}{_content}}) { 
    142         $photos_of_album{ $params{album_id} }{ $image_href->{file} } = $image_href->{id}; 
     155    foreach my $image_href (@{from_json($response->content)->{result}{images}}) { 
     156        $photos_of_album{ $params{album_id} }{ $image_href->{file} } = $image_href->{id}; 
    143157    } 
    144158} 
Note: See TracChangeset for help on using the changeset viewer.