Difference between revisions of "Flickr"

From LinuxMCE
Jump to: navigation, search
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category: Tutorials]]
+
[[Category: media]]
  
Note-  The CAPTCHA currently isn't working- so I added a space after all of the "http://" that needs to be deleted to run the command, but allowed this to be posted...
 
  
Instructions for using your Flikr account to populate the photos used in LMCE 710's screensaver.  I ran the following from a terminal on the Core.
+
Note-  This appears to ONLY pull public pictures from your username (other configurations available) but it looks like private photos will not be added to your screensaver.
 +
 
 +
Instructions for using your Flikr account to populate the photos used in LMCE 710's screensaver.  I ran the following from a terminal on the Core.
  
 
First, upgrade gem:
 
First, upgrade gem:
 
  sudo apt-get install rubygems
 
  sudo apt-get install rubygems
  wget http:// rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
+
  wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
 
  tar xvzf rubygems-1.3.1.tgz
 
  tar xvzf rubygems-1.3.1.tgz
 
  cd rubygems-1.3.1
 
  cd rubygems-1.3.1
Line 18: Line 19:
  
 
Grab flickrfetchr and install
 
Grab flickrfetchr and install
  sudo wget http:// rubyforge.org/frs/download.php/40044/flickrfetchr-0.1.0.tgz
+
  sudo wget http://rubyforge.org/frs/download.php/40044/flickrfetchr-0.1.0.tgz
 
  tar xvf flickrfetchr-0.1.0.tgz
 
  tar xvf flickrfetchr-0.1.0.tgz
 
  cd flickrfetchr
 
  cd flickrfetchr
Line 41: Line 42:
 
  return to the console, and press "Enter" as specified.
 
  return to the console, and press "Enter" as specified.
  
Edit flickrfetchr's configuration file:
+
Edit flickrfetchr's configuration files:
 
  pico /etc/flickrfetchr.conf
 
  pico /etc/flickrfetchr.conf
 
   
 
   
Line 52: Line 53:
 
                     :plugins => [:LinuxMCE_Plugin],
 
                     :plugins => [:LinuxMCE_Plugin],
 
                     :image_acceptable_types => ['jpg'],
 
                     :image_acceptable_types => ['jpg'],
                    :image_width_range => 600..1920,
 
                    :image_height_range => 600..1080,
 
 
                     :image_resize_to => {:width => 1024, :height => 768}
 
                     :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
