Buku in action!
buku
is a powerful bookmark manager written in Python3 and SQLite3. When I started writing it, I couldn't find a flexible command-line solution with a private, portable, merge-able database along with seamless GUI integration. Hence, Buku
(after my son's nickname, meaning close to the heart in my language).
bukuserver exposes a browsable front-end on a local web host server.
buku
can auto-import bookmarks from your browser(s) or fetch the title and description of a bookmarked url from the web. You can use your favourite editor to compose and update bookmarks. With multiple search options, including regex and a deep scan mode (particularly for URLs), it can find any bookmark instantly. buku
can look up the latest snapshot of a broken link on the Wayback Machine. There's an Easter egg to revisit random forgotten bookmarks too! Buku is too busy to track you: no hidden history, obsolete records, usage analytics or homing.
To get started right away, jump to the Quickstart section. We have one of the best documentation around. You'll find handy examples in the man page too. For more details, please refer to the wiki page on operational notes.
There are several projects based on buku
, including a browser plug-in.
Love smart and efficient utilities? Explore my repositories. Buy me a cup of coffee if they help you.
Feature | Dependency |
---|---|
Scripting language | Python 3.5+ |
HTTPS | certifi, urllib3 |
Encryption | cryptography |
HTML | beautifulsoup4, html5lib |
To install package dependencies using pip3, run:
or on Ubuntu:
To copy url to clipboard at the prompt Buku
uses xsel
(or xclip
) on Linux, pbcopy
(default installed) on OS X, clip
(default installed) on Windows, termux-clipboard
on Termux (terminal emulation for Android). If X11 is missing, GNU Screen or tmux copy-paste buffers are recognized.
apk add buku
)yay -S buku
)apt-get install buku
)dnf install buku
)pkg install www/py-buku
)emerge buku
)brew install buku
)port install buku
)nix-env -i buku
)pkg_add buku
)zypper in python3-buku
)pip3 install buku
)apt-get install buku
)slackpkg install buku
)pip3 install buku
)apt-get install buku
)xbps-install -S buku
)Auto-generated packages (with only the cli component) for Arch Linux, CentOS, Debian, Fedora, openSUSE Leap and Ubuntu are available with the latest stable release.
NOTE: CentOS may not have the python3-beautifulsoup4 package in the repos. Install it using pip3.
If you have git installed, clone this repository. Otherwise download the latest stable release or development version (risky).
Install the cli component to default location (/usr/local
):
To remove, run:
PREFIX
is supported, in case you want to install to a different location.
buku
is a standalone utility. From the containing directory, run:
Shell completion scripts for Bash, Fish and Zsh can be found in respective subdirectories of auto-completion/. Please refer to your shell's manual for installation instructions.
buku
supports custom colors. Visit the wiki page on how to customize colors for more details.
Export VISUAL
or EDITOR
to point to your favourite editor. Note that VISUAL
takes precedence over EDITOR
.
Create a sweeter shortcut with some convenience.
Auto-import bookmarks from your browser(s). Please quit the relevant browsers beforehand to ensure the databases are not locked.
Manually add a bookmark (for hands-on).
List your bookmarks with DB index.
For GUI and browser integration (or to sync bookmarks with your favourite bookmark management service) refer to the wiki page on System integration.
Edit and add a bookmark from editor:
The first command picks editor from the environment variable EDITOR
. The second command opens gedit in blocking mode. The third command opens macvim with option -f and the URL and tags populated in template.
Add a bookmark with tagssearch engine
and privacy
, commentSearch engine with perks
, fetch page title from the web:
where, >: url, +: comment, #: tags
Add a bookmark with tags search engine
& privacy
and immutable custom titleDDG
:
Note that URL must precede tags.
Add a bookmark without a title (works for update too):
Edit and update a bookmark from editor:
This will open the existing bookmark's details in the editor for modifications. Environment variable EDITOR
must be set.
Update existing bookmark at index 15012014 with new URL, tags and comments, fetch title from the web:
Fetch and update only title for bookmark at 15012014:
Watch Fairy Tail Episode 235 English Subbed & Dubbed Online at fairytailepisodes.org. Lucy Heartfilia,a 17-year old girl,wishes to become a full-fledged mage and join one of the most prestigious Mage Guilds in the world,Fairy Tail. Set in an imaginary world,the Earth Land,there exists a Mage Guild called “Fairy Tail”. Fairy Tail is stationed in the town Magnolia,residing in the Kingdom of Fiore,and is currently governed by Makarov,Guild’s master.
Update only comment for bookmark at 15012014:
Applies to --url, --title and --tag too.
Export bookmarks tagged tag 1
or tag 2
to HTML, Markdown, Orgfile or a new database:
All bookmarks are exported if search is not opted.
Import bookmarks from HTML, Markdown or Orgfile:
Delete only comment for bookmark at 15012014:
Applies to --title and --tag too. URL cannot be deleted without deleting the bookmark.
Update or refresh full DB with page titles from the web:
This operation can update the title or description fields of non-immutable bookmarks by parsing the fetched page. Fields are updated only if the fetched fields are non-empty. Tags remain untouched.
Delete bookmark at index 15012014:
The last index is moved to the deleted index to keep the DB compact.
Delete all bookmarks:
Delete a range or list of bookmarks:
Search bookmarks for ANY of the keywords kernel
and debugging
in URL, title or tags:
Search bookmarks with ALL the keywords kernel
and debugging
in URL, title or tags:
Search bookmarks taggedgeneral kernel concepts
:
Search for bookmarks matching ANY of the tags kernel
, debugging
, general kernel concepts
:
Search for bookmarks matching ALL of the tags kernel
, debugging
, general kernel concepts
:
Search for bookmarks matching any of the keywords hello
or world
, excluding the keywords real
and life
, matching both the tags kernel
and debugging
, but excluding the tags general kernel concepts
and books
:
List all unique tags alphabetically:
Run a search and update the results:
Run a search and delete the results:
Encrypt or decrypt DB with custom number of iterations (15) to generate key:
The same number of iterations must be specified for one lock & unlock instance. Default is 8, if omitted.
Show details of bookmarks at index 15012014 and ranges 20-30, 40-50:
Show details of the last 10 bookmarks:
Show all bookmarks with real index from database:
Replace tag 'old tag' with 'new tag':
Delete tag 'old tag' from DB:
Append (or delete) tags 'tag 1', 'tag 2' to (or from) existing tags of bookmark at index 15012014:
Open URL at index 15012014 in browser:
List bookmarks with no title or tags for bookkeeping:
List bookmarks with immutable title:
Shorten URLwww.google.com and the URL at index 20:
Append, remove tags at prompt (taglist index to the left, bookmark index to the right):
List bookmarks with colored output:
More help:
Interactive workflows can be automated using expect. Issue #368 has a working example on automating auto-import.
You may encounter issues with GUI editors which maintain only one instance by default and return immediately from other instances. Use the appropriate editor option to block the caller when a new document is opened. See issue #210 for gedit.
Copyright © 2015-2019 Arun Prakash Jana
Missing a feature? There's a rolling ToDo List with identified tasks. Contributions are welcome! Please follow the PR guidelines.