2017-09-18 01:03:49 -05:00
.TH "BUKU" "1" "Sep 2017" "Version 3.4" "User Commands"
2015-11-08 13:31:07 -06:00
.SH NAME
2017-09-10 21:56:11 -05:00
buku \- Powerful command-line bookmark manager.
2015-11-08 13:31:07 -06:00
.SH SYNOPSIS
2016-06-08 11:57:50 -05:00
.B buku [OPTIONS] [KEYWORD [KEYWORD ...]]
2015-11-08 13:31:07 -06:00
.SH DESCRIPTION
2015-12-19 14:13:46 -06:00
.B buku
2016-11-27 13:25:53 -06:00
is a command-line utility to store, tag, search and organize bookmarks.
2016-10-15 07:21:15 -05:00
.PP
.B Features
.PP
2017-08-22 17:09:43 -05:00
* Lightweight, clean interface, custom colors
2017-08-14 23:36:29 -05:00
* Text editor integration
2017-08-13 04:03:06 -05:00
* Fetch, edit page title; add tags and notes
2017-08-14 23:36:29 -05:00
* Powerful search modes (regex, substring...)
* Continuous search with on the fly mode switch
2016-12-30 04:35:12 -06:00
* Open bookmarks and search results in browser
2017-08-13 04:03:06 -05:00
* Manual encryption support
* Auto-import Firefox and Google Chrome bookmarks
* Import/export bookmarks from/to HTML or Markdown
2016-12-30 04:35:12 -06:00
* Shorten and expand URLs
2017-08-13 04:03:06 -05:00
* Smart tag management using redirection (>>, >, <<)
2016-12-30 04:35:12 -06:00
* Portable, merge-able database to sync between systems
2017-03-12 23:31:35 -05:00
* Multithreaded full DB refresh
2017-08-12 23:26:39 -05:00
* Shell completion scripts, man page with handy examples
2016-04-19 13:57:58 -05:00
.SH OPERATIONAL NOTES
2015-11-08 15:16:01 -06:00
.PP
2016-11-27 13:25:53 -06:00
.IP 1 . 4
The database file is stored in:
2016-06-16 10:43:16 -05:00
- \fI $XDG_DATA_HOME/buku/bookmarks.db\fR , if XDG_DATA_HOME is defined (first preference) or
- \fI $HOME/.local/share/buku/bookmarks.db\fR , if HOME is defined (second preference) or
2017-04-26 14:55:51 -05:00
- \fI %APPDATA%\b uku\b ookmarks.db\fR , if you are on Windows or
2017-05-28 09:21:19 -05:00
- \fI the current directory\fR .
2016-04-24 09:37:51 -05:00
.PP
2016-11-27 13:25:53 -06:00
.IP 2 . 4
2016-06-28 12:51:19 -05:00
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 ('/").
2015-11-08 15:16:01 -06:00
.PP
2016-11-27 13:25:53 -06:00
.IP 3 . 4
2016-10-11 02:39:58 -05:00
URLs are unique in DB. The same URL cannot be added twice.
2016-05-23 04:02:46 -05:00
.PP
2016-11-27 13:25:53 -06:00
.IP 4 . 4
2017-04-08 15:19:25 -05:00
Bookmarks with immutable titles are listed with '(L)' after the title.
2016-11-06 07:52:12 -06:00
.PP
2016-11-27 13:25:53 -06:00
.IP 5 . 4
\fB Tags\fR :
2016-11-20 00:22:28 -06:00
- 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-04-05 20:31:27 -05:00
- Folder names are converted to all-lowercase tags during bookmarks html import.
2017-01-03 19:19:18 -06:00
- Releases prior to v2.7 support both capital and lower cases in tags. From v2.7 all tags are stored in lowercase. An undocumented option --\fI fixtags\fR 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 \fB buku --fixtags\fR once.
2017-04-06 23:04:44 -05:00
- Tags can be edited from the prompt very easily using '>>' (append), '>' (overwrite) and '<<' (remove) symbols. The LHS of the operands denotes the indices and ranges of tags to apply (as listed by --tag or key 't' at prompt) and the RHS denotes the actual DB indices and ranges of the bookmarks to apply the change to.
2016-05-29 04:04:26 -05:00
.PP
2016-11-27 13:25:53 -06:00
.IP 6 . 4
\fB Update\fR operation:
2016-11-05 17:32:03 -05:00
- 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.
- 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-08 22:22:22 -06:00
- Can update bookmarks matching a search, when combined with any of the search options and no arguments to update are passed.
2016-11-05 17:32:03 -05:00
.PP
2016-11-27 13:25:53 -06:00
.IP 7 . 4
\fB Delete\fR operation:
2016-06-16 16:08:38 -05:00
- When a record is deleted, the last record is moved to the index.
2016-06-17 00:25:24 -05:00
- 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-08 22:22:22 -06:00
- Can delete bookmarks matching a search, when combined with any of the search options and no arguments to delete are passed.
2016-06-16 16:08:38 -05:00
.PP
2016-11-27 13:25:53 -06:00
.IP 8 . 4
\fB Search\fR works in mysterious ways:
2016-04-19 14:08:39 -05:00
- Case-insensitive.
2016-12-05 20:00:01 -06:00
- Matches words in URL, title and tags.
2017-01-29 07:49:47 -06:00
- --sany : match any of the keywords in URL, title or tags. Default search option.
2016-10-22 01:42:11 -05:00
- --sall : match all the keywords in URL, title or tags.
2016-09-05 10:09:20 -05:00
- --deep : match \fB substrings\fR (`match` matches `rematched`) in URL, title and tags.
2016-10-21 06:45:10 -05:00
- --sreg : match a regular expression (ignores --deep).
2017-08-14 16:07:01 -05:00
- --stag : search bookmarks by tags, or list all tags alphabetically with usage count (if no arguments). Delimit the list of tags in the query with `,` to search for bookmarks that match ANY of the listed tags. Delimit tags with `+` to search for bookmarks that match ALL of the listed tags. Note that `,` and `+` cannot be used together in the same search. Exclude bookmarks matching certain tags from the results by using ` - ` followed by the tags. Note that the ` - ` operator and the ` + ` delimiter must be space separated: ` - ` instead of `-` and ` + ` instead of `+`. This is to distinguish them from hyphenated tags (e.g., `some-tag-name`) and tags with '+'s (e.g., `some+tag+name`).
2017-04-08 15:19:25 -05:00
- Search results are indexed serially. This index is different from actual database index of a bookmark record which is shown within '[]' after the title.
2015-12-19 12:15:22 -06:00
.PP
2016-11-27 13:25:53 -06:00
.IP 9 . 4
2017-07-18 00:09:58 -05:00
\fB Import\fR :
2017-08-14 23:36:29 -05:00
- Auto-import looks in the default installation path and default user profile.
2017-07-18 09:35:08 -05:00
- URLs starting with `place:`, `file://` and `apt:` are ignored during import.
2017-07-19 23:44:37 -05:00
- Folder names are automatically imported as tags if --tacit is used.
2017-09-16 22:03:06 -05:00
- An auto-generated tag in the format 'YYYYMonDD' is added if --tacit is not used in html or markdown import.
2016-11-18 08:34:37 -06:00
.PP
2016-11-27 13:25:53 -06:00
.IP 10 . 4
2017-07-18 00:09:58 -05:00
\fB Encryption\fR is optional and manual. AES256 algorithm is used. To use encryption, the database file should be unlocked (-k) before using \fB buku\fR 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 \fB unencrypted on creation\fR .
.PP
.IP 11 . 4
2017-02-04 08:45:33 -06:00
\fB Editor\fR support:
2017-02-07 12:03:51 -06:00
- A single bookmark can be edited before adding. The editor can be set using the environment variable *EDITOR* or by explicitly specifying the editor. The latter takes precedence. If -a is used along with -w, the details are populated in the editor template.
- In case of edit and update (a single bookmark), the existing record details are fetched from DB and populated in the editor template. The environment variable EDITOR must be set. Note that -u works independently of -w.
- All lines beginning with "#" will be stripped. Then line 1 will be treated as the URL, line 2 will be the title, line 3 will be comma separated tags, and the rest of the lines will be parsed as descriptions.
2017-02-04 08:45:33 -06:00
.PP
2017-07-18 00:09:58 -05:00
.IP 12 . 4
2016-12-03 11:24:14 -06:00
\fB Proxy\fR support: please refer to the \fB ENVIRONMENT\fR section.
2016-04-22 12:01:17 -05:00
.SH GENERAL OPTIONS
2015-11-08 13:31:07 -06:00
.TP
2016-11-14 12:37:22 -06:00
.BI \- a " " \- -add " URL [tag, ...]"
2015-11-08 15:16:01 -06:00
Bookmark
.I URL
2016-05-18 22:24:46 -05:00
along with comma-separated tags. A tag can have multiple words.
2015-11-08 13:31:07 -06:00
.TP
2016-09-09 07:17:51 -05:00
.BI \- u " " \- -update " [...]"
2017-01-08 22:22:22 -06:00
Update fields of the bookmarks at specified indices in DB. If no arguments are specified, all titles are refreshed from the web. Works with update modifiers for the fields url, title, tag and comment. If only indices are passed without any edit options, titles are fetched and updated (if not empty). Accepts hyphenated ranges and space-separated indices. Updates search results when used with search options, if no arguments.
2016-05-20 13:26:01 -05:00
.TP
2017-02-11 00:03:29 -06:00
.BI \- w " " \- -write " [editor|index]"
Edit a bookmark in
.I editor
before adding it. To edit and update an existing bookmark, the
.I index
2017-10-08 14:51:13 -05:00
should be passed. However, in this case the environment variable EDITOR must be set. The last record is opened in EDITOR if index=-1.
2017-02-11 00:03:29 -06:00
.TP
2016-06-16 16:08:38 -05:00
.BI \- d " " \- -delete " [...]"
2017-01-08 22:22:22 -06:00
Delete bookmarks. Accepts space-separated list of indices (e.g. 5 6 23 4 110 45) or a single hyphenated range (e.g. 100-200). Note that range and list don't work together. Deletes search results when combined with search options, if no arguments.
2016-05-20 13:46:44 -05:00
.TP
2017-01-09 18:56:24 -06:00
.BI \- v " " \- -version
Show program version and exit.
.TP
2016-05-21 12:29:41 -05:00
.BI \- h " " \- -help
2016-05-31 00:53:01 -05:00
Show program help and exit.
2016-05-21 12:29:41 -05:00
.SH EDIT OPTIONS
.TP
2016-05-20 13:26:01 -05:00
.BI \- -url " [...]"
2016-10-22 01:42:11 -05:00
Specify the URL, works with --update only. Fetches and updates title if --title is not used.
2016-05-20 13:26:01 -05:00
.TP
2016-07-03 16:50:44 -05:00
.BI \- -tag " [+|-] [...]"
2016-10-22 01:42:11 -05:00
Specify comma separated tags, works with --add, --update. Clears the tags, if no arguments passed. Appends or deletes tags, if list of tags is preceded by '+' or '-' respectively.
2016-03-16 13:03:15 -05:00
.TP
2017-03-16 13:15:37 -05:00
.BI \- -title " [...]"
2016-10-22 01:42:11 -05:00
Manually specify the title, works with --add, --update. Omits or clears the title, if no arguments passed.
2016-05-17 15:11:31 -05:00
.TP
.BI \- c " " \- -comment " [...]"
2017-03-16 22:05:27 -05:00
Add notes or description of the bookmark, works with --add, --update. Clears the comment, if no arguments passed.
2016-11-05 17:32:03 -05:00
.TP
.BI \- -immutable " N"
Set the title of a bookmark immutable during updates. Works with --add, --update. N=1 sets the immutable flag, N=0 removes it. If omitted, bookmarks are added with N=0.
2016-04-30 23:33:21 -05:00
.SH SEARCH OPTIONS
2016-04-22 12:01:17 -05:00
.TP
2016-04-30 23:33:21 -05:00
.BI \- s " " \- -sany " keyword [...]"
2017-04-08 15:19:25 -05:00
Search bookmarks with ANY of the keyword(s) in URL, title or tags and show the results. Prompts to enter result number to open in browser. Note that the sequential result index is not the DB index. The DB index is shown within '[]' after the title.
2017-01-29 07:49:47 -06:00
.br
This is the default search option for positional arguments if no other search option is specified.
2015-11-10 05:20:30 -06:00
.TP
2016-04-30 23:33:21 -05:00
.BI \- S " " \- -sall " keyword [...]"
2016-10-22 01:42:11 -05:00
Search bookmarks with ALL keywords in URL, title or tags and show the results. Behaviour same as --sany.
2016-04-30 23:33:21 -05:00
.br
2016-11-06 08:41:45 -06:00
Special keywords:
2016-04-30 23:33:21 -05:00
.br
"blank": list entries with empty title/tag
2016-11-06 08:41:45 -06:00
.br
"immutable": list entries with locked title
.br
NOTE: To search the keywords, use --sany
2016-05-18 11:06:54 -05:00
.TP
2016-09-05 10:09:20 -05:00
.BI \- -deep
2016-10-22 01:42:11 -05:00
Search modifier to match substrings. Works with --sany, --sall.
2016-09-05 03:29:29 -05:00
.TP
2017-03-16 13:45:12 -05:00
.BI \- r " " \- -sreg " expression"
2016-12-18 08:25:35 -06:00
Scan for a regular expression match.
.TP
2017-08-14 16:07:01 -05:00
.BI \- t " " \- -stag " [tag [,|+] ...] [\- tag, ...]"
Search bookmarks by tags.
.br
Use ',' delimiter to find entries matching ANY of the tags
.br
Use ' + ' delimiter to find entries matching ALL of the tags. (Note that the ' + ' delimiter must be space separated)
.br
NOTE: Cannot combine ',' and '+' in the same search
.br
Use ' - ' to exclude bookmarks that match the tags that follow. (Note that the '-' operator must be space separated).
.br
List all tags alphabetically, if no arguments. The usage count (number of bookmarks having the tag) is shown within first brackets.
2016-04-30 23:33:21 -05:00
.SH ENCRYPTION OPTIONS
2016-03-23 07:23:35 -05:00
.TP
2016-04-30 23:33:21 -05:00
.BI \- l " " \- -lock " [N]"
Encrypt (lock) the DB file with
.I N
2016-06-28 12:51:19 -05:00
(> 0, default 8) hash passes to generate key.
2015-12-19 12:15:22 -06:00
.TP
2016-04-30 23:33:21 -05:00
.BI \- k " " \- -unlock " [N]"
Decrypt (unlock) the DB file with
.I N
2016-06-28 12:51:19 -05:00
(> 0, default 8) hash passes to generate key.
2016-04-30 23:33:21 -05:00
.SH POWER OPTIONS
2015-12-19 12:15:22 -06:00
.TP
2017-08-13 04:03:06 -05:00
.BI \- -ai
Auto-import bookmarks from Firefox and Google Chrome.
.TP
2016-09-10 00:57:22 -05:00
.BI \- e " " \- -export " file"
2017-02-11 00:03:29 -06:00
Export bookmarks to Firefox bookmarks formatted HTML. Works with --tag to export only specific tags. Markdown is used if
.I file
has extension '.md'.
2017-02-10 10:39:02 -06:00
.br
2017-09-17 01:23:18 -05:00
Markdown format: [title](url), 1 entry per line. A buku database is generated if
.I file
has extension '.db'.
2016-09-10 00:57:22 -05:00
.TP
.BI \- i " " \- -import " file"
2017-02-11 00:03:29 -06:00
Import bookmarks exported from Firefox or Google Chrome as HTML.
.I file
2017-09-16 22:03:06 -05:00
is considered Markdown (compliant with --export format) if it has '.md' extension or another buku database if the extension is '.db'.
2016-09-10 00:57:22 -05:00
.TP
2016-10-11 11:45:07 -05:00
.BI \- p " " \- -print " [...]"
2017-03-18 14:15:26 -05:00
Show details (DB index, URL, title, tags and comment) of bookmark record by DB index. If no arguments, all records with actual index from DB are shown. Accepts hyphenated ranges and space-separated indices. A negative value (introduced for convenience) behaves like the tail utility, e.g., -n shows the details of the last n bookmarks.
2015-11-08 13:31:07 -06:00
.TP
2016-04-30 23:33:21 -05:00
.BI \- f " " \- -format " N"
2016-11-20 11:37:04 -06:00
Show selective monochrome output with specific fields. Works with --print. Search results honour the option when used along with --json. Useful for creating batch scripts.
2016-04-30 23:33:21 -05:00
.br
2015-11-10 05:20:30 -06:00
.I N
2016-10-11 01:08:03 -05:00
= 1, show only URL.
2016-04-30 23:33:21 -05:00
.br
2016-04-20 10:09:18 -05:00
.I N
2016-10-11 01:08:03 -05:00
= 2, show URL and tags in a single line.
.br
.I N
= 3, show only title.
2017-05-03 14:33:45 -05:00
.br
.I N
= 4, show URL, title and tags in a single line
2017-09-23 12:01:37 -05:00
.br
To omit DB index from printed results, use N0, e.g., 10, 20, 30, 40.
2015-11-08 13:31:07 -06:00
.TP
2016-05-15 04:41:37 -05:00
.BI \- j " " \- -json
2016-11-07 11:35:02 -06:00
Output data formatted as json, works with --print output and search results.
2015-12-22 12:33:22 -06:00
.TP
2017-08-22 17:09:43 -05:00
.BI \- -colors " COLORS"
Set output colors. Refer to the \fB COLORS\fR section below for details.
.TP
2017-02-10 07:55:05 -06:00
.BI \- -nc
2017-01-03 18:43:47 -06:00
Disable color output in all messages. Useful on terminals which can't handle ANSI color codes or scripted environments.
.TP
2017-02-10 07:59:02 -06:00
.BI \- -np
2016-05-28 08:36:09 -05:00
Do not show the prompt, run and exit.
.TP
2016-12-30 12:59:57 -06:00
.BI \- o " " \- -open " [...]"
Open bookmarks by DB indices or ranges in browser. Open a random index if argument is omitted.
2015-11-08 13:31:07 -06:00
.TP
2017-02-04 21:40:38 -06:00
.BI \- -oa
2017-02-10 07:59:02 -06:00
Open all search results immediately in the browser. Works best with --np. When used along with --update or --delete, URLs are opened in the browser first and then modified or deleted.
2017-02-04 21:40:38 -06:00
.TP
2017-03-16 22:05:27 -05:00
.BI \- -replace " old new"
Replace
.I old
tag with
.I new
tag if both are passed; delete
.I old
tag if
.I new
tag is not specified.
.TP
2017-02-11 00:03:29 -06:00
.BI \- -shorten " index|URL"
Shorten the URL at DB
.I index
2016-11-12 09:47:36 -06:00
or an independent
.I URL
using the tny.im URL shortener service.
.TP
2017-02-11 00:03:29 -06:00
.BI \- -expand " index|URL"
Expand the URL at DB
.I index
2016-12-10 02:35:17 -06:00
or an independent
.I URL
shortened using tny.im.
.TP
2017-08-01 10:37:03 -05:00
.BI \- -suggest
Show a list of similar tags to choose from when adding a new bookmark.
.TP
2016-11-06 09:30:45 -06:00
.BI \- -tacit
Show lesser output. Reduces the verbosity of certain operations like add, update etc.
.TP
2016-12-03 07:20:53 -06:00
.BI \- -threads
Maximum number of parallel network connection threads to use during full DB refresh. By default 4 connections are spawned.
.I N
can range from 1 to 10.
.TP
2017-02-10 09:04:24 -06:00
.BI \- V
2016-10-23 13:11:31 -05:00
Check the latest upstream version available. This is FYI. It is possible the latest upstream released version is still not available in your package manager as the process takes a while.
.TP
2016-04-30 23:33:21 -05:00
.BI \- z " " \- -debug
Show debug information and additional logs.
2016-04-23 00:25:26 -05:00
.SH PROMPT KEYS
2015-11-08 13:31:07 -06:00
.TP
.BI "1-N"
2016-11-14 10:14:23 -06:00
Browse search results by indices and ranges.
2016-04-19 10:46:19 -05:00
.TP
2016-11-14 10:14:23 -06:00
.BI "a"
Open all search results in browser.
.TP
.BI "s" " keyword [...]"
Search for records with ANY keyword.
.TP
.BI "S" " keyword [...]"
Search for records with ALL keywords.
.TP
.BI "d"
Toggle deep search to match substrings ('pen' matches 'opened').
.TP
.BI "r" " expression"
Run a regular expression search.
.TP
.BI "t" " [...]"
2017-08-13 04:03:06 -05:00
Search bookmarks by a tag. List all tags alphabetically, if no arguments. The index of a tag from the tag list can be used to search all bookmarks having the tag. Note that multiple indices and/or ranges do not work with this key.
2016-11-14 10:14:23 -06:00
.TP
2017-08-13 04:03:06 -05:00
.BI "o" " id|range [...]"
2017-05-01 11:16:37 -05:00
Browse bookmarks by indices and/or ranges.
.TP
2017-08-13 04:03:06 -05:00
.BI "p" " id|range [...]"
2017-04-06 15:18:16 -05:00
Print bookmarks by indices and/or ranges.
.TP
2017-08-13 04:03:06 -05:00
.BI "g" " [taglist id|range ...] [>>|>|<<] record id|range [...]"
Append, set, remove specific or all tags by indices and/or ranges to bookmark indices and/or ranges (see \fB EXAMPLES\fR section below).
.TP
.BI "w" " [editor|id]"
2017-03-12 09:41:53 -05:00
Edit and add or update a bookmark.
.TP
2016-11-14 10:14:23 -06:00
.BI "?"
Show help on prompt keys.
.TP
.BI "q, ^D, double Enter"
2016-04-19 10:46:19 -05:00
Exit buku.
2015-11-08 13:31:07 -06:00
.SH ENVIRONMENT
.TP
2017-03-12 23:31:35 -05:00
.BI "Completion scripts"
Shell completion scripts for Bash, Fish and Zsh can be found in:
.br
.I https://github.com/jarun/Buku/blob/master/auto-completion
.TP
2015-11-08 13:31:07 -06:00
.BI BROWSER
2016-11-27 13:25:53 -06:00
Overrides the default browser. Refer to:
.br
2015-11-08 13:31:07 -06:00
.I http://docs.python.org/library/webbrowser.html
2016-11-16 18:11:08 -06:00
.TP
2017-02-04 08:45:33 -06:00
.BI EDITOR
If defined, will be used as the editor to edit bookmarks with option --write.
.TP
2016-11-18 08:34:37 -06:00
.BI https_proxy
If defined, will be used to access http and https resources through the configured proxy. Supported format:
2016-11-16 18:11:08 -06:00
2017-03-12 23:31:35 -05:00
http[s]://[username:password@]proxyhost:proxyport/
2016-11-27 13:25:53 -06:00
.TP
.BI "GUI integration"
.B buku
can be integrated in a GUI environment with simple tweaks. Refer to:
.br
.I https://github.com/jarun/Buku#gui-integration
2017-08-22 17:09:43 -05:00
.SH COLORS
\fB buku\fR allows you to customize the color scheme via a five-letter string, reminiscent of BSD \fB LSCOLORS\fR . The five letters represent the colors of
.IP - 2
2017-08-22 23:43:55 -05:00
index
2017-08-22 17:09:43 -05:00
.PD 0 \" Change paragraph spacing to 0 in the list
.IP - 2
2017-08-22 23:43:55 -05:00
title
2017-08-22 17:09:43 -05:00
.IP - 2
2017-08-24 16:30:45 -05:00
URL
2017-08-22 17:09:43 -05:00
.IP - 2
2017-08-24 16:30:45 -05:00
description/comment/note
2017-08-22 17:09:43 -05:00
.IP - 2
2017-08-22 23:43:55 -05:00
tag
2017-08-22 17:09:43 -05:00
.PD 1 \" Restore paragraph spacing
.TP
2017-08-24 16:30:45 -05:00
respectively. The five-letter string is passed is as the argument to the \fB --colors\fR option, or as the value of the environment variable \fB BUKU_COLORS\fR .
2017-08-22 17:09:43 -05:00
.TP
We offer the following colors/styles:
.TS
tab(;) box;
l|l
-|-
l|l.
Letter;Color/Style
a;black
b;red
c;green
d;yellow
e;blue
f;magenta
g;cyan
h;white
i;bright black
j;bright red
k;bright green
l;bright yellow
m;bright blue
n;bright magenta
o;bright cyan
p;bright white
A-H;bold version of the lowercase-letter color
I-P;bold version of the lowercase-letter bright color
x;normal
X;bold
y;reverse video
Y;bold reverse video
.TE
.TP
.TP
2017-08-24 15:59:39 -05:00
The default colors string is \fI oKlxm\fR , which stands for
2017-08-22 17:09:43 -05:00
.IP - 2
2017-08-24 15:59:39 -05:00
bright cyan index
2017-08-22 17:09:43 -05:00
.PD 0 \" Change paragraph spacing to 0 in the list
.IP - 2
bold bright green title
.IP - 2
2017-08-24 16:30:45 -05:00
bright yellow URL
2017-08-22 17:09:43 -05:00
.IP - 2
2017-08-24 16:30:45 -05:00
normal description
2017-08-22 17:09:43 -05:00
.IP - 2
2017-08-24 15:59:39 -05:00
bright blue tag
2017-08-22 17:09:43 -05:00
.PD 1 \" Restore paragraph spacing
.TP
Note that
.IP - 2
Bright colors (implemented as \\ x1b[90m - \\ x1b[97m) may not be available in all color-capable terminal emulators;
.IP - 2
Some terminal emulators draw bold text in bright colors instead;
.IP - 2
Some terminal emulators only distinguish between bold and bright colors via a default-off switch.
.TP
Please consult the manual of your terminal emulator as well as \fI https://en.wikipedia.org/wiki/ANSI_escape_code\fR for details.
2016-03-18 13:44:33 -05:00
.SH EXAMPLES
.PP
.IP 1 . 4
2017-02-05 11:05:45 -06:00
\fB Edit and add\fR a bookmark from editor:
2016-04-21 10:29:32 -05:00
.PP
.EX
.IP
2017-02-05 11:05:45 -06:00
.B buku -w
2017-08-20 23:01:27 -05:00
.br
2017-09-18 19:25:22 -05:00
.B buku -w 'gedit -w'
.br
2017-02-05 11:05:45 -06:00
.B buku -w 'macvim -f' -a https://ddg.gg search engine, privacy
2017-01-08 22:22:22 -06:00
.EE
.PP
.IP "" 4
2017-09-18 19:25:22 -05:00
The first command picks editor from the environment variable \fI EDITOR\fR . The second command opens gedit in blocking mode. The third command opens macvim with option -f and the URL and tags populated in template.
2016-04-21 10:29:32 -05:00
.PP
.IP 2 . 4
2017-02-05 11:05:45 -06:00
\fB Add\fR a bookmark with \fB tags\fR 'search engine' and 'privacy', \fB comment\fR 'Search engine with perks', \fB fetch page title\fR from the web:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2017-02-05 11:05:45 -06:00
.B buku -a https://ddg.gg search engine, privacy -c Search engine with perks
2016-03-18 13:44:33 -05:00
.EE
.PP
.IP "" 4
2017-04-08 15:19:25 -05:00
In the output, >: url, +: comment, #: tags.
2016-03-18 13:44:33 -05:00
.PP
2016-04-21 10:29:32 -05:00
.IP 3 . 4
2017-02-05 11:05:45 -06:00
\fB Add\fR a bookmark with tags 'search engine' & 'privacy' and \fB immutable custom title\fR 'DDG':
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2017-03-16 13:15:37 -05:00
.B buku -a https://ddg.gg search engine, privacy --title 'DDG' --immutable 1
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-02-05 11:05:45 -06:00
.IP "" 4
Note that URL must precede tags.
.PP
2016-04-21 10:29:32 -05:00
.IP 4 . 4
2017-02-05 11:05:45 -06:00
\fB Add\fR a bookmark \fB without a title\fR (works for update too):
2017-02-04 08:45:33 -06:00
.PP
.EX
.IP
2017-03-16 13:15:37 -05:00
.B buku -a https://ddg.gg search engine, privacy --title
2017-02-04 08:45:33 -06:00
.EE
.PP
.IP 5 . 4
2017-02-07 12:03:51 -06:00
\fB Edit and update\fR a bookmark from editor:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2017-02-07 12:03:51 -06:00
.B buku -w 15012014
2017-01-08 22:22:22 -06:00
.EE
2016-05-20 13:46:44 -05:00
.PP
2017-02-07 12:03:51 -06:00
.IP "" 4
This will open the existing bookmark's details in the editor for modifications. Environment variable \fI EDITOR\fR must be set.
.PP
2017-02-04 08:45:33 -06:00
.IP 6 . 4
2017-02-07 12:03:51 -06:00
\fB Update\fR existing bookmark at index 15012014 with new URL, tags and comments, fetch title from the web:
2016-05-20 13:46:44 -05:00
.PP
.EX
.IP
2017-02-07 12:03:51 -06:00
.B buku -u 15012014 --url http://ddg.gg/ --tag web search, utilities -c Private search engine
2017-01-08 22:22:22 -06:00
.EE
2016-05-20 13:46:44 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 7 . 4
2017-02-07 12:03:51 -06:00
\fB Fetch and update only title\fR for bookmark at 15012014:
2016-05-20 13:46:44 -05:00
.PP
.EX
.IP
2017-02-07 12:03:51 -06:00
.B buku -u 15012014
2016-03-19 12:57:37 -05:00
.EE
.PP
2017-02-04 08:45:33 -06:00
.IP 8 . 4
2017-02-07 12:03:51 -06:00
\fB Update only comment\fR for bookmark at 15012014:
2017-02-04 08:45:33 -06:00
.PP
.EX
.IP
2017-02-07 12:03:51 -06:00
.B buku -u 15012014 -c this is a new comment
2017-02-04 08:45:33 -06:00
.EE
.PP
.IP "" 4
2017-02-07 12:03:51 -06:00
Applies to --url, --title and --tag too.
2017-02-04 08:45:33 -06:00
.PP
.IP 9 . 4
2016-10-22 01:25:41 -05:00
\fB Export\fR bookmarks tagged 'tag 1' or 'tag 2' to HTML and markdown:
2016-09-20 13:02:04 -05:00
.PP
.EX
.IP
.B buku -e bookmarks.html --tag tag 1 , tag 2
2017-08-20 23:01:27 -05:00
.br
2017-02-10 10:39:02 -06:00
.B buku -e bookmarks.md --tag tag 1 , tag 2
2017-09-17 07:36:31 -05:00
.br
.B buku -e bookmarks.db --tag tag 1 , tag 2
2016-09-20 13:02:04 -05:00
.EE
.PP
.IP "" 4
All bookmarks are exported if --tag is not specified.
.PP
2017-02-04 08:45:33 -06:00
.IP 10 . 4
2016-10-22 01:25:41 -05:00
\fB Import\fR bookmarks from HTML and markdown:
2016-05-22 18:36:41 -05:00
.PP
.EX
.IP
.B buku -i bookmarks.html
2017-08-20 23:01:27 -05:00
.br
2017-02-10 10:39:02 -06:00
.B buku -i bookmarks.md
2017-09-17 07:36:31 -05:00
.br
.B buku -i bookmarks.db
2017-01-08 22:22:22 -06:00
.EE
2016-05-22 18:36:41 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 11 . 4
2016-05-20 13:46:44 -05:00
\fB Delete only comment\fR for bookmark at 15012014:
.PP
.EX
.IP
.B buku -u 15012014 -c
.EE
.PP
.IP "" 4
Applies to --title and --tag too. URL cannot be deleted without deleting the bookmark.
.PP
2017-02-04 08:45:33 -06:00
.IP 12 . 4
2016-04-21 10:37:11 -05:00
\fB Update\fR or refresh \fB full DB\fR with page titles from the web:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-04-30 23:33:21 -05:00
.B buku -u
2017-08-20 23:01:27 -05:00
.br
2016-11-08 11:32:45 -06:00
.B buku -u --tacit (show only failures and exceptions)
2016-03-19 12:57:37 -05:00
.EE
.PP
.IP "" 4
2016-05-20 13:26:01 -05:00
This operation does not modify the indexes, URLs, tags or comments. Only title is refreshed if fetched title is non-empty.
2016-03-18 13:44:33 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 13 . 4
2016-03-18 13:44:33 -05:00
\fB Delete\fR bookmark at index 15012014:
.PP
.EX
.IP
.B buku -d 15012014
2016-03-20 00:59:06 -05:00
.EE
.PP
.IP "" 4
The last index is moved to the deleted index to keep the DB compact.
2016-03-18 13:44:33 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 14 . 4
2016-03-18 13:44:33 -05:00
\fB Delete all\fR bookmarks:
.PP
.EX
.IP
2016-04-30 23:33:21 -05:00
.B buku -d
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 15 . 4
2016-06-16 16:08:38 -05:00
\fB Delete\fR a \fB range or list\fR of bookmarks:
.PP
.EX
.IP
2017-02-04 08:45:33 -06:00
.B buku -d 100 -200
2017-08-20 23:01:27 -05:00
.br
2017-02-04 08:45:33 -06:00
.B buku -d 100 15 200
2017-01-08 22:22:22 -06:00
.EE
2016-06-16 16:08:38 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 16 . 4
2016-05-01 03:55:32 -05:00
\fB Search\fR bookmarks for \fB ANY\fR of the keywords 'kernel' and 'debugging' in URL, title or tags:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2017-02-20 08:05:55 -06:00
.B buku kernel debugging
2017-08-20 23:01:27 -05:00
.br
2016-05-01 03:55:32 -05:00
.B buku -s kernel debugging
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 17 . 4
2016-05-01 03:55:32 -05:00
\fB Search\fR bookmarks with \fB ALL\fR the keywords 'kernel' and 'debugging' in URL, title or tags:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-05-01 03:55:32 -05:00
.B buku -S kernel debugging
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 18 . 4
2016-09-05 10:51:06 -05:00
\fB Search\fR bookmarks \fB tagged\fR 'general kernel concepts':
2016-03-19 11:20:14 -05:00
.PP
.EX
.IP
2016-11-07 11:35:02 -06:00
.B buku --stag general kernel concepts
2017-01-08 22:22:22 -06:00
.EE
2016-03-19 11:20:14 -05:00
.PP
2017-02-04 08:45:33 -06:00
.IP 19 . 4
2017-08-14 16:07:01 -05:00
\fB Search\fR for bookmarks matching \fB ANY\fR of the tags 'kernel', 'debugging', 'general kernel concepts':
.PP
.EX
.IP
.B buku --stag kernel, debugging, general kernel concepts
.EE
.PP
2017-09-02 06:57:56 -05:00
.IP 20 . 4
2017-08-14 16:07:01 -05:00
\fB Search\fR for bookmarks matching \fB ALL\fR of the tags 'kernel', 'debugging', 'general kernel concepts':
.PP
.EX
.IP
.B buku --stag kernel + debugging + general kernel concepts
.EE
.PP
2017-09-02 06:57:56 -05:00
.IP 21 . 4
2017-08-14 16:07:01 -05:00
\fB Search\fR for bookmarks matching both the tags `kernel` and `debugging`, but \fB excluding\fR bookmarks matching the tag 'general kernel concepts':
.PP
.EX
.IP
.B buku --stag kernel + debugging - general kernel concepts
2017-09-02 06:57:56 -05:00
.IP 22 . 4
2016-05-01 03:55:32 -05:00
List \fB all unique tags\fR alphabetically:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-11-07 11:35:02 -06:00
.B buku --stag
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 23 . 4
2017-01-08 22:22:22 -06:00
Run a \fB search and update\fR the results:
.PP
.EX
.IP
2017-03-16 22:05:27 -05:00
.B buku -s kernel debugging -u --tag + linux kernel
2017-01-08 22:22:22 -06:00
.EE
.PP
2017-08-14 16:07:01 -05:00
.IP 24 . 4
2016-11-26 08:28:22 -06:00
Run a \fB search and delete\fR the results:
.PP
.EX
.IP
.B buku -s kernel debugging -d
2017-01-08 22:22:22 -06:00
.EE
2016-11-26 08:28:22 -06:00
.PP
2017-08-14 16:07:01 -05:00
.IP 25 . 4
2016-05-01 03:55:32 -05:00
\fB Encrypt or decrypt\fR DB with \fB custom number of iterations\fR (15) to generate key:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-05-01 03:55:32 -05:00
.B buku -l 15
.br
.B buku -k 15
.EE
.PP
.IP "" 4
2016-09-05 10:51:06 -05:00
The same number of iterations must be specified for one lock & unlock instance. Default is 8, if omitted.
2016-03-18 13:44:33 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 26 . 4
2016-10-11 11:45:07 -05:00
\fB Show details\fR of bookmarks at index 15012014 and ranges 20-30, 40-50:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-10-11 11:45:07 -05:00
.B buku -p 20 -30 15012014 40 -50
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 27 . 4
2017-03-18 14:15:26 -05:00
Show details of the \fB last 10 bookmarks\fR :
.PP
.EX
.IP
.B buku -p -10
.EE
.PP
2017-08-14 16:07:01 -05:00
.IP 28 . 4
2016-05-01 03:55:32 -05:00
\fB Show all\fR bookmarks with real index from database:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-05-01 03:55:32 -05:00
.B buku -p
2017-08-20 23:01:27 -05:00
.br
2016-05-03 12:52:36 -05:00
.B buku -p | more
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 29 . 4
2016-05-01 03:55:32 -05:00
\fB Replace tag\fR 'old tag' with 'new tag':
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2017-03-16 22:05:27 -05:00
.B buku --replace 'old tag' 'new tag'
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 30 . 4
2016-05-01 03:55:32 -05:00
\fB Delete tag\fR 'old tag' from DB:
2016-04-19 12:30:06 -05:00
.PP
.EX
.IP
2017-03-16 13:37:51 -05:00
.B buku --replace 'old tag'
2017-01-08 22:22:22 -06:00
.EE
2016-03-18 13:44:33 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 31 . 4
2016-07-11 12:18:40 -05:00
\fB Append (or delete) tags\fR 'tag 1', 'tag 2' to (or from) existing tags of bookmark at index 15012014:
2016-06-12 05:48:10 -05:00
.PP
.EX
.IP
.B buku -u 15012014 --tag + tag 1 , tag 2
2017-08-20 23:01:27 -05:00
.br
2016-07-11 12:18:40 -05:00
.B buku -u 15012014 --tag - tag 1 , tag 2
2017-01-08 22:22:22 -06:00
.EE
2016-06-12 05:48:10 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 32 . 4
2016-05-01 03:55:32 -05:00
\fB Open URL\fR at index 15012014 in browser:
2016-03-18 13:44:33 -05:00
.PP
.EX
.IP
2016-05-01 03:55:32 -05:00
.B buku -o 15012014
2017-01-08 22:22:22 -06:00
.EE
2016-05-23 01:21:29 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 33 . 4
2016-11-12 09:47:36 -06:00
List bookmarks with \fB no title or tags\fR for bookkeeping:
2016-05-23 01:21:29 -05:00
.PP
.EX
.IP
.B buku -S blank
2017-01-08 22:22:22 -06:00
.EE
2016-11-06 08:41:45 -06:00
.PP
2017-08-14 16:07:01 -05:00
.IP 34 . 4
2016-11-12 09:47:36 -06:00
List bookmarks with \fB immutable title\fR :
2016-11-06 08:41:45 -06:00
.PP
.EX
.IP
.B buku -S immutable
2017-01-08 22:22:22 -06:00
.EE
2016-11-12 09:47:36 -06:00
.PP
2017-08-14 16:07:01 -05:00
.IP 35 . 4
2016-11-12 09:47:36 -06:00
\fB Shorten\fR the URL www.google.com and the URL at index 20:
.PP
.EX
.IP
.B buku --shorten www.google.com
2017-08-20 23:01:27 -05:00
.br
2016-11-12 09:47:36 -06:00
.B buku --shorten 20
2017-01-08 22:22:22 -06:00
.EE
2017-04-06 14:19:08 -05:00
.PP
2017-08-14 16:07:01 -05:00
.IP 36 . 4
2017-04-06 14:19:08 -05:00
\fB Append, remove tags at prompt\fR (taglist index to the left, bookmark index to the right):
.PP
.EX
.IP
// append tags at taglist indices 4 and 6-9 to existing tags in bookmarks at indices 5 and 2-3
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
.B buku (? for help) g 4 9 -6 >> 5 3 -2
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
// set tags at taglist indices 4 and 6-9 as tags in bookmarks at indices 5 and 2-3
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
.B buku (? for help) g 4 9 -6 > 5 3 -2
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
// remove all tags from bookmarks at indices 5 and 2-3
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
.B buku (? for help) g > 5 3 -2
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
// remove tags at taglist indices 4 and 6-9 from tags in bookmarks at indices 5 and 2-3
2017-08-20 23:01:27 -05:00
.br
2017-04-06 14:19:08 -05:00
.B buku (? for help) g 4 9 -6 << 5 3 -2
.EE
2017-08-22 17:09:43 -05:00
.PP
.IP 37 . 4
List bookmarks with \fB colored output\fR :
.PP
.EX
.IP
2017-08-24 15:59:39 -05:00
.B $ buku --colors oKlxm -p
2017-08-22 17:09:43 -05:00
.EE
.PP
2015-11-08 13:31:07 -06:00
.SH AUTHOR
2017-08-14 23:36:29 -05:00
Arun Prakash Jana <engineerarun@gmail.com>
2015-11-08 13:31:07 -06:00
.SH HOME
2016-08-13 14:31:35 -05:00
.I https://github.com/jarun/Buku
2017-08-14 23:36:29 -05:00
.SH WIKI
.I https://github.com/jarun/Buku/wiki
2015-11-08 13:31:07 -06:00
.SH REPORTING BUGS
2016-08-13 14:31:35 -05:00
.I https://github.com/jarun/Buku/issues
2016-05-02 12:22:26 -05:00
.SH LICENSE
2017-01-01 08:25:10 -06:00
Copyright \(co 2015-2017 Arun Prakash Jana <engineerarun@gmail.com>.
2015-11-08 13:31:07 -06:00
.PP
2016-05-02 12:22:26 -05:00
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.