{"id":519,"date":"2010-01-01T15:04:41","date_gmt":"2010-01-01T22:04:41","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=519"},"modified":"2010-01-01T15:09:00","modified_gmt":"2010-01-01T22:09:00","slug":"f-spot-and-sqlite","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/f-spot-and-sqlite\/","title":{"rendered":"f-spot and sqlite"},"content":{"rendered":"<p>I recently tried using Linux [f-spot](http:\/\/f-spot.org\/), with the intent to make it easier to browse, manipulate, manage and publish my photos. I wanted f-spot to manage my photo screen saver as well. f-spot seems to be good at importing photos, but getting photos removed is a bit more difficult.<\/p>\n<p>I organize my photos by date an a directory structure such as &#8220;2010\/2010.01.01 New Years Day&#8221;. The &#8220;2010&#8221; directory contains several sub directories. Each sub directory consists of a date and a description. If, for some reason, I import photos into f-spot that I don&#8217;t want in its database, I know what directory the photos pertain to. Unfortunately, F-spot doesn&#8217;t allow me to remove photos from its catalog by filename or file path. That&#8217;s okay though, because it stores its database using sqlite.<\/p>\n<p>I figured this out by running <tt>lsof -p pid-of-f-spot<\/tt>, and noticed a file descriptor opened to &#8220;\/home\/jared\/.config\/f-spot\/photos.db&#8221;. Then I ran <tt>file ~\/.config\/f-spot\/photos.db<\/tt> and it helpfully told me that it is a &#8220;[SQLite](http:\/\/www.sqlite.org\/) 3.x database&#8221;.<\/p>\n<p>After a bit of google research, I figured out I could install a SQLite manager on my Fedora system: <tt>yum install -y sqliteman<\/tt>, followed by running <tt>sqliteman ~\/.config\/f-spot\/photos.db<\/tt>. I was expecting to see a command-line client, but to my surprise, I found a pleasant graphical interface. It was simple to browse the table schema and to run queries to update and morph the f-spot photo database. Note: I&#8217;d recommend making a backup copy of the database before altering it.<\/p>\n<p>F-spot may not be everything I want it to be, but I managed to work past its limitations due to the fact that it used a well known, open data storage format.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently tried using Linux [f-spot](http:\/\/f-spot.org\/), with the intent to make it easier to browse, manipulate, manage and publish my photos. I wanted f-spot to manage my photo screen saver as well. f-spot seems to be good at importing photos, but getting photos removed is a bit more difficult. I organize my photos by date &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/f-spot-and-sqlite\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;f-spot and sqlite&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9,12,17],"tags":[],"class_list":["post-519","post","type-post","status-publish","format-standard","hentry","category-fedora","category-linux","category-programming","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=519"}],"version-history":[{"count":17,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/519\/revisions"}],"predecessor-version":[{"id":535,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/519\/revisions\/535"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}