FSpot::DbTool - An interface to the F-Spot database
use FSpot::DbTool; my $fsdb = FSpot::DbTool->new( 'db_file' => '~/.config/f-spot/photos.db' );
Parameters:
db_file Override the default location for the database file ignore_db_version Normally this module is designed to work with a specific version of the FSpot database. If your version is different but you are sure you want to continue anyway, set this parameter.
Object constructor.
Loads a tool (Moose::Role) which brings special database manipulation methods with it
Compacts the database with the VACUUM command
Usage:
$fs->compact_db();
Backs up the database. If target is defined, it will write to there, otherwise like this:
Original:
~/.config/f-spot/photos.db
Backup:
~/.config/f-spot/photos.db.bak.0
$fs->backup_db();
Returns (an array of) rows (all columns) of matching entries
$fs->search( table => $table, search => [ [ 'filename', 'LIKE', '%123%' ], [ .... ] ] );
Update a photo in the database
Usage: $details = { 'filename' => $newname, 'base_uri' => $new_base_uri }; $fs->update_photo_version( photo_id => $id, details => $details );
Update a version of a photo in the database
Usage: $details = { 'filename' => $newname, 'base_uri' => $new_base_uri }; $fs->update_photo_version( photo_id => $id, version_id => $version_id, details => $details );
Add a tag. Parent name is optional. If not defined, the tag will be attached to the root.
$fs->add_tag( name => $name, parent_name => $parent_name );
Tag a photo
$fs->tag_photo( photo_id => $photo_id, tag_id => $tag_id );
Remove all of these tag links
$fs->untag_all( tag_id => $tag_id );
Test if the column exists for this table Returns 1 if it does, undef if not
$fs->column_exists( table => $table, column => $column );
Returns 1 if the table/column exists, dies if it doesn't
$fs->column_must_exist( table => $table, column => $column );
Robin Clarke perl@robinclarke.net
perl@robinclarke.net
You can find documentation for this module with the perldoc command.
perldoc FSpot::DbTool
You can also look for information at:
Repository on Github
https://github.com/robin13/FSpot--DbTool
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Demo
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Git-Demo
CPAN Ratings
http://cpanratings.perl.org/d/Git-Demo
Search CPAN
http://search.cpan.org/dist/Git-Demo/
http://f-spot.org/
Copyright 2010 Robin Clarke.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install FSpot::DbTool, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FSpot::DbTool
CPAN shell
perl -MCPAN -e shell install FSpot::DbTool
For more information on module installation, please visit the detailed CPAN module installation guide.