bkmktool: Handing Bookmarks from the Command Line

bkmktool provides command line access to the Grail bookmarks handlers, as well as a few additional interesting operations on bookmark data. It can be used to create subset bookmark files based on search terms while maintaining the hierarchical structure, and it can strip out information that reveals personal browsing habits.

Usage

bkmktool [options] [infile [output]]
bkmktool -g|--guess-type [files...]

Options

-h
--help
Display this help message.

-g
--guess-type
Guess type of one or more bookmark files.

-f
--format
Specify bookmark output format (html or xbel); the default is html.

-x
Strip all personal information fields from output.

--export fields
Strip specified personal fields from the output; fields is a comma-separated list of fields. The field names are added, modified and visited. This option may be used more than once.

--scrape
Attempt to parse the input file as HTML and extract links into a new bookmark file (preliminary). The input may be a URL instead of a file name.

--search keywords
Search the input for bookmarks and folders which match any of the comma-separated keywords. Search is case-insensitive. The entire hierarchical structure above the match node is returned. If there are no matches, an error is printed to standard error and bkmktool exits with a non-zero return code. This option may be used more than once.

Output Formats

bkmktool supports output in either HTML or XBEL. The HTML format used is compatible with Netscape Navigator's bookmark format. XBEL, the XML Bookmark Exchange Language, is a new format designed by the Python XML Special Interest Group.