Skip to content
Export browser bookmarks as plain text.
Perl
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/App
script
t
xt
.gitignore
Changes
LICENSE
MANIFEST
Makefile.PL
README.md
tty.gif
tty.png

README.md

bookmarks - Export browser bookmarks as plain text.

SYNOPSIS

$ bookmarks [-hVda] [-f format] [file ...]

-h, --help      help
-V, --version   version
-d              debug
-a              all files : process arguments and default locations
-f format       any combination of letters t,u,d as title/url/description (default : tud)

DESCRIPTION

bookmarks is a tool to export bookmarks from files supplied as arguments, or from browsers default locations (without arguments). The following browsers and platform are supported : Safari (Mac), Firefox (Mac/Linux/Windows) and Internet Explorer (Windows). Files with .plist and .sqlite extensions are processed as Safari and Firefox bookmarks, respectively, and directories named "Favorites" are processed as Internet Explorer favorites.

The fields <title>, <url> and <description> are retrieved (when existing) and are available for exporting (in the desired format), by default : <title> <url> <description>

The <description> field is filled with Safari's Description, Firefox's Tags or empty for Internet Explorer.

SEARCH BOOKMARKS INTERACTIVELY FROM CLI

This tool can be used to search and open bookmarks interactively from the CLI. The following instructions are for macOS, but it should be similar on any regular OS.

Install the wonderful fzf (available in Homebrew), URI::Find (CPAN), App::uricolor (CPAN), and add these aliases to your shell :

Open links(s) with default application :

alias lk="safari-bookmarks.pl | uricolor | fzf --ansi --exact --multi | urifind | xargs open"

Copy links(s) to clipboard :

alias lkc="safari-bookmarks.pl | uricolor | fzf --ansi --exact --multi | urifind | pbcopy"
  • uricolor colorizes URIs to distinguish them from title and description.
  • fzf is a fuzzy finder (with many options) : use TAB for multiple selection, press ENTER to confirm, or ESC to cancel.
  • urifind extracts all URIs. Try uricolor -s and urifind --schemeless to find schemeless URLs.
  • Selected URIs will open with your default browser or application.
  • Since open uses macOS Launch Services to determine which program to run, most common schemes such as ftp:// or ssh:// are automatically recognized.

INSTALLATION

To install this module automatically from CPAN :

cpan App::bookmarks

To install this module automatically from Git repository :

cpanm https://github.com/kal247/App-bookmarks.git

To install this module manually, run the following commands :

perl Makefile.PL
make     
make test
make install

PREREQUISITES

DBI, Config::Any, Config::Tiny (optional, for IE only), Win32 (optional)

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the perldoc command :

perldoc bookmarks

You can also look for information at :

LICENSE AND COPYRIGHT

This software is Copyright (c) 2019 by jul.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)
You can’t perform that action at this time.