buku/README.md

472 lines
22 KiB
Markdown
Raw Permalink Normal View History

2016-04-23 02:41:16 +05:30
<h1 align="center">Buku</h1>
2015-11-10 12:45:35 +05:30
2016-04-23 11:16:27 +05:30
<p align="center">
2016-05-24 08:48:02 +05:30
<a href="https://github.com/jarun/Buku/releases/latest"><img src="https://img.shields.io/github/release/jarun/buku.svg" alt="Latest release" /></a>
2016-04-23 11:16:27 +05:30
<a href="https://aur.archlinux.org/packages/buku"><img src="https://img.shields.io/aur/version/buku.svg" alt="AUR" /></a>
<a href="http://braumeister.org/formula/buku"><img src="https://img.shields.io/homebrew/v/buku.svg" alt="Homebrew" /></a>
2016-12-18 17:31:27 +05:30
<a href="https://packages.debian.org/search?keywords=buku&searchon=names&exact=1"><img src="https://img.shields.io/badge/debian-stretch+-blue.svg?maxAge=2592000" alt="Debian Strech+" /></a>
<a href="http://packages.ubuntu.com/search?keywords=buku&searchon=names&exact=1"><img src="https://img.shields.io/badge/ubuntu-zesty+-blue.svg?maxAge=2592000" alt="Ubuntu Zesty+" /></a>
2016-04-26 14:06:14 +05:30
<a href="https://github.com/jarun/buku/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" /></a>
2016-06-04 06:02:38 +05:30
<a href="https://travis-ci.org/jarun/Buku"><img src="https://travis-ci.org/jarun/Buku.svg?branch=master" alt="Build Status" /></a>
2016-04-23 11:16:27 +05:30
</p>
2016-04-23 02:41:16 +05:30
<p align="center">
<a href="https://asciinema.org/a/9l6s2ppivpo661nu5slwk2t6y"><img src="https://asciinema.org/a/9l6s2ppivpo661nu5slwk2t6y.png" alt="Asciicast" width="734"/></a>
2016-04-23 02:41:16 +05:30
</p>
2015-11-10 12:45:35 +05:30
2016-10-11 10:41:07 +05:30
`buku` is a powerful bookmark management utility written in Python3 and SQLite3. When I started writing it, I couldn't find a flexible cmdline solution with a private, portable, merge-able database along with browser integration. Hence, `buku` (after my son's nickname).
2016-02-28 16:38:04 +05:30
2016-12-26 09:20:03 +05:30
`buku` fetches the title of a bookmarked web page and stores it along with any additional comments and tags. With multiple options to search bookmarks, including regex and a deep scan mode (particularly for URLs), finding a bookmark is very easy. Multiple search results can be opened in the browser at once.
2016-10-11 10:41:07 +05:30
2016-10-12 00:28:08 +05:30
Though a terminal utility, it's possible to add bookmarks to `buku` without touching the terminal! Refer to the section on [GUI integration](#gui-integration). If you prefer the terminal, thanks to the shell completion scripts, you don't need to memorize any of the options. There's an Easter egg to revisit random forgotten bookmarks too.
2016-02-28 16:38:04 +05:30
2016-11-28 00:10:14 +05:30
*Buku* is too busy to track you - no history, obsolete records, usage analytics or homing.
2016-11-27 20:58:03 +05:30
2016-09-11 20:54:33 +05:30
<p align="center">
2016-12-28 18:12:08 +05:30
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q"><img src="https://tuxtricks.files.wordpress.com/2016/12/donate.png" alt="Donate via PayPal!" title="Donate via PayPal!" /></a>
2016-09-11 20:54:33 +05:30
</p>
2016-04-26 13:49:16 +05:30
2016-08-27 20:07:07 +05:30
## Table of Contents
2016-09-05 21:57:11 +05:30
- [Features](#features)
2016-04-20 00:27:58 +05:30
- [Installation](#installation)
- [Dependencies](#dependencies)
- [Installing from this repository](#installing-from-this-repository)
2016-10-23 21:14:16 +05:30
- [Running as a standalone utility](#running-as-a-standalone-utility)
- [Debian package](#debian-package)
2016-04-20 00:27:58 +05:30
- [Installing with a package manager](#installing-with-a-package-manager)
2016-09-11 20:54:33 +05:30
- [Shell completion](#shell-completion)
2016-04-20 00:27:58 +05:30
- [Usage](#usage)
- [Cmdline options](#cmdline-options)
- [Operational notes](#operational-notes)
2016-10-01 21:49:14 +05:30
- [GUI integration](#gui-integration)
2016-11-12 08:08:28 +05:30
- [Add bookmarks from anywhere](#add-bookmarks-from-anywhere)
2016-10-01 21:49:14 +05:30
- [Import bookmarks to browser](#import-bookmarks-to-browser)
2016-11-25 21:49:34 +05:30
- [Sync database across systems](#sync-database-across-systems)
2016-11-12 08:08:28 +05:30
- [As a library](#as-a-library)
2016-12-06 20:54:27 +05:30
- [Related projects](#related-projects)
- [Mentions](#mentions)
2016-04-20 00:27:58 +05:30
- [Examples](#examples)
- [Contributions](#contributions)
2016-09-11 20:54:33 +05:30
- [Copyright](#copyright)
2016-04-20 00:27:58 +05:30
2016-09-05 21:57:11 +05:30
## Features
2016-12-30 16:05:12 +05:30
- Fast, clean interface with distinct symbols
- Fetch page title from the web, add tags and comments
- Multiple search modes, including `deep` and `regex`
- Continuous search at prompt with on the fly mode switch
- Open bookmarks and search results in browser
- Import/export in HTML (FF, Chrome compatible) or Markdown
- Shorten and expand URLs
2016-09-05 21:57:11 +05:30
- Manual password protection using AES256 encryption
2016-12-30 16:05:12 +05:30
- Portable, merge-able database to sync between systems
- Additional options for power users (see help or man page)
2016-11-27 09:00:41 +05:30
- Completion scripts (Bash, Fish, Zsh), man page with examples
2016-09-05 21:57:11 +05:30
- Minimal dependencies
2016-08-27 20:07:07 +05:30
## Installation
2016-08-27 20:07:07 +05:30
### Dependencies
2016-06-12 23:09:03 +05:30
`buku` requires Python 3.3 or later.
2015-11-09 03:34:49 +05:30
2016-09-05 21:57:11 +05:30
To install package dependencies, run:
2016-11-27 09:00:41 +05:30
$ sudo pip3 install urllib3 cryptography beautifulsoup4 requests
2016-02-28 19:41:27 +05:30
or on Ubuntu:
2016-11-27 09:00:41 +05:30
$ sudo apt-get install python3-urllib3 python3-cryptography python3-bs4 python3-requests
2016-08-27 20:07:07 +05:30
### Installing from this repository
2016-02-28 19:41:27 +05:30
If you have git installed, run:
2016-08-14 01:01:35 +05:30
$ git clone https://github.com/jarun/Buku/
or download the latest [stable release](https://github.com/jarun/Buku/releases/latest) or [development version](https://github.com/jarun/Buku/archive/master.zip).
2016-02-28 19:41:27 +05:30
Install to default location (`/usr/local`):
2016-02-28 19:41:27 +05:30
2016-04-10 18:11:00 +05:30
$ sudo make install
To remove, run:
2015-11-09 03:34:49 +05:30
2016-02-28 19:41:27 +05:30
$ sudo make uninstall
`PREFIX` is supported. You may need to use `sudo` with `PREFIX` depending on your permissions on destination directory.
2016-10-23 21:14:16 +05:30
#### Running as a standalone utility
2016-02-28 19:41:27 +05:30
`buku` is a standalone utility. From the containing directory, run:
$ chmod +x buku.py
$ ./buku.py
2016-10-23 21:14:16 +05:30
#### Debian package
If you are on a Debian (including Ubuntu) based system visit [the latest stable release](https://github.com/jarun/Buku/releases/latest) and download the `.deb` package. To install, run:
$ sudo dpkg -i buku-$version-all.deb
Please substitute `$version` with the appropriate package version.
2016-08-27 20:07:07 +05:30
### Installing with a package manager
2016-12-18 17:31:27 +05:30
- [PyPi](https://pypi.python.org/pypi/buku/) (`$ pip install buku`)
- [AUR](https://aur.archlinux.org/packages/buku/)
- [Homebrew](http://braumeister.org/formula/buku)
- [Debian](https://packages.debian.org/search?keywords=buku&searchon=names&exact=1)
- [Ubuntu](http://packages.ubuntu.com/search?keywords=buku&searchon=names&exact=1)
2016-10-20 08:41:18 +05:30
- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/)
2016-02-09 11:42:08 +05:30
2016-09-11 20:54:33 +05:30
## Shell completion
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-08-27 20:07:07 +05:30
## Usage
2016-08-27 20:07:07 +05:30
### Cmdline options
2017-01-04 21:47:02 +05:30
```
usage: buku [OPTIONS] [KEYWORD [KEYWORD ...]]
2017-01-04 21:47:02 +05:30
Powerful command-line bookmark manager. Your mini web!
2016-02-28 19:41:27 +05:30
2017-01-04 21:47:02 +05:30
GENERAL OPTIONS:
-a, --add URL [tag, ...]
2016-05-19 08:54:46 +05:30
bookmark URL with comma-separated tags
-u, --update [...] update fields of bookmark at DB indices
2016-10-11 13:09:58 +05:30
accepts indices and ranges
2016-04-29 23:39:39 +05:30
refresh all titles, if no arguments
refresh titles of bookmarks at indices,
if no edit options are specified
2017-01-09 09:52:22 +05:30
update search results, when used with
2017-01-11 09:25:45 +05:30
search options, if no arguments
2016-06-17 02:38:38 +05:30
-d, --delete [...] delete bookmarks. Valid inputs: either
a hyphenated single range (100-200),
OR space-separated indices (100 15 200)
2016-05-20 23:56:01 +05:30
delete all bookmarks, if no arguments
2017-01-09 09:52:22 +05:30
delete search results, when used with
2017-01-11 09:25:45 +05:30
search options, if no arguments
2017-01-10 06:26:24 +05:30
-v, --version show program version and exit
-h, --help show this information and exit
2017-01-04 21:47:02 +05:30
EDIT OPTIONS:
2016-11-26 19:58:22 +05:30
--url keyword specify url, works only with -u option
--tag [+|-] [...] set comma-separated tags with -a and -u
2016-07-11 22:48:40 +05:30
clear tags, if no arguments
2017-01-04 21:47:02 +05:30
works with -a, -u
2016-11-26 19:58:22 +05:30
append to tags, if preceded by '+'
remove from tags, if preceded by '-'
2016-04-29 23:39:39 +05:30
-t, --title [...] manually set title, works with -a, -u
2016-05-20 23:56:01 +05:30
if no arguments:
-a: do not set title, -u: clear title
2016-05-18 01:41:31 +05:30
-c, --comment [...] description of the bookmark, works with
-a, -u; clears comment, if no arguments
2016-11-12 22:36:31 +05:30
--immutable N disable title fetch from web on update
2016-11-06 04:02:03 +05:30
works with -a, -u
N=0: mutable (default), N=1: immutable
2016-04-29 23:39:39 +05:30
2017-01-04 21:47:02 +05:30
SEARCH OPTIONS:
2016-04-29 23:39:39 +05:30
-s, --sany keyword [...]
2016-11-25 23:40:25 +05:30
find records with ANY search keyword
2016-04-29 23:39:39 +05:30
-S, --sall keyword [...]
2016-11-25 23:40:25 +05:30
find records with ALL search keywords
2016-11-06 20:11:45 +05:30
special keywords -
2016-11-12 22:36:31 +05:30
"blank": entries with empty title/tag
"immutable": entries with locked title
2016-11-25 23:40:25 +05:30
--deep match substrings ('pen' matches 'opens')
--sreg expression run a regex search
--stag [...] search bookmarks by a tag
2016-11-25 23:40:25 +05:30
list all tags, if no arguments
2016-04-29 23:39:39 +05:30
2017-01-04 21:47:02 +05:30
ENCRYPTION OPTIONS:
2016-04-29 23:39:39 +05:30
-l, --lock [N] encrypt DB file with N (> 0, default 8)
hash iterations to generate key
-k, --unlock [N] decrypt DB file with N (> 0, default 8)
hash iterations to generate key
2017-01-04 21:47:02 +05:30
POWER TOYS:
-e, --export file export bookmarks to Firefox format html
2016-09-20 23:32:04 +05:30
use --tag to export only specific tags
2016-11-25 23:40:25 +05:30
-i, --import file import bookmarks from html file
FF and Google Chrome formats supported
2016-10-23 02:26:27 +05:30
--markdown use markdown with -e and -i
2016-11-25 23:40:25 +05:30
format: [title](url), 1 per line
2016-12-03 22:54:14 +05:30
-m, --merge file add bookmarks from another buku DB file
-p, --print [...] show details of bookmark by DB index
accepts indices and ranges
2016-04-29 23:39:39 +05:30
show all bookmarks, if no arguments
2016-11-25 23:40:25 +05:30
-f, --format N limit fields in -p or Json search output
2016-11-12 22:36:31 +05:30
1: URL, 2: URL and tag, 3: title
2016-04-29 23:39:39 +05:30
-r, --replace oldtag [newtag ...]
replace oldtag with newtag everywhere
2016-04-29 23:39:39 +05:30
delete oldtag, if no newtag
-j, --json Json formatted output for -p and search
--nocolor disable color output
--noprompt do not show the prompt, run and exit
2016-12-31 00:29:57 +05:30
-o, --open [...] open bookmarks in browser by DB index
accepts indices and ranges
open a random index, if no arguments
2016-11-25 23:40:25 +05:30
--shorten N/URL fetch shortened url from tny.im service
2016-11-12 21:17:36 +05:30
accepts either a DB index or a URL
--expand N/URL expand a tny.im shortened url
2016-11-06 21:00:45 +05:30
--tacit reduce verbosity
--threads N max network connections in full refresh
default 4, min 1, max 10
--upstream check latest upstream version available
2016-11-25 23:40:25 +05:30
-z, --debug show debug information and verbose logs
2016-04-29 23:39:39 +05:30
2017-01-04 21:47:02 +05:30
SYMBOLS:
2016-07-03 15:36:50 +05:30
> title
+ comment
# tags
2017-01-04 21:47:02 +05:30
```
2016-07-03 15:36:50 +05:30
2016-08-27 20:07:07 +05:30
### Operational notes
2016-11-28 00:55:53 +05:30
- The database file is stored in:
2016-04-24 20:07:51 +05:30
- **$XDG_DATA_HOME/buku/bookmarks.db**, if XDG_DATA_HOME is defined (first preference) or
- **$HOME/.local/share/buku/bookmarks.db**, if HOME is defined (second preference) or
2016-05-01 10:07:16 +05:30
- the **current directory**.
2016-06-28 23:21:19 +05:30
- If the URL contains characters like `;`, `&` or brackets they may be interpreted specially by the shell. To avoid it, add the URL within single or double quotes (`'`/`"`).
2016-10-11 13:09:58 +05:30
- URLs are unique in DB. The same URL cannot be added twice.
2016-11-06 23:17:25 +05:30
- Bookmarks with immutable titles are listed with bold `(L)` after the URL.
- **Tags**:
2016-11-20 11:52:28 +05:30
- Comma (`,`) is the tag delimiter in DB. A tag cannot have comma(s) in it. Tags are filtered (for unique tags) and sorted. Tags are stored in lower case and can be replaced, appended or deleted.
2017-01-04 06:49:18 +05:30
- Releases prior to [v2.7](https://github.com/jarun/Buku/releases/tag/v2.7) support both capital and lower cases in tags. From v2.7 all tags are stored in lowercase. An undocumented option `--fixtags` is introduced to modify the older tags. It also fixes another issue where the same tag appears multiple times in the tagset of a record. Run `buku --fixtags` once.
- **Update** operation:
- If --title, --tag or --comment is passed without argument, clear the corresponding field from DB.
- If --url is passed (and --title is omitted), update the title from web using the URL.
2016-11-06 04:02:03 +05:30
- If indices are passed without any other options (--url, --title, --tag, --comment and --immutable), read the URLs from DB and update titles from web. Bookmarks marked immutable are skipped.
2017-01-09 09:52:22 +05:30
- Can update bookmarks matching a search, when combined with any of the search options and no arguments to update are passed.
2016-06-17 02:38:38 +05:30
- **Delete** operation:
- When a record is deleted, the last record is moved to the index.
2016-06-17 10:54:55 +05:30
- Delete doesn't work with range and indices provided together as arguments. It's an intentional decision to avoid extra sorting, in-range checks and to keep the auto-DB compaction functionality intact. On the same lines, indices are deleted in descending order.
2017-01-09 09:52:22 +05:30
- Can delete bookmarks matching a search, when combined with any of the search options and no arguments to delete are passed.
- **Search** works in mysterious ways:
2016-04-20 00:38:39 +05:30
- Case-insensitive.
- Matches words in URL, title and tags.
2016-10-22 12:12:11 +05:30
- --sany : match any of the keywords in URL, title or tags.
- --sall : match all the keywords in URL, title or tags.
- --deep : match **substrings** (`match` matches `rematched`) in URL, title and tags.
2016-10-21 17:15:10 +05:30
- --sreg : match a regular expression (ignores --deep).
2016-11-25 23:40:25 +05:30
- --stag : search bookmarks by a tag, or list all tags alphabetically with usage count (if no arguments).
2016-06-06 22:56:12 +05:30
- Search results are indexed serially. This index is different from actual database index of a bookmark record which is shown in bold within `[]` after the URL.
2017-01-04 06:49:18 +05:30
- **Encryption** is optional and manual. AES256 algorithm is used. To use encryption, the database file should be unlocked (-k) before using `buku` and locked (-l) afterwards. Between these 2 operations, the database file lies unencrypted on the disk, and NOT in memory. Also, note that the database file is *unencrypted on creation*.
- **Proxy** support: environment variable *https_proxy*, if defined, is used to tunnel data for both http and https connections. The supported format is:
http[s]://[username:password@]proxyhost:proxyport/
2016-02-28 16:38:04 +05:30
2016-10-01 21:49:14 +05:30
## GUI integration
![buku](http://i.imgur.com/8Y6PTPw.png)
2016-11-28 00:55:53 +05:30
`buku` can be integrated in a GUI environment with simple tweaks.
2016-10-01 21:49:14 +05:30
2016-11-12 08:08:28 +05:30
### Add bookmarks from anywhere
2016-10-01 21:49:14 +05:30
2016-10-03 10:20:30 +05:30
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).
2016-10-01 21:49:14 +05:30
2016-10-03 10:20:30 +05:30
The following steps explore the procedure on Linux with Ubuntu as the reference platform.
2016-10-01 21:49:14 +05:30
1. To install `xsel` on Ubuntu, run:
$ sudo apt install xsel
2. Create a new script `bukuadd` with the following content:
#!/bin/bash
xsel | buku -a
`-a` is the option to add a bookmark.
3. Make the script executable:
$ chmod +x bukuadd
4. Copy it somewhere in your `PATH`.
5. Add a new keyboard shortcut to run the script. I use `<Alt-b>`.
#### Test drive
2016-10-03 10:20:30 +05:30
Select a URL anywhere or copy a link 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 `-t` option to the script.
2016-10-01 21:49:14 +05:30
To verify that the bookmark has indeed been added, run:
$ buku -p | tail -3
and check the entry.
#### Tips
- 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.
### Import bookmarks to browser
2016-10-03 10:20:30 +05:30
`buku` can export (or import) bookmarks in HTML format recognized by Firefox, Google Chrome and Internet Explorer.
2016-10-01 21:49:14 +05:30
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.
2016-11-25 21:49:34 +05:30
## Sync database across systems
2016-11-27 20:58:03 +05:30
`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`.
2016-11-25 21:49:34 +05:30
2016-11-12 08:08:28 +05:30
## As a library
`buku` can be used as a powerful bookmark management library. All functionality are available through carefully designed APIs. `main()` is a good usage example. It's also possible to use a custom database file in multi-user scenarios. Check out the documentation for the following APIs which accept an optional argument as database file:
BukuDb.initdb(dbfile=None)
BukuCrypt.encrypt_file(iterations, dbfile=None)
BukuCrypt.decrypt_file(iterations, dbfile=None)
NOTE: This flexibility is not exposed in the program.
2016-12-06 20:54:27 +05:30
## Related projects
- [buku_run](https://github.com/carnager/buku_run), a rofi frontend
- [oil](https://github.com/AndreiUlmeyda/oil), a search-as-you-type cli frontend
## Mentions
- [One Thing Well](http://onethingwell.org/post/144952807044/buku)
- [It's F.O.S.S.](https://itsfoss.com/buku-command-line-bookmark-manager-linux/)
- [Make Tech Easier](https://www.maketecheasier.com/manage-browser-bookmarks-ubuntu-command-line/)
2016-08-27 20:07:07 +05:30
## Examples
2017-01-10 04:52:21 +05:30
1. **Add** a bookmark with **tags** `search engine` and `privacy`, **comment** `Alternative search engine with perks`, **fetch page title** from the web:
2016-04-21 20:59:32 +05:30
2017-01-10 04:52:21 +05:30
$ buku -a https://ddg.gg search engine, privacy -c Alternative search engine with perks
336. https://ddg.gg
> DuckDuckGo
+ Alternative search engine with perks
# privacy,search engine
2016-05-20 23:56:01 +05:30
where, >: title, +: comment, #: tags
2017-01-10 04:52:21 +05:30
2. **Add** a bookmark with tags `search engine` & `privacy` and **immutable custom title** `DDG`:
2016-02-28 20:02:10 +05:30
2017-01-10 04:52:21 +05:30
$ buku -a https://ddg.gg search engine, privacy -t 'DDG' --immutable 1
336. https://ddg.gg (L)
> DDG
# privacy,search engine
Note that URL must precede tags.
3. **Add** a bookmark **without a title** (works for update too):
2016-02-28 20:02:10 +05:30
2017-01-10 04:52:21 +05:30
$ buku -a https://ddg.gg search engine, privacy -t
2016-05-20 23:56:01 +05:30
4. **Update** existing bookmark at index 15012014 with new URL, tags and comments, fetch title from the web:
2017-01-10 04:52:21 +05:30
$ buku -u 15012014 --url http://ddg.gg/ --tag web search, utilities -c Alternative search engine
2016-05-21 00:16:44 +05:30
5. **Fetch and update only title** for bookmark at 15012014:
2016-05-20 23:56:01 +05:30
$ buku -u 15012014
2016-05-21 00:16:44 +05:30
6. **Update only comment** for bookmark at 15012014:
2016-05-20 23:56:01 +05:30
$ buku -u 15012014 -c this is a new comment
Applies to --url, --title and --tag too.
2016-10-22 11:55:41 +05:30
7. **Export** bookmarks tagged `tag 1` or `tag 2` to HTML and markdown:
2016-09-20 23:32:04 +05:30
2016-10-22 11:55:41 +05:30
$ buku -e bookmarks.html --tag tag 1, tag 2
$ buku -e bookmarks.md --markdown --tag tag 1, tag 2
2016-09-20 23:32:04 +05:30
All bookmarks are exported if --tag is not specified.
2016-10-22 11:55:41 +05:30
8. **Import** bookmarks from HTML and markdown:
$ buku -i bookmarks.html
2016-10-22 11:55:41 +05:30
$ buku -i bookmarks.md --markdown
2016-09-20 23:32:04 +05:30
9. **Delete only comment** for bookmark at 15012014:
2016-02-28 20:02:10 +05:30
2016-05-20 23:56:01 +05:30
$ buku -u 15012014 -c
Applies to --title and --tag too. URL cannot be deleted without deleting the bookmark.
2016-09-20 23:32:04 +05:30
10. **Update** or refresh **full DB** with page titles from the web:
2016-02-28 20:02:10 +05:30
$ buku -u
$ buku -u --tacit (show only failures and exceptions)
2016-05-20 23:56:01 +05:30
This operation does not modify the indexes, URLs, tags or comments. Only title is refreshed if fetched title is non-empty.
2016-09-20 23:32:04 +05:30
11. **Delete** bookmark at index 15012014:
2016-02-28 20:02:10 +05:30
$ buku -d 15012014
2016-03-20 11:23:59 +05:30
Index 15012020 moved to 15012014
The last index is moved to the deleted index to keep the DB compact.
2016-09-20 23:32:04 +05:30
12. **Delete all** bookmarks:
2016-02-28 20:02:10 +05:30
$ buku -d
2016-09-20 23:32:04 +05:30
13. **Delete** a **range or list** of bookmarks:
2016-06-17 02:38:38 +05:30
2016-10-22 12:12:11 +05:30
$ buku -d 100-200
$ buku -d 100 15 200
2016-09-20 23:32:04 +05:30
14. **Search** bookmarks for **ANY** of the keywords `kernel` and `debugging` in URL, title or tags:
2016-02-28 20:02:10 +05:30
$ buku -s kernel debugging
2016-09-20 23:32:04 +05:30
15. **Search** bookmarks with **ALL** the keywords `kernel` and `debugging` in URL, title or tags:
2016-02-28 20:02:10 +05:30
$ buku -S kernel debugging
2016-09-20 23:32:04 +05:30
16. **Search** bookmarks **tagged** `general kernel concepts`:
2016-04-19 23:00:06 +05:30
$ buku --stag general kernel concepts
2016-09-20 23:32:04 +05:30
17. List **all unique tags** alphabetically:
2016-05-01 14:13:26 +05:30
$ buku --stag
2017-01-09 09:52:22 +05:30
18. Run a **search and update** the results:
$ buku -s kernel debugging -u --tag + newtag
19. Run a **search and delete** the results:
2016-11-26 19:58:22 +05:30
$ buku -s kernel debugging -d
2017-01-09 09:52:22 +05:30
20. **Encrypt or decrypt** DB with **custom number of iterations** (15) to generate key:
2016-02-28 20:02:10 +05:30
$ buku -l 15
$ buku -k 15
2016-09-05 21:21:06 +05:30
The same number of iterations must be specified for one lock & unlock instance. Default is 8, if omitted.
2017-01-09 09:52:22 +05:30
21. **Show details** of bookmarks at index 15012014 and ranges 20-30, 40-50:
2016-05-01 14:13:26 +05:30
$ buku -p 20-30 15012014 40-50
2017-01-09 09:52:22 +05:30
22. **Show all** bookmarks with real index from database:
2016-05-01 14:13:26 +05:30
$ buku -p
2016-05-03 23:22:36 +05:30
$ buku -p | more
2017-01-09 09:52:22 +05:30
23. **Replace tag** 'old tag' with 'new tag':
2016-05-01 14:13:26 +05:30
$ buku -r 'old tag' new tag
2017-01-09 09:52:22 +05:30
24. **Delete tag** 'old tag' from DB:
2016-05-01 14:13:26 +05:30
$ buku -r 'old tag'
2017-01-09 09:52:22 +05:30
25. **Append (or delete) tags** 'tag 1', 'tag 2' to (or from) existing tags of bookmark at index 15012014:
2016-06-12 16:18:10 +05:30
$ buku -u 15012014 --tag + tag 1, tag 2
2016-07-11 22:48:40 +05:30
$ buku -u 15012014 --tag - tag 1, tag 2
2017-01-09 09:52:22 +05:30
26. **Open URL** at index 15012014 in browser:
2016-05-01 14:13:26 +05:30
$ buku -o 15012014
2017-01-09 09:52:22 +05:30
27. List bookmarks with **no title or tags** for bookkeeping:
2016-03-29 18:13:43 +05:30
2016-05-01 19:14:17 +05:30
$ buku -S blank
2017-01-09 09:52:22 +05:30
28. List bookmarks with **immutable title**:
2016-11-06 20:11:45 +05:30
$ buku -S immutable
2017-01-09 09:52:22 +05:30
29. **Shorten URL** www.google.com and the URL at index 20:
2016-11-12 21:17:36 +05:30
$ buku --shorten www.google.com
$ buku --shorten 20
2017-01-09 09:52:22 +05:30
30. More **help**:
2016-02-28 20:02:10 +05:30
2016-11-26 19:58:22 +05:30
$ buku -h
$ man buku
2015-11-09 03:34:49 +05:30
2016-08-27 20:07:07 +05:30
## Contributions
2016-12-06 20:54:27 +05:30
Pull requests are welcome. Please visit [#103](https://github.com/jarun/Buku/issues/103) for a list of TODOs.
2016-12-28 18:12:08 +05:30
<br>
<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>
2016-05-31 21:51:10 +05:30
2016-09-11 20:54:33 +05:30
## Copyright
2017-01-01 19:55:10 +05:30
Copyright © 2015-2017 [Arun Prakash Jana](mailto:engineerarun@gmail.com)