Re: Desktop background image extension?



It's been a while, but the script I used is below. Just run it with
the tag id number, e.g. ./fspot-tag-export 47. You can find the tag id
by dumping the tags table. I meant to rewrite this so I could use the
tag name rather than id, but never got a round tuit.

#!/bin/bash
database="$HOME/.gnome2/f-spot/photos.db"
wallpaperdir="$HOME/.wallpapers/ourpics"
tag=$1
sqlite3 "$database" 'select photos.directory_path, photos.name from
photos, photo_tags where photo_tags.tag_id = '$tag' and
photo_tags.photo_id = photos.id;' | sed s/"|"/"\/"/g >> photolist.$$
while read line
do
picname=`basename "$line"`
echo "$picname : $line"
if [ ! -h $wallpaperdir/$picname ] ; then
       ln -s $line $wallpaperdir/
else
       echo "symlink already exists"
fi
done < photolist.$$
rm photolist.$$


On Feb 10, 2008 6:39 PM, David Barrett <dbarrett quinthar com> wrote:
> Great idea, can you share that script?
>
> Alternatively, perhaps I could just hack Desktop Drapes to have a "Use
> F-Spot Favorites" function...
>
> Either way, thanks for the recommendation!
>
> -david
>
>
> Todd Slater wrote:
> > My solution for this was to tag images in F-spot, then run a script to
> > create symlinks to images with the relevant tag, and use Desktop
> > Drapes to manage the actual wallpaper switching thang.
> >
> > Todd
> >
> > On Feb 8, 2008 2:33 AM, David Barrett <dbarrett quinthar com> wrote:
> >> Hi, I'm making the switch from Mac to Ubuntu and one of the few features
> >> I miss is the ability to automatically set my desktop background image
> >> to a random picture from my iPhoto library.  Does something like this
> >> already exist for F-Spot, or how would you recommend I go ahead and
> >> build it?
> >>
> >> I see you use SQLite under the hood; would the easiest/recommended way
> >> be to just create a Cron script that:
> >>
> >> 1) Opens that database
> >> 2) Picks a random "favorite" image
> >> 3) Updates the desktop background
> >> 4) Exits
> >>
> >> Or, is this something better done as an extension?
> >>
> >> Thanks for the great tool, and I'm curious how I can help!
> >>
> >> -david
> >
> >
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]