I know I'm late to the part, but I found this thread and it seems to be what I'm looking for.
I have a cron job running on my local computer that sends new images in a folder up to piwigo via rsync. What I'd like to do is run Piwigo's local syncronization every few minutes to keep an album updated.
I tried running the perl script, but it doesn't seem to be working. Here's what I get (I do use my actual username and password, but not showing them here):
$ perl remote_sync.pl --base_url=
http://MYSITE/piwigo --username=MYUSERNAME --password=MYPASSWORD
$VAR1 = bless( {
'_protocol' => 'HTTP/1.1',
'_content' => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="
http://www.MYSITE/piwigo/admin.php?page=site_update&site=1">here</a>.</p>
</body></html>
',
'_rc' => '301',
'_headers' => bless( {
'connection' => 'close',
'client-response-num' => 1,
'location' => '
http://www.MYSITE/piwigo/admin.php?page=site_update&site=1',
'date' => 'Wed, 26 Jun 2013 12:19:35 GMT',
'vary' => 'Accept-Encoding',
'client-peer' => '64.111.115.12:80',
'content-length' => '282',
'client-date' => 'Wed, 26 Jun 2013 12:19:35 GMT',
'content-type' => 'text/html; charset=iso-8859-1',
'title' => '301 Moved Permanently',
'server' => 'Apache'
}, 'HTTP::Headers' ),
'_msg' => 'Moved Permanently',
'_request' => bless( {
'_content' => 'privacy_level=0&sync=files&submit=1&add_to_caddie=1&subcats-included=1&simulate=0&sync_meta=1&display_info=1',
'_uri' => bless( do{(my $o = '
http://MYSITE/piwigo/admin.php?page=site_update&site=1')}, 'URI::http' ),
'_headers' => bless( {
'user-agent' => 'Mozilla/remote_sync.pl',
'content-type' => 'application/x-www-form-urlencoded',
'content-length' => 108,
'authorization' => 'Basic Y2hyaXNiZWNrc3Ryb206c3VwamhhMjUxMA=='
}, 'HTTP::Headers' ),
'_method' => 'POST',
'_uri_canonical' => $VAR1->{'_request'}{'_uri'}
}, 'HTTP::Request' )
}, 'HTTP::Response' );
I'm not very familiar with perl, but this seems like I'm just using the wrong URL to update.
Any ideas? I would love a way to auto-sync my directories.