NAME
MendeleySQLite - A collection of tools for working with Mendeley Desktop's SQLite backend.
VERSION
version 0.002
new
Returns a new instance of the class.
my $rh = { 'dbfile' => 'path/to/db' };
my $M = MendeleySQLite->new( $rh );
get_all_keywords
Get all keywords associated with documents from your library. Returns a reference to a hash with the keywords and their frequency.
my $rh_keywords = $M->get_all_keywords();
get_all_tags
Get all tags associated with documents from your library. Returns a reference to a hash with the tags and their frequency.
my $rh_tags = $M->get_all_tags();
get_all_tags_for_document
Get all tags associated with a document in your library. Returns a reference to an array. This method returns undef on error.
my $ra_tags = $M->get_all_tags_for_document( $documentid );
get_all_keywords_for_document
Get all keywords associated with a document in your library. Returns a reference to an array. This method returns undef on error.
my $ra_keywords = $M->get_all_keywords_for_document( $documentid );
set_keyword_for_document
Associate the specified keyword with the supplied focument id. If the keyword already exists, nothing will be done. This function returns true on success and undef on error.
my $rv = $M->set_keyword_for_document(1,'Moo');
set_tag_for_document
Associate the specified tag with the supplied focument id. If the tag already exists, nothing will be done. This function returns true on success and undef on error.
my $rv = $M->set_tag_for_document(1,'MooMooMoo');
get_document()
Retrieves a document from your library matching the supplied document id. Returns a reference to a hash. The document tags and keywords are denormalized and the original values are supplied under the keys 'tags' and 'keywords' respectively.
This method returns undef on error.
my $rh_document = $M->get_document( $id );
get_all_document_ids()
Returns a reference to an array of document id's in the library.
my $ra_ids = $M->get_all_document_ids()
AUTHOR
Spiros Denaxas <s.denaxas@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Spiros Denaxas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.