2020-01-07 21:07:17 -06:00
< h1 align = "center" > buku< / h1 >
2015-11-10 01:15:35 -06:00
2016-04-23 00:46:27 -05:00
< p align = "center" >
2020-01-07 21:07:17 -06:00
< a href = "https://github.com/jarun/buku/releases/latest" > < img src = "https://img.shields.io/github/release/jarun/buku.svg?maxAge=600" alt = "Latest release" / > < / a >
2019-12-20 19:39:01 -06:00
< a href = "https://repology.org/project/buku/versions" > < img src = "https://repology.org/badge/tiny-repos/buku.svg" alt = "Availability" > < / a >
2019-12-20 19:40:16 -06:00
< a href = "https://pypi.org/project/buku/" > < img src = "https://img.shields.io/pypi/v/buku.svg?maxAge=600" alt = "PyPI" / > < / a >
2020-01-07 21:07:17 -06:00
< a href = "https://circleci.com/gh/jarun/workflows/buku" > < img src = "https://img.shields.io/circleci/project/github/jarun/buku.svg" alt = "Build Status" / > < / a >
2017-09-09 17:13:58 -05:00
< a href = "http://buku.readthedocs.io/en/latest/?badge=latest" > < img src = "https://readthedocs.org/projects/buku/badge/?version=latest" alt = "Docs Status" / > < / a >
2019-12-20 19:39:01 -06:00
< a href = "https://en.wikipedia.org/wiki/Privacy-invasive_software" > < img src = "https://img.shields.io/badge/privacy-✓-crimson" alt = "Privacy Awareness" / > < / a >
2020-06-14 01:20:20 -05:00
< a href = "https://github.com/jarun/buku/blob/master/LICENSE" > < img src = "https://img.shields.io/badge/license-GPLv3-yellowgreen.svg?maxAge=2592000" alt = "License" / > < / a >
2016-04-23 00:46:27 -05:00
< / p >
2016-04-22 16:11:16 -05:00
< p align = "center" >
2020-01-07 21:07:17 -06:00
< a href = "https://asciinema.org/a/137065" > < img src = "https://asciinema.org/a/137065.png" alt = "buku in action!" width = "734" / > < / a >
2016-04-22 16:11:16 -05:00
< / p >
2015-11-10 01:15:35 -06:00
2020-01-07 21:07:17 -06:00
< p align = "center" > < i > buku in action!< / i > < / p >
2017-09-10 13:31:47 -05:00
2017-03-29 02:07:43 -05:00
### Introduction
2017-03-12 23:31:35 -05:00
2020-01-07 21:07:17 -06:00
`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).
2017-03-12 23:31:35 -05:00
2020-01-07 21:07:17 -06:00
[bukuserver ](https://github.com/jarun/buku/tree/master/bukuserver ) exposes a browsable front-end on a local web host server.
2018-04-21 07:43:11 -05:00
2019-02-10 14:17:03 -06:00
`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.
2018-11-19 21:47:12 -06:00
2020-01-07 21:07:17 -06:00
To get started right away, jump to the [Quickstart ](#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 ](https://github.com/jarun/buku/wiki/Operational-notes ).
2017-03-12 23:31:35 -05:00
2018-07-09 23:19:05 -05:00
There are several [projects based on `buku` ](#related-projects ), including a browser plug-in.
2017-03-12 23:31:35 -05:00
2018-07-17 15:06:13 -05:00
*Love smart and efficient utilities? Explore [my repositories ](https://github.com/jarun?tab=repositories ). Buy me a cup of coffee if they help you.*
2017-12-09 00:46:32 -06:00
2017-05-07 02:42:25 -05:00
< p align = "center" >
2019-02-01 09:17:50 -06:00
< a href = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q" > < img src = "https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt = "Donate via PayPal!" / > < / a >
2017-03-12 23:31:35 -05:00
< / p >
2017-08-18 07:28:26 -05:00
### Table of Contents
- [Features ](#features )
- [Installation ](#installation )
- [Dependencies ](#dependencies )
- [From a package manager ](#from-a-package-manager )
- [Release packages ](#release-packages )
- [From source ](#from-source )
- [Running standalone ](#running-standalone )
- [Shell completion ](#shell-completion )
- [Usage ](#usage )
2019-01-10 21:13:20 -06:00
- [Command-line options ](#command-line-options )
2017-08-24 16:46:54 -05:00
- [Colors ](#colors )
2018-09-16 18:25:47 -05:00
- [Quickstart ](#quickstart )
2017-08-18 07:28:26 -05:00
- [Examples ](#examples )
2019-03-20 08:40:10 -05:00
- [Automation ](#automation )
2017-09-18 19:25:22 -05:00
- [Troubleshooting ](#troubleshooting )
- [Editor integration ](#editor-integration )
2017-08-18 07:28:26 -05:00
- [Collaborators ](#collaborators )
2018-07-09 23:19:05 -05:00
- [Contributions ](#contributions )
2017-08-18 07:28:26 -05:00
- [Related projects ](#related-projects )
- [In the Press ](#in-the-press )
2017-03-29 02:07:43 -05:00
### Features
2016-09-05 11:27:11 -05:00
2018-08-05 06:07:16 -05:00
- Store bookmarks with auto-fetched title, tags and description
2018-07-09 23:19:05 -05:00
- Auto-import from Firefox, Google Chrome and Chromium
- Open bookmarks and search results in browser
- Shorten, expand URLs, browse cached page from Wayback Machine
2017-08-14 23:36:29 -05:00
- Text editor integration
2018-07-09 23:19:05 -05:00
- Lightweight, clean interface, custom colors
- Powerful search options (regex, substring...)
2017-08-14 23:36:29 -05:00
- Continuous search with on the fly mode switch
2018-07-09 23:19:05 -05:00
- Portable, merge-able database to sync between systems
2018-05-10 20:16:47 -05:00
- Import/export bookmarks from/to HTML, Markdown or Orgfile
2017-08-13 04:03:06 -05:00
- Smart tag management using redirection (>>, >, << )
2018-07-09 23:19:05 -05:00
- Multithreaded full DB refresh, manual encryption support
2017-08-12 23:26:39 -05:00
- Shell completion scripts, man page with handy examples
2019-11-29 17:26:01 -06:00
- Privacy-aware (no unconfirmed user data collection)
2016-09-05 11:27:11 -05:00
2017-03-29 02:07:43 -05:00
### Installation
2016-05-23 04:02:46 -05:00
2017-03-29 02:07:43 -05:00
#### Dependencies
2016-05-23 04:02:46 -05:00
2017-03-12 23:31:35 -05:00
| Feature | Dependency |
| --- | --- |
2019-04-28 09:52:56 -05:00
| Scripting language | Python 3.5+ |
2018-08-05 20:04:58 -05:00
| HTTPS | certifi, urllib3 |
2017-03-12 23:31:35 -05:00
| Encryption | cryptography |
2018-08-28 21:43:17 -05:00
| HTML | beautifulsoup4, html5lib |
2015-11-08 16:04:49 -06:00
2020-01-07 21:07:17 -06:00
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.
2018-02-10 17:51:36 -06:00
2017-08-13 18:54:16 -05:00
#### From a package manager
2017-03-16 22:05:27 -05:00
2020-02-25 20:50:45 -06:00
To install buku with all its dependencies from PyPI, run:
# pip3 install buku
You can also install `buku` from your package manager. If the version available is dated try an alternative installation method.
2019-12-20 19:39:01 -06:00
< details > < summary > Packaging status (expand)< / summary >
< p >
< br >
< a href = "https://repology.org/project/buku/versions" > < img src = "https://repology.org/badge/vertical-allrepos/buku.svg" alt = "Packaging status" > < / a >
< / p >
Unlisted packagers:
< p >
< br >
● < a href = "https://pypi.org/project/buku/" > PyPI< / a > (< code > pip3 install buku< / code > )< br >
● Termux (< code > pip3 install buku< / code > )< br >
< / p >
< / details >
2017-08-13 18:54:16 -05:00
#### Release packages
2020-01-07 21:07:17 -06:00
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 ](https://github.com/jarun/buku/releases/latest ).
2017-11-24 17:37:04 -06:00
NOTE: CentOS may not have the python3-beautifulsoup4 package in the repos. Install it using pip3.
2017-08-13 18:54:16 -05:00
#### From source
2016-02-28 08:11:27 -06:00
2020-01-07 21:07:17 -06:00
If you have git installed, clone this repository. Otherwise download the [latest stable release ](https://github.com/jarun/buku/releases/latest ) or [development version ](https://github.com/jarun/buku/archive/master.zip ) (*risky*).
2016-02-28 08:11:27 -06:00
2020-02-25 20:50:45 -06:00
Install the dependencies. For example, on Ubuntu:
$ apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
2019-05-26 10:38:47 -05:00
Install the cli component to default location (`/usr/local`):
2016-02-28 08:11:27 -06:00
2016-04-10 07:41:00 -05:00
$ sudo make install
To remove, run:
2015-11-08 16:04:49 -06:00
2016-02-28 08:11:27 -06:00
$ sudo make uninstall
2015-12-19 12:15:22 -06:00
2017-08-13 18:54:16 -05:00
`PREFIX` is supported, in case you want to install to a different location.
#### Running standalone
2016-05-23 04:02:46 -05:00
2016-02-28 08:11:27 -06:00
`buku` is a standalone utility. From the containing directory, run:
2018-11-11 12:45:18 -06:00
$ chmod +x buku
$ ./buku
2016-05-23 04:02:46 -05:00
2017-03-29 02:07:43 -05:00
### Shell completion
2016-09-11 10:24:33 -05:00
2020-01-07 21:07:17 -06:00
Shell completion scripts for Bash, Fish and Zsh can be found in respective subdirectories of [auto-completion/ ](https://github.com/jarun/buku/blob/master/auto-completion ). Please refer to your shell's manual for installation instructions.
2016-09-11 10:24:33 -05:00
2017-03-29 02:07:43 -05:00
### Usage
2016-05-23 04:02:46 -05:00
2019-01-10 21:13:20 -06:00
#### Command-line options
2017-08-24 16:46:54 -05:00
2017-01-04 10:17:02 -06:00
```
usage: buku [OPTIONS] [KEYWORD [KEYWORD ...]]
2016-03-20 14:53:57 -05:00
2018-05-10 21:30:40 -05:00
Bookmark manager like a text-based mini-web.
2016-02-28 08:11:27 -06:00
2017-01-29 07:49:47 -06:00
POSITIONAL ARGUMENTS:
KEYWORD search keywords
2017-01-04 10:17:02 -06:00
GENERAL OPTIONS:
2016-11-14 12:37:22 -06:00
-a, --add URL [tag, ...]
2016-05-18 22:24:46 -05:00
bookmark URL with comma-separated tags
2017-02-11 00:03:29 -06:00
-u, --update [...] update fields of an existing bookmark
2016-10-11 02:39:58 -05:00
accepts indices and ranges
2019-02-01 23:48:26 -06:00
refresh title and desc if no edit options
2017-02-11 00:03:29 -06:00
if no arguments:
- update results when used with search
2019-02-01 22:22:59 -06:00
- otherwise refresh all titles and desc
2017-02-11 00:03:29 -06:00
-w, --write [editor|index]
open editor to edit a fresh bookmark
2017-10-08 14:51:13 -05:00
edit last bookmark, if index=-1
to specify index, EDITOR must be set
2017-02-11 00:03:29 -06:00
-d, --delete [...] remove bookmarks from DB
accepts indices or a single range
if no arguments:
- delete results when used with search
- otherwise delete all bookmarks
2016-05-31 00:53:01 -05:00
-h, --help show this information and exit
2017-02-11 00:03:29 -06:00
-v, --version show the program version and exit
2016-05-21 12:29:41 -05:00
2017-01-04 10:17:02 -06:00
EDIT OPTIONS:
2017-02-11 00:03:29 -06:00
--url keyword bookmark link
--tag [+|-] [...] comma-separated tags
clear bookmark tagset, if no arguments
'+' appends to, '-' removes from tagset
2017-03-16 13:15:37 -05:00
--title [...] bookmark title; if no arguments:
2016-05-20 13:26:01 -05:00
-a: do not set title, -u: clear title
2017-03-16 22:05:27 -05:00
-c, --comment [...] notes or description of the bookmark
2017-02-11 00:03:29 -06:00
clears description, if no arguments
2018-08-05 06:07:16 -05:00
--immutable N disable web-fetch during auto-refresh
2016-11-05 17:32:03 -05:00
N=0: mutable (default), N=1: immutable
2016-04-29 13:09:39 -05:00
2017-01-04 10:17:02 -06:00
SEARCH OPTIONS:
2018-03-26 18:08:24 -05:00
-s, --sany [...] find records with ANY matching keyword
2017-01-29 07:49:47 -06:00
this is the default search option
2018-03-26 18:08:24 -05:00
-S, --sall [...] find records matching ALL the keywords
2016-11-06 08:41:45 -06:00
special keywords -
2016-11-12 11:06:31 -06:00
"blank": entries with empty title/tag
"immutable": entries with locked title
2016-11-25 12:10:25 -06:00
--deep match substrings ('pen' matches 'opens')
2018-03-26 18:08:24 -05:00
-r, --sreg expr run a regex search
2017-08-14 16:07:01 -05:00
-t, --stag [tag [,|+] ...] [- tag, ...]
search bookmarks by tags
use ',' to find entries matching ANY tag
use '+' to find entries matching ALL tags
2017-09-17 01:23:55 -05:00
excludes entries with tags after ' - '
2017-01-29 07:49:47 -06:00
list all tags, if no search keywords
2018-03-25 22:33:46 -05:00
-x, --exclude [...] omit records matching specified keywords
2017-08-14 23:36:29 -05:00
2017-01-04 10:17:02 -06:00
ENCRYPTION OPTIONS:
2017-09-17 01:23:55 -05:00
-l, --lock [N] encrypt DB in N (default 8) # iterations
-k, --unlock [N] decrypt DB in N (default 8) # iterations
2016-04-29 13:09:39 -05:00
2017-01-04 10:17:02 -06:00
POWER TOYS:
2017-11-06 19:26:56 -06:00
--ai auto-import from Firefox/Chrome/Chromium
2019-01-10 21:13:20 -06:00
-e, --export file export bookmarks to Firefox format HTML
export Markdown, if file ends with '.md'
2020-01-30 15:41:54 -06:00
format: [title ](url ) <!-- TAGS -->
2019-01-10 21:13:20 -06:00
export Orgfile, if file ends with '.org'
2020-01-30 15:41:54 -06:00
format: *[[url][title]] :tags:
2017-09-17 01:23:18 -05:00
export buku DB, if file ends with '.db'
2018-08-27 19:29:32 -05:00
combines with search results, if opted
2019-01-14 17:54:58 -06:00
-i, --import file import bookmarks based on file extension
supports 'html', 'json', 'md', 'org', 'db'
2017-02-11 00:03:29 -06:00
-p, --print [...] show record details by indices, ranges
print all bookmarks, if no arguments
2017-03-18 14:15:26 -05:00
-n shows the last n results (like tail)
2019-01-10 21:13:20 -06:00
-f, --format N limit fields in -p or JSON search output
2019-04-29 21:17:42 -05:00
N=1: URL; N=2: URL, tag; N=3: title;
N=4: URL, title, tag; N=5: title, tag;
N0 (10, 20, 30, 40, 50) omits DB index
2020-04-20 11:15:04 -05:00
-j, --json [file] JSON formatted output for -p and search.
prints to stdout if no arguments provided.
otherwise writes to given file
2017-08-22 23:43:55 -05:00
--colors COLORS set output colors in five-letter string
2017-02-10 07:55:05 -06:00
--nc disable color output
2018-06-16 21:35:32 -05:00
-n, --count N show N results per page (default 10)
2017-02-10 07:59:02 -06:00
--np do not show the prompt, run and exit
2017-02-11 00:03:29 -06:00
-o, --open [...] browse bookmarks by indices and ranges
open a random bookmark, if no arguments
--oa browse all search results immediately
2017-03-16 22:05:27 -05:00
--replace old new replace old tag with new tag everywhere
delete old tag, if new tag not specified
2017-02-11 00:03:29 -06:00
--shorten index|URL fetch shortened url from tny.im service
--expand index|URL expand a tny.im shortened url
2018-05-25 11:39:12 -05:00
--cached index|URL browse a cached page from Wayback Machine
2017-08-01 10:37:03 -05:00
--suggest show similar tags when adding bookmarks
2016-11-06 09:30:45 -06:00
--tacit reduce verbosity
2016-12-03 07:20:53 -06:00
--threads N max network connections in full refresh
2017-01-29 07:49:47 -06:00
default N=4, min N=1, max N=10
2017-02-10 09:04:24 -06:00
-V check latest upstream version available
2016-11-25 12:10:25 -06:00
-z, --debug show debug information and verbose logs
2016-04-29 13:09:39 -05:00
2017-01-04 10:17:02 -06:00
SYMBOLS:
2017-04-08 15:19:25 -05:00
> url
2016-07-03 05:06:50 -05:00
+ comment
# tags
2017-07-24 22:58:32 -05:00
2017-08-13 04:03:06 -05:00
PROMPT KEYS:
2017-07-24 22:58:32 -05:00
1-N browse search result indices and/or ranges
2018-11-01 11:39:52 -05:00
O [id|range [...]] open search results/indices in GUI browser
toggle try GUI browser if no arguments
2017-07-24 22:58:32 -05:00
a open all results in browser
s keyword [...] search for records with ANY keyword
S keyword [...] search for records with ALL keywords
d match substrings ('pen' matches 'opened')
r expression run a regex search
2018-09-02 01:05:40 -05:00
t [tag, ...] search by tags; show taglist, if no args
2018-09-01 16:37:54 -05:00
g taglist id|range [...] [>>|>|< < ] [record id|range ...]
append, set, remove (all or specific) tags
search by taglist id(s) if records are omitted
2018-06-16 21:35:32 -05:00
n show next page of search results
2017-08-13 04:03:06 -05:00
o id|range [...] browse bookmarks by indices and/or ranges
p id|range [...] print bookmarks by indices and/or ranges
w [editor|id] edit and add or update a bookmark
2018-02-10 17:42:21 -06:00
c id copy url at search result index to clipboard
2017-07-24 22:58:32 -05:00
? show this help
q, ^D, double Enter exit buku
2017-01-04 10:17:02 -06:00
```
2016-07-03 05:06:50 -05:00
2017-08-24 16:46:54 -05:00
#### Colors
2020-01-07 21:07:17 -06:00
`buku` supports custom colors. Visit the wiki page on how to [customize colors ](https://github.com/jarun/buku/wiki/Customize-colors ) for more details.
2017-08-24 16:30:45 -05:00
2018-09-16 18:25:47 -05:00
### Quickstart
1. Export `VISUAL` or `EDITOR` to point to your favourite editor. Note that `VISUAL` takes precedence over `EDITOR` .
2. Create a sweeter shortcut with some convenience.
alias b='buku --suggest'
2019-03-20 08:48:43 -05:00
3. Auto-import bookmarks from your browser(s). Please quit the relevant browsers beforehand to ensure the databases are not locked.
2018-09-16 18:25:47 -05:00
b --ai
4. Manually add a bookmark (for hands-on).
b -w
5. List your bookmarks with DB index.
b -p
2020-01-07 21:07:17 -06:00
6. For GUI and browser integration (or to sync bookmarks with your favourite bookmark management service) refer to the wiki page on [System integration ](https://github.com/jarun/buku/wiki/System-integration ).
2020-02-08 17:42:02 -06:00
7. Handy (bash/zsh) command to fuzzy search all URLs and open the selected one in Firefox:
firefox $(buku -p -f 10 | fzy)
2018-09-16 18:25:47 -05:00
2017-03-29 02:07:43 -05:00
### Examples
2016-05-23 04:02:46 -05:00
2017-02-05 11:05:45 -06:00
1. **Edit and add** a bookmark from editor:
2017-10-01 21:11:16 -05:00
$ buku -w
$ buku -w 'gedit -w'
$ buku -w 'macvim -f' -a https://ddg.gg search engine, privacy
2017-09-18 19:25:22 -05:00
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.
2017-02-05 11:05:45 -06:00
2. **Add** a bookmark with **tags** `search engine` and `privacy` , **comment** `Search engine with perks` , **fetch page title** from the web:
2017-10-01 21:11:16 -05:00
$ buku -a https://ddg.gg search engine, privacy -c Search engine with perks
336. DuckDuckGo
> https://ddg.gg
+ Alternative search engine with perks
# privacy,search engine
2017-04-08 15:19:25 -05:00
where, >: url, +: comment, #: tags
2017-02-05 11:05:45 -06:00
3. **Add** a bookmark with tags `search engine` & `privacy` and **immutable custom title** `DDG` :
2016-02-28 08:32:10 -06:00
2017-10-01 21:11:16 -05:00
$ buku -a https://ddg.gg search engine, privacy --title 'DDG' --immutable 1
336. DDG (L)
> https://ddg.gg
# privacy,search engine
2017-03-16 22:05:27 -05:00
Note that URL must precede tags.
2017-02-05 11:05:45 -06:00
4. **Add** a bookmark **without a title** (works for update too):
2016-02-28 08:32:10 -06:00
2017-10-01 21:11:16 -05:00
$ buku -a https://ddg.gg search engine, privacy --title
2017-02-07 12:03:51 -06:00
5. **Edit and update** a bookmark from editor:
2017-10-01 21:11:16 -05:00
$ buku -w 15012014
2017-03-16 22:05:27 -05:00
This will open the existing bookmark's details in the editor for modifications. Environment variable `EDITOR` must be set.
2017-02-07 12:03:51 -06:00
6. **Update** existing bookmark at index 15012014 with new URL, tags and comments, fetch title from the web:
2016-05-20 13:26:01 -05:00
2017-10-01 21:11:16 -05:00
$ buku -u 15012014 --url http://ddg.gg/ --tag web search, utilities -c Private search engine
2017-02-07 12:03:51 -06:00
7. **Fetch and update only title** for bookmark at 15012014:
2016-05-20 13:26:01 -05:00
2017-10-01 21:11:16 -05:00
$ buku -u 15012014
2017-02-07 12:03:51 -06:00
8. **Update only comment** for bookmark at 15012014:
2016-05-20 13:26:01 -05:00
2017-10-01 21:11:16 -05:00
$ buku -u 15012014 -c this is a new comment
2017-03-16 22:05:27 -05:00
Applies to --url, --title and --tag too.
2019-01-10 21:13:20 -06:00
9. **Export** bookmarks tagged `tag 1` or `tag 2` to HTML, Markdown, Orgfile or a new database:
2016-09-20 13:02:04 -05:00
2018-08-27 19:29:32 -05:00
$ buku -e bookmarks.html --stag tag 1, tag 2
$ buku -e bookmarks.md --stag tag 1, tag 2
$ buku -e bookmarks.org --stag tag 1, tag 2
$ buku -e bookmarks.db --stag tag 1, tag 2
All bookmarks are exported if search is not opted.
2019-01-10 21:13:20 -06:00
10. **Import** bookmarks from HTML, Markdown or Orgfile:
2016-05-22 18:36:41 -05:00
$ buku -i bookmarks.html
2017-02-10 10:39:02 -06:00
$ buku -i bookmarks.md
2018-05-10 20:16:47 -05:00
$ buku -i bookmarks.org
2017-09-17 07:36:31 -05:00
$ buku -i bookmarks.db
2017-02-04 08:45:33 -06:00
11. **Delete only comment** for bookmark at 15012014:
2016-02-28 08:32:10 -06:00
2016-05-20 13:26:01 -05:00
$ buku -u 15012014 -c
2017-03-16 22:05:27 -05:00
Applies to --title and --tag too. URL cannot be deleted without deleting the bookmark.
2017-02-04 08:45:33 -06:00
12. **Update** or refresh **full DB** with page titles from the web:
2016-02-28 08:32:10 -06:00
2016-04-30 23:33:21 -05:00
$ buku -u
2016-11-08 11:32:45 -06:00
$ buku -u --tacit (show only failures and exceptions)
2019-02-01 22:22:59 -06:00
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.
2017-02-04 08:45:33 -06:00
13. **Delete** bookmark at index 15012014:
2016-02-28 08:32:10 -06:00
$ buku -d 15012014
2016-03-20 00:53:59 -05:00
Index 15012020 moved to 15012014
2017-03-16 22:05:27 -05:00
The last index is moved to the deleted index to keep the DB compact.
2017-02-04 08:45:33 -06:00
14. **Delete all** bookmarks:
2016-02-28 08:32:10 -06:00
2016-04-30 23:33:21 -05:00
$ buku -d
2017-02-04 08:45:33 -06:00
15. **Delete** a **range or list** of bookmarks:
2016-06-16 16:08:38 -05:00
2016-10-22 01:42:11 -05:00
$ buku -d 100-200
$ buku -d 100 15 200
2017-02-04 08:45:33 -06:00
16. **Search** bookmarks for **ANY** of the keywords `kernel` and `debugging` in URL, title or tags:
2016-02-28 08:32:10 -06:00
2017-02-20 08:05:55 -06:00
$ buku kernel debugging
2016-02-28 08:32:10 -06:00
$ buku -s kernel debugging
2017-02-04 08:45:33 -06:00
17. **Search** bookmarks with **ALL** the keywords `kernel` and `debugging` in URL, title or tags:
2016-02-28 08:32:10 -06:00
$ buku -S kernel debugging
2017-02-04 08:45:33 -06:00
18. **Search** bookmarks **tagged** `general kernel concepts` :
2016-04-19 12:30:06 -05:00
2016-11-07 11:35:02 -06:00
$ buku --stag general kernel concepts
2017-08-14 16:07:01 -05:00
19. **Search** for bookmarks matching **ANY** of the tags `kernel` , `debugging` , `general kernel concepts` :
$ buku --stag kernel, debugging, general kernel concepts
20. **Search** for bookmarks matching **ALL** of the tags `kernel` , `debugging` , `general kernel concepts` :
$ buku --stag kernel + debugging + general kernel concepts
2018-03-25 22:33:46 -05:00
21. **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` :
2017-08-14 16:07:01 -05:00
2018-03-25 22:33:46 -05:00
$ buku hello world --exclude real life --stag 'kernel + debugging - general kernel concepts, books'
2017-08-14 16:07:01 -05:00
22. List **all unique tags** alphabetically:
2016-05-01 03:43:26 -05:00
2016-11-07 11:35:02 -06:00
$ buku --stag
2017-08-14 16:07:01 -05:00
23. Run a **search and update** the results:
2017-01-08 22:22:22 -06:00
2017-03-16 22:05:27 -05:00
$ buku -s kernel debugging -u --tag + linux kernel
2017-08-14 16:07:01 -05:00
24. Run a **search and delete** the results:
2016-11-26 08:28:22 -06:00
$ buku -s kernel debugging -d
2017-08-14 16:07:01 -05:00
25. **Encrypt or decrypt** DB with **custom number of iterations** (15) to generate key:
2016-02-28 08:32:10 -06:00
2016-04-30 23:33:21 -05:00
$ buku -l 15
$ buku -k 15
2017-03-16 22:05:27 -05:00
The same number of iterations must be specified for one lock & unlock instance. Default is 8, if omitted.
2017-08-14 16:07:01 -05:00
26. **Show details** of bookmarks at index 15012014 and ranges 20-30, 40-50:
2016-05-01 03:43:26 -05:00
2016-10-11 11:45:07 -05:00
$ buku -p 20-30 15012014 40-50
2017-08-14 16:07:01 -05:00
27. Show details of the **last 10 bookmarks** :
2017-03-18 14:15:26 -05:00
$ buku -p -10
2017-08-14 16:07:01 -05:00
28. **Show all** bookmarks with real index from database:
2016-05-01 03:43:26 -05:00
$ buku -p
2016-05-03 12:52:36 -05:00
$ buku -p | more
2017-08-14 16:07:01 -05:00
29. **Replace tag** 'old tag' with 'new tag':
2016-05-01 03:43:26 -05:00
2017-03-16 22:05:27 -05:00
$ buku --replace 'old tag' 'new tag'
2017-08-14 16:07:01 -05:00
30. **Delete tag** 'old tag' from DB:
2016-05-01 03:43:26 -05:00
2017-03-16 13:37:51 -05:00
$ buku --replace 'old tag'
2017-08-14 16:07:01 -05:00
31. **Append (or delete) tags** 'tag 1', 'tag 2' to (or from) existing tags of bookmark at index 15012014:
2016-06-12 05:48:10 -05:00
$ buku -u 15012014 --tag + tag 1, tag 2
2016-07-11 12:18:40 -05:00
$ buku -u 15012014 --tag - tag 1, tag 2
2017-08-14 16:07:01 -05:00
32. **Open URL** at index 15012014 in browser:
2016-05-01 03:43:26 -05:00
$ buku -o 15012014
2017-08-14 16:07:01 -05:00
33. List bookmarks with **no title or tags** for bookkeeping:
2016-03-29 07:43:43 -05:00
2016-05-01 08:44:17 -05:00
$ buku -S blank
2017-08-14 16:07:01 -05:00
34. List bookmarks with **immutable title** :
2016-11-06 08:41:45 -06:00
$ buku -S immutable
2017-08-14 16:07:01 -05:00
35. **Shorten URL** www.google.com and the URL at index 20:
2016-11-12 09:47:36 -06:00
$ buku --shorten www.google.com
$ buku --shorten 20
2017-08-14 16:07:01 -05:00
36. **Append, remove tags at prompt** (taglist index to the left, bookmark index to the right):
2017-04-06 14:19:08 -05:00
// append tags at taglist indices 4 and 6-9 to existing tags in bookmarks at indices 5 and 2-3
buku (? for help) g 4 9-6 >> 5 3-2
// set tags at taglist indices 4 and 6-9 as tags in bookmarks at indices 5 and 2-3
buku (? for help) g 4 9-6 > 5 3-2
// remove all tags from bookmarks at indices 5 and 2-3
buku (? for help) g > 5 3-2
// remove tags at taglist indices 4 and 6-9 from tags in bookmarks at indices 5 and 2-3
buku (? for help) g 4 9-6 < < 5 3-2
2019-05-04 11:09:05 -05:00
37. List bookmarks with **colored output** :
2017-08-22 17:09:43 -05:00
2017-08-24 15:59:39 -05:00
$ buku --colors oKlxm -p
2019-05-04 11:09:05 -05:00
38. More **help** :
2016-02-28 08:32:10 -06:00
2016-11-26 08:28:22 -06:00
$ buku -h
2016-05-23 01:21:29 -05:00
$ man buku
2015-11-08 16:04:49 -06:00
2019-03-20 08:40:10 -05:00
### Automation
2020-01-07 21:07:17 -06:00
Interactive workflows can be automated using expect. Issue [#368 ](https://github.com/jarun/buku/issues/368 ) has a working example on automating auto-import.
2019-03-20 08:40:10 -05:00
2017-09-18 19:25:22 -05:00
### Troubleshooting
#### Editor integration
2020-01-07 21:07:17 -06:00
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 ](https://github.com/jarun/buku/issues/210 ) for gedit.
2017-09-18 19:25:22 -05:00
2017-03-29 02:07:43 -05:00
### Collaborators
2016-05-31 11:21:10 -05:00
2017-03-29 02:07:43 -05:00
- [Arun Prakash Jana ](https://github.com/jarun )
- [Rachmadani Haryono ](https://github.com/rachmadaniHaryono )
2017-08-12 17:16:34 -05:00
- [Johnathan Jenkins ](https://github.com/shaggytwodope )
- [SZ Lin ](https://github.com/szlin )
2016-05-23 04:02:46 -05:00
2019-12-31 22:08:05 -06:00
Copyright © 2015-2020 [Arun Prakash Jana ](mailto:engineerarun@gmail.com )
2017-03-29 02:07:43 -05:00
< br >
2020-01-07 21:07:17 -06:00
< p > < a href = "https://gitter.im/jarun/buku" > < img src = "https://img.shields.io/gitter/room/jarun/buku.svg?maxAge=2592000" alt = "gitter chat" / > < / a > < / p >
2017-08-14 23:36:29 -05:00
2018-07-09 23:19:05 -05:00
### Contributions
2020-01-07 21:07:17 -06:00
Missing a feature? There's a rolling [ToDo List ](https://github.com/jarun/buku/issues/343 ) with identified tasks. Contributions are welcome! Please follow the [PR guidelines ](https://github.com/jarun/buku/wiki/PR-guidelines ).
2018-07-09 23:19:05 -05:00
2017-08-14 23:36:29 -05:00
### Related projects
- [bukubrow ](https://github.com/SamHH/bukubrow ), WebExtension for browser integration
2019-01-10 21:13:20 -06:00
- [oil ](https://github.com/AndreiUlmeyda/oil ), search-as-you-type cli front-end
- [buku_run ](https://github.com/carnager/buku_run ), rofi front-end
2020-01-07 21:07:17 -06:00
- [pinku ](https://github.com/mosegontar/pinku ), a Pinboard-to-buku import utility
2018-08-31 03:31:15 -05:00
- [buku-dmenu ](https://gitlab.com/benoliver999/buku-dmenu ), a simple bash dmenu wrapper
2020-01-07 21:07:17 -06:00
- [poku ](https://github.com/shanedabes/poku ), sync between Pocket and buku
- [Ebuku ](https://github.com/flexibeast/ebuku ), Emacs interface to buku
2017-08-14 23:36:29 -05:00
2017-09-10 16:57:45 -05:00
< a href = "http://buku.readthedocs.io/en/stable/?badge=stable" > < img src = "https://img.shields.io/badge/docs-stable-brightgreen.svg?maxAge=2592000" alt = "Stable Docs" / > < / a >
2017-08-14 23:36:29 -05:00
### In the Press
- [2daygeek ](http://www.2daygeek.com/buku-command-line-bookmark-manager-linux/ )
2020-01-29 18:33:07 -06:00
- [Hacker Milk ](https://hackermilk.blogspot.com/2020/01/how-to-manage-your-browsers-bookmarks.html )
2017-10-10 07:54:25 -05:00
- [It's F.O.S.S. ](https://itsfoss.com/buku-command-line-bookmark-manager-linux/ )
2017-08-14 23:36:29 -05:00
- [LinOxide ](https://linoxide.com/linux-how-to/buku-browser-bookmarks-linux/ )
2017-10-10 07:54:25 -05:00
- [LinuxUser Magazine 01/2017 Issue ](http://www.linux-community.de/LU/2017/01/Das-Beste-aus-zwei-Welten )
- [Make Tech Easier ](https://www.maketecheasier.com/manage-browser-bookmarks-ubuntu-command-line/ )
- [One Thing Well ](http://onethingwell.org/post/144952807044/buku )
2018-08-26 02:01:57 -05:00
- [Open Source For You ](https://opensourceforu.com/2018/05/buku-a-bookmark-manager-in-the-command-line/ )
2017-10-10 07:54:25 -05:00
- [ulno.net ](https://ulno.net/blog/2017-07-19/of-bookmarks-tags-and-browsers/ )