Categories: Picasa for Windows :

How to sync your starred pictures to your iphone or ipod or ipad

Showing 1-2 of 2 messages
How to sync your starred pictures to your iphone or ipod or ipad koenhandekyn 1/2/11 5:07 AM
it's not a question but my personal answer. i wrote some ruby code (below) that creates a virtual folder structure (using symlinks) that replicates your picture folders but only includes the starred pictures. copy the below code in a file called create.rb, patch it accordingly and than you can sync the created 'starred' folder using itunes. If you've changed some starres, just delete the whole subdirectory and rerun create.rb. it runs only a couple of seconds over multiple thousands of pictures.

have fun

koen


require 'fileutils'

file = File.new('C:\Users\Koen\AppData\Local\Google\Picasa2\db3\starlist.txt', 'r')
counter = 0
lastdir = ""
while (line = file.gets)

        ## puts line unless line.include? "2010-10"

        ## puts "#{counter}: #{line}"
        elements = line.split('\\')

        ## puts elements[-2]
        next unless elements[-2].include? "2010"

        subdir = "starred\\#{elements[-2]}"
        if ( lastdir === subdir )
                # do nothing
        else
                lastdir = subdir
                puts subdir
                FileUtils.mkpath(subdir)
        end        
        
        target = "starred\\#{elements[-2]}\\#{elements[-1].chomp}"
        instruction = "cmd.exe /c mklink /H \"#{target}\" \"#{line.chomp}\""        
        # puts instruction
        system instruction        
        puts $?

        counter = counter + 1
        end
puts counter
file.close
Re: How to sync your starred pictures to your iphone or ipod or ipad koenhandekyn 1/2/11 5:09 AM
cleaned up version

require 'fileutils'

# patch here
file = File.new('C:\Users\Koen\AppData\Local\Google\Picasa2\db3\starlist.txt', 'r')
lastdir = ""
while (line = file.gets)

        elements = line.split('\\')
        ## next unless elements[-2].include? "2010"

        subdir = "starred\\#{elements[-2]}"
        if ( lastdir === subdir )
                # do nothing
        else
                lastdir = subdir
                puts subdir
                FileUtils.mkpath(subdir)
        end        
        
        target = "starred\\#{elements[-2]}\\#{elements[-1].chomp}"
        instruction = "cmd.exe /c mklink /H \"#{target}\" \"#{line.chomp}\""        
        system instruction        

        end
file.close