Module bookmarks
Simple sqlite3 bookmarks
This module provides a Lua API for accessing and modifying bookmarks,
but does not provide a user interface. In order to add/remove bookmarks and
view all bookmarks in a single page, you'll need the bookmarks_chrome
module.
Functions
bookmarks.init ()
Connect to and initialize the bookmarks database.
bookmarks.get (id)
Get a bookmark entry by its ID number.
Parameters
-
idType: numberThe ID of the bookmark entry to get.
Return Values
-
tableThe bookmark entry.
bookmarks.remove (id)
Remove a bookmark entry by its ID number.
Parameters
-
idType: numberThe ID of the bookmark entry to remove.
bookmarks.tag (id, new_tags, replace)
Update the tags on a bookmark entry.
Parameters
-
idType: numberThe ID of the bookmark entry to update.
-
new_tagsType: table or stringThe tags to add to the bookmark entry.
-
replaceType: boolean
true
if the new tags should replace all existing tags.
bookmarks.untag (id, name)
Remove a tag from a bookmark entry.
Parameters
-
idType: numberThe ID of the bookmark entry to update.
-
nameType: stringThe tag to remove from the bookmark entry.
bookmarks.add (uri, opts)
Add a new bookmark entry.
Parameters
-
uriType: stringThe URI to bookmark.
-
optsType: tableA table of options.
Return Values
-
numberThe ID of the new bookmark entry.
Properties
bookmarks.db_path
Type: any type
Read-write
Path to bookmarks database.
Attribution
Copyright
- 2012 Mason Larobina