README - bookmarks.sh - Simple bookmark manager
(HTM) hg clone https://bitbucket.org/iamleot/bookmarks.sh
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
README
---
1 bookmarks is a shell script to manage bookmarks files.
2 A bookmark file (by default ~/.bookmarks is used, but this can be adjusted
3 via ${BOOKMARKS} environment variable) is just a TSV (tab-separated values) file
4 with the following 4 fields:
5
6 - id
7 - URL
8 - tags `@tag` comma separated, e.g.: @tag0,@tag1,...,@tagn
9 - comment
10
11 Invoking bookmarks without any arguments prints out usage information, e.g.:
12
13 % bookmarks
14 usage: bookmarks command ...
15 bookmarks add id url [tags [comment]]
16 bookmarks delete id
17 bookmarks list
18 bookmarks search id|url|tag
19
20 To add a bookmark, e.g. `example`:
21
22 % bookmarks add example http://www.example.org/ @example 'Example Domain'
23
24 To delete a bookmark, e.g. `example`:
25
26 % bookmarks delete example
27
28 To list all bookmarks:
29
30 % bookmarks list
31 example http://www.example.org/ @example Example Domain
32
33 To search a bookmark:
34
35 % bookmarks search example # via id
36 example http://www.example.org/ @example Example Domain
37
38 % bookmarks search http://www.example.org/ # via URL
39 example http://www.example.org/ @example Example Domain
40
41 % bookmarks search @example # via tag
42 example http://www.example.org/ @example Example Domain
43
44 This format can also be used by `surfraw`. For more information about that
45 please give a look to the `Bookmarks` section of the surfraw(1) man page.
46
47 To export all bookmarks to vimb the following one liner can be used:
48
49 % bookmarks list |
50 awk -F '\t' '{ gsub(",", " ", $3); print $2 "\t" $4 "\t" $1 " " $3 }'
51
52 bookmarks needs a sed(1) implementation that supports the `-i` non-standard
53 option.