+
  MUFFIN_CRITERIA = LINUXMCE_1024_X_768_CRITERIA.merge({
TOP20_CRITERIA = LINUXMCE_1024_X_768_CRITERIA.merge({
+
                     :username => ''''Username'''',  
                     :destination_path => '/home/flickr/top20',
+
                     :destination_path => '/home/flickr/muffin'
                     :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({
+
  config[:USERS] += [MUFFIN_CRITERIA]
                    :nsid => TOP20LONGEXPOSURE_ID,
+
 
                  })
+
'''Note:''' replace Username with your flickr account name- don't include the @...
   
+
 
  # finally lets specify which groups we want.
+
Save and close the *.conf file; then do the same copy/paste for the following files:
  config[:GROUPS] = [
+
sudo pico /root/.flickrfetchr.conf
        TOP20AVIATION_GROUP_CRITERIA,
+
  sudo pico /home/linuxmce/.flickrfetchr.conf
        TOP20FISHEYE_GROUP_CRITERIA,
+
 
        TOP20LONGEXPOSURE_GROUP_CRITERIA
+
After saving and closing those,
  ]
+
  sudo flickrfetchr.rb --verbose
 +
 
 +
 
 +
I wrote this as I was trying to get mine working... will update with progress.
 +
 
 +
 
 +
* Giving credit where credit is due- All of this was ctrl+c -> ctrl+v from Roy and the LMCE team on the LMCE forums.
 +
 
 +
 
 +
*** Testing with 810 during the ./setup-linuxmce i encountered this error (the install kept going) not sure if it will affect the program or not.
 +
 
 +
then upgrade gem to the the lastest version
 +
Updating installed gems                   
 +
Nothing to update                         
 +
Updating RubyGems                         
 +
Updating rubygems-update
 +
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
 +
    timed out gems.rubyforge.org/gems/rubygems-update-1.3.4.gem
  
  
* Giving credit where credit is due-  All of this was ctrl+c -> ctrl+v from the LMCE forums.
+
*** Also just noticed that when the program tries to install itself into /usr/local/bin it tries to chown as 'linuxmce' which was the standard user for the 710 DVD install, with 810 you get to choose a username so this might not work for everyone.

Latest revision as of 23:40, 19 October 2012


Note- This appears to ONLY pull public pictures from your username (other configurations available) but it looks like private photos will not be added to your screensaver.

Instructions for using your Flikr account to populate the photos used in LMCE 710's screensaver. I ran the following from a terminal on the Core.

First, upgrade gem:

sudo apt-get install rubygems
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xvzf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
sudo rm /usr/bin/gem
sudo ln /usr/bin/gem1.8 /usr/bin/gem

Then install commandline

sudo gem install commandline

Grab flickrfetchr and install

sudo wget http://rubyforge.org/frs/download.php/40044/flickrfetchr-0.1.0.tgz
tar xvf flickrfetchr-0.1.0.tgz
cd flickrfetchr
sudo ./setup-linuxmce

Replacing Flickr.pl with FlickrFetchr.rb

From pluto-admin, Advanced, Configuration, Devices, Show Device Tree, My Devices, CORE, DCERouter, Orbiter Plug-in:

change File Name and Path from:
   
   /usr/pluto/bin/flickr.pl
   
 to:
 
   /usr/local/bin/flickrfetchr.rb

Run flickrfetchr

flickrfetchr.rb

This will prompt you to visit a site- I don't know if it is user specific, so I won't post mine here.  But the website asks you to sign into your flickr account and then authorize flickrfetchr to access your account.

return to the console, and press "Enter" as specified.

Edit flickrfetchr's configuration files:

pico /etc/flickrfetchr.conf

I scrolled to the bottom of the page and pasted this code:

LINUXMCE_1024_X_768_CRITERIA = {
                   :limit => 100,
                   :daycount => 5,
                   :destination_path => '/home/flickr',
                   :destination_naming => :short,
                   :plugins => [:LinuxMCE_Plugin],
                   :image_acceptable_types => ['jpg'],
                   :image_resize_to => {:width => 1024, :height => 768}
                 }

MUFFIN_CRITERIA = LINUXMCE_1024_X_768_CRITERIA.merge({
                   :username => 'Username', 
                   :destination_path => '/home/flickr/muffin'
                 })

config[:USERS] += [MUFFIN_CRITERIA]

Note: replace Username with your flickr account name- don't include the @...

Save and close the *.conf file; then do the same copy/paste for the following files:

sudo pico /root/.flickrfetchr.conf
sudo pico /home/linuxmce/.flickrfetchr.conf 

After saving and closing those,

sudo flickrfetchr.rb --verbose


I wrote this as I was trying to get mine working... will update with progress.


  • Giving credit where credit is due- All of this was ctrl+c -> ctrl+v from Roy and the LMCE team on the LMCE forums.


      • Testing with 810 during the ./setup-linuxmce i encountered this error (the install kept going) not sure if it will affect the program or not.

then upgrade gem to the the lastest version Updating installed gems Nothing to update Updating RubyGems Updating rubygems-update ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)

   timed out gems.rubyforge.org/gems/rubygems-update-1.3.4.gem


      • Also just noticed that when the program tries to install itself into /usr/local/bin it tries to chown as 'linuxmce' which was the standard user for the 710 DVD install, with 810 you get to choose a username so this might not work for everyone.