PHPackages                             narcoticfresh/shotwell - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. narcoticfresh/shotwell

ActiveLibrary[Database &amp; ORM](/categories/database)

narcoticfresh/shotwell
======================

A PHP library providing a simple API to a Shotwell (the default Ubuntu image manager) sqlite database.

v0.9.0(9y ago)022GPL-3.0PHPPHP &gt;=5.6

Since Jun 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/narcoticfresh/shotwell)[ Packagist](https://packagist.org/packages/narcoticfresh/shotwell)[ RSS](/packages/narcoticfresh-shotwell/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

shotwell - a PHP library for Shotwell databases
===============================================

[](#shotwell---a-php-library-for-shotwell-databases)

[![PHP version](https://camo.githubusercontent.com/a9c83ef76804aa8f216dee90c13c6d13cff4e139da6e2342e83d8bb0826d381f/68747470733a2f2f62616467652e667572792e696f2f70682f6e6172636f746963667265736825324673686f7477656c6c2e737667)](https://badge.fury.io/ph/narcoticfresh%2Fshotwell) [![Build Status](https://camo.githubusercontent.com/7c010633350be2018cffd3dcc34616d29292cb6f0441592f6bfcd37f8d99f2fd/68747470733a2f2f7472617669732d63692e6f72672f6e6172636f74696366726573682f73686f7477656c6c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/narcoticfresh/shotwell) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/5187d991b4ce24e1c0482ec00e446d5777c0c23619fc1c44667a25aec21db861/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e6172636f74696366726573682f73686f7477656c6c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/narcoticfresh/shotwell/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/dca8ec3a1136b074d88c6ce36bea4c59b4521f2674916cf1856f6d950057d4cc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e6172636f74696366726573682f73686f7477656c6c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/narcoticfresh/shotwell/?branch=master)

This is a simple PHP library for dealing with Shotwell (the default photo manager in Ubuntu) sqlite databases.

Basic stuff
-----------

[](#basic-stuff)

### Why does it exist?

[](#why-does-it-exist)

I'm using Shotwell for my pictures and videos (having a huge collection) and I think it's superb!

I found myself in need to use the data stored in the Shotwell database (that btw usually resides in *~/.local/share/shotwell/data/photo.db*) to script some stuff (like tagging video files with the tags I've given in Shotwell - a thing that it doesn't seem to be able to do).

Being initially pleased that all the data I accumulated is an an re-usable format (a SQLite database), I quickly became puzzled with the structure of that said database. The storage of the different media types (video/photo) and the relations are rather unusual.

To make matters simpler, this small library was created.

### Is it fully featured?

[](#is-it-fully-featured)

No. It's a simple thing that hides some Shotwell internal complexity and then gives back plain arrays of the database content.

I didn't need more - I thought about creating custom Models to represent the data structures, but it doesn't make any sense. Also, only the functions I needed (mostly in regard to basic manipulations and tagging) are implemented.

### Why is it here?

[](#why-is-it-here)

It's only here because I needed the library on more than one of my private projects. To make that dependency stuff easier, it had to go on Packagist so it had to go somewhere. So that somewhere is here.

Installation
------------

[](#installation)

Just use composer, see the [Packagist page](https://packagist.org/packages/narcoticfresh/shotwell).

Require it like this:

```
composer require narcoticfresh/shotwell

```

Usage example
-------------

[](#usage-example)

```
