Dear all,
This question is about manipulation of the database "photo.db" of the
program Shotwell.
For some reason I have lost my rating on many pictures 10 000 range. It was
probably a mistake of mine. I have an old backup of the database that I will
call "oldPhoto.db". Since I have lost my rating I did a lot of new rating,
importation, and many open and closing of shotwell, so I cannot just use the
"photo.db.bak". I don't want to replace "Photo.db" by "oldPhoto.db" and lose
the new work.
I realized that the database is a SQL (I don't know it, but I know how
powerful it is). For a knowledgeable person I think it is a 15 liner problem or
such. What I want to do is in pseudo code bwlow.
#-------------------------------------------------------------------------------------
foreach [id in photo.db-PhotoTable]{
x= the rating associate with id
if [ x==0 ]{
y= the rating of oldPhoto.db-PhotoTable-same id as above
if [ y > x ]{
x=y
write the new x in photo.db rating of corresponding id
}
}
}
save photo.db
#-----------------------------------------------------------------------------------------
Best regards,
_______________________________________________
Shotwell mailing list
[email protected]
http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell