7
« on: December 29, 2008, 07:29:31 am »
LinuxMCE expects the photos to be stored under /home/flickr. Note, it is ok to have sub-directories there.
This is configured in the flickrfetchr.conf file.
Here's part of my /etc/flickrfetchr.conf file. You might want to cut and paste to give you a starting point:
# this pretty much matches the criteria that the default flickr.pl uses
LINUXMCE_1024_X_768_CRITERIA = {
:limit => 100,
:daycount => 5,
:destination_path => '/home/flickr',
:destination_naming => :short,
:plugins => [:LinuxMCE_Plugin],
:image_acceptable_types => ['jpg'],
:image_width_range => 600..1920,
:image_height_range => 600..1080,
:image_resize_to => {:width => 1024, :height => 768}
}
# some flickr group IDs
TOP20AVIATION_ID = '60512572@N00'
TOP20FISHEYE_ID = '46819026@N00'
TOP20LONGEXPOSURE_ID = '54941127@N00'
# lets put the top20 groups into a top20 LinuxMCE subdirectory
TOP20_CRITERIA = LINUXMCE_1024_X_768_CRITERIA.merge({
:destination_path => '/home/flickr/top20',
:limit => 20
})
# now let's create the group criteria for the top20 groups
TOP20AVIATION_GROUP_CRITERIA = TOP20_CRITERIA.merge({
:nsid => TOP20AVIATION_ID,
})
TOP20FISHEYE_GROUP_CRITERIA = TOP20_CRITERIA.merge({
:nsid => TOP20FISHEYE_ID,
})
TOP20LONGEXPOSURE_GROUP_CRITERIA = TOP20_CRITERIA.merge({
:nsid => TOP20LONGEXPOSURE_ID,
})
# finally lets specify which groups we want.
config[:GROUPS] = [
TOP20AVIATION_GROUP_CRITERIA,
TOP20FISHEYE_GROUP_CRITERIA,
TOP20LONGEXPOSURE_GROUP_CRITERIA
]
Note, you can "force" an update to test the config file by simply running flickrfetchr.rb as root:
sudo flickrfetchr.rb --verbose
You should see something like:
linuxmce@dcerouter:/home/flickr$ sudo flickrfetchr.rb --verbose
[sudo] password for linuxmce:
INFO flickrfetchr: Loading /etc/flickrfetchr.conf
INFO flickrfetchr: Loading /home/linuxmce/.flickrfetchr.conf
INFO flickrfetchr: Loading LinuxMCE_Plugin (require "flickrfetchr-linuxmce.rb")
INFO flickrfetchr: Downloading photos from GROUPS ({:destination_naming=>:short, :image_width_range=>600..1920, :image_acceptable_types=>["jpg"], :limit=>20, :destination_path=>"/home/flickr/aircraft", :nsid=>"79204191@N00", :image_height_range=>600..1080, :image_resize_to=>{:width=>1920, :height=>1080}, :plugins=>[:LinuxMCE_Plugin], :image_fill_to=>{:width=>1920, :height=>1080}, :daycount=>5})
INFO flickrfetchr: downloading http://farm4.static.flickr.com/3220/3144058266_2e6c2f4cc8_o.jpg to /home/flickr/aircraft/3144058266.jpg
INFO flickrfetchr: downloading http://farm4.static.flickr.com/3127/3145331668_6c0860f186_o.jpg to /home/flickr/aircraft/3145331668.jpg
INFO flickrfetchr: Skipping 2642314900 => [/home/flickr/top20/2642314900.jpg.tnj]
...
INFO flickrfetchr: Cleanup LinuxMCE flickr images
INFO flickrfetchr: Limiting to 200 flickr images
INFO flickrfetchr: Cleanup completed
HTH,
Roy