-
-
Notifications
You must be signed in to change notification settings - Fork 297
System integration
- Bookmark from anywhere
- Auto-import browser bookmarks
- Export bookmarks to browser
- Sync database across systems
buku
can be integrated in a GUI environment with simple tweaks.
With support for piped input, it's possible to add bookmarks to buku
using keyboard shortcuts on Linux and OS X. CLIPBOARD (plus PRIMARY on Linux) text selections can be added directly this way. The additional utility required is xsel
(on Linux) or pbpaste
(on OS X).
The following steps explore the procedure on Linux with Ubuntu as the reference platform.
-
To install
xsel
on Ubuntu, run:$ sudo apt install xsel
-
Create a new script
bukuadd
with the following content:#!/bin/bash xsel | buku -a
-a
is the option to add a bookmark. -
Make the script executable:
$ chmod +x bukuadd
-
Copy it somewhere in your
PATH
. -
Add a new keyboard shortcut to run the script. I use
<Alt-b>
.
Copy or select a URL with mouse and press the keyboard shortcut to add it to the buku
database. The addition might take a few seconds to reflect depending on your internet speed and the time buku
needs to fetch the title from the URL. To avoid title fetch from the web, add the --title
option to the script.
To verify that the bookmark has indeed been added, run:
$ buku -p -1
and check the entry.
-
To add the last visited URL in Firefox to
buku
, use the following script:#!/bin/bash sqlite3 $HOME/.mozilla/firefox/*.default/places.sqlite "select url from moz_places where last_visit_date=(select max(last_visit_date) from moz_places)" | buku -a
-
If you want to tag these bookmarks, look them up later using:
$ buku -S blank
Use option
-u
to tag these bookmarks.
To automatically import bookmarks from Firefox and Google Chrome, run:
$ buku --ai
Alternatively, buku
can also import html bookmark exports from Firefox and Google Chrome.
buku
can export bookmarks in HTML format recognized by Firefox, Google Chrome and Internet Explorer.
To export all bookmarks, run:
$ buku --export path_to_bookmarks.html
To export specific tags, run:
$ buku --export path_to_bookmarks.html --tag tag 1, tag 2
Once exported, import the html file in your browser.
buku
has the capability to import records from another buku
database file. However, users with a cloud service client installed on multiple systems can keep the database synced across these systems automatically. To achieve this store the actual database file in a synced directory and create a symbolic link to it in the location where the database file would exist otherwise. For example, $HOME/.local/share/buku/bookmarks.db
can be a symbolic link to ~/synced_dir/bookmarks.db
.