书签管理器就像一个基于文本的迷你网络。
buku的Python项目详细描述
布库
布库开始行动!
简介
buku
是一个用python3和sqlite3编写的强大书签管理器。当我开始编写它时,我找不到一个灵活的命令行解决方案,它有一个私有的、可移植的、可合并的数据库以及无缝的gui集成。因此,buku
(在我儿子的昵称之后,在我的语言中,意思是接近心脏的。
bukuserver在本地web主机服务器上显示可浏览的前端。
buku
可以从浏览器中自动导入书签,也可以从Web获取书签URL的标题和说明。您可以使用您喜爱的编辑器编写和更新书签。有多个搜索选项,包括regex和深度扫描模式(特别是对于url),它可以立即找到任何书签。buku
可以在回程机上查找断开链路的最新快照。还有一个复活节彩蛋可以重新访问随机遗忘的书签!buku太忙,无法跟踪您:没有隐藏的历史记录、过时的记录、使用情况分析或重设原点。
要立即开始,请跳到快速启动部分。我们有最好的文档之一。你也可以在手册页找到有用的例子。有关更多详细信息,请参阅操作说明中的wiki页面
有几个基于buku的项目,包括浏览器插件。
喜欢智能高效的公用事业?探索我的存储库。如果他们帮你,请给我买杯咖啡。
目录
功能
- 存储带有自动获取的标题、标记和说明的书签
- 从Firefox、Google Chrome和Chrome自动导入
- 在浏览器中打开书签和搜索结果
- 缩短、扩展URL、浏览缓存页FROM回程机
- 文本编辑器集成
- 轻巧、干净的界面、自定义颜色
- 强大的搜索选项(regex、substring…)
- 使用动态模式开关进行连续搜索
- 可移植、可合并的数据库,以便在系统之间进行同步
- 从/到HTML、标记或组织文件导入/导出书签
- 使用重定向的智能标记管理(>;、>;、<;)
- 多线程全数据库刷新,手动加密支持
- Shell完成脚本,手册页,附带方便的示例
安装
依赖关系
<表><广告>要使用pip3安装包依赖项,请运行:
# pip3 install certifi urllib3 cryptography beautifulsoup4
或者在ubuntu上:
# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
要在提示下将URL复制到剪贴板,请在Linux上使用xsel
(或x clip
)、在OS X上使用pbcopy
(默认安装)、在Windows上使用clip
(默认安装)、在TermUX(Android终端模拟)上使用TermUX剪贴板
。如果X11丢失,则会识别GNU屏幕或TMUX复制粘贴缓冲区。
来自包管理器
- aur(
yay-s buku
) - debian(
apt get install buku
) - Fedora(
dnf install buku
) - freebsd(
pkg安装www/py-buku
) - gentoo(
emerge buku
) - MacOS/Homebrew(
brew安装buku
) - nixos(
nix env-i buku
) - openbsd(
pkg_add buku
) - opensuse(
zypper in python3 buku
) - pypi(
pip3安装buku
) - raspbian测试(
apt get install buku
) - Slackware(
slackpkg install buku
) - termux(
pip3安装buku
) - ubuntu(
apt get install buku
) - void linux(
xbps install-s buku
)
发布包
yay-s buku
)apt get install buku
)dnf install buku
)pkg安装www/py-buku
)emerge buku
)brew安装buku
)nix env-i buku
)pkg_add buku
)zypper in python3 buku
)pip3安装buku
)apt get install buku
)slackpkg install buku
)pip3安装buku
)apt get install buku
)xbps install-s buku
)arch-linux、centos、debian、fedora、opensuse-leap和ubuntu的软件包可通过最新稳定版本获得。
注意:CentOS在回购协议中可能没有python3-beautifulsoup4包。使用PIP3安装。
源代码
如果安装了git,请克隆此存储库。否则,请下载最新稳定版本ve/master.zip" rel="nofollow">开发版本(有风险)。
安装到默认位置(/usr/local
):
$ sudo make install
要删除,请运行:
$ sudo make uninstall
支持前缀
,以防您要安装到其他位置。
独立运行
buku
是一个独立的实用程序。从包含目录中,运行:
$ chmod +x buku
$ ./buku
外壳完成
bash、fish和zsh的shell完成脚本可以在自动完成/的相应子目录中找到。有关安装说明,请参阅您的外壳手册。
用法
命令行选项
usage: buku [OPTIONS] [KEYWORD [KEYWORD ...]]
Bookmark manager like a text-based mini-web.
POSITIONAL ARGUMENTS:
KEYWORD search keywords
GENERAL OPTIONS:
-a, --add URL [tag, ...]
bookmark URL with comma-separated tags
-u, --update [...] update fields of an existing bookmark
accepts indices and ranges
refresh title and desc if no edit options
if no arguments:
- update results when used with search
- otherwise refresh all titles and desc
-w, --write [editor|index]
open editor to edit a fresh bookmark
edit last bookmark, if index=-1
to specify index, EDITOR must be set
-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
-h, --help show this information and exit
-v, --version show the program version and exit
EDIT OPTIONS:
--url keyword bookmark link
--tag [+|-] [...] comma-separated tags
clear bookmark tagset, if no arguments
'+' appends to, '-' removes from tagset
--title [...] bookmark title; if no arguments:
-a: do not set title, -u: clear title
-c, --comment [...] notes or description of the bookmark
clears description, if no arguments
--immutable N disable web-fetch during auto-refresh
N=0: mutable (default), N=1: immutable
SEARCH OPTIONS:
-s, --sany [...] find records with ANY matching keyword
this is the default search option
-S, --sall [...] find records matching ALL the keywords
special keywords -
"blank": entries with empty title/tag
"immutable": entries with locked title
--deep match substrings ('pen' matches 'opens')
-r, --sreg expr run a regex search
-t, --stag [tag [,|+] ...] [- tag, ...]
search bookmarks by tags
use ',' to find entries matching ANY tag
use '+' to find entries matching ALL tags
excludes entries with tags after ' - '
list all tags, if no search keywords
-x, --exclude [...] omit records matching specified keywords
ENCRYPTION OPTIONS:
-l, --lock [N] encrypt DB in N (default 8) # iterations
-k, --unlock [N] decrypt DB in N (default 8) # iterations
POWER TOYS:
--ai auto-import from Firefox/Chrome/Chromium
-e, --export file export bookmarks to Firefox format HTML
export Markdown, if file ends with '.md'
format: [title](url), 1 entry per line
export Orgfile, if file ends with '.org'
format: *[[url][title]], 1 entry per line
export buku DB, if file ends with '.db'
combines with search results, if opted
-i, --import file import bookmarks based on file extension
supports 'html', 'json', 'md', 'org', 'db'
-p, --print [...] show record details by indices, ranges
print all bookmarks, if no arguments
-n shows the last n results (like tail)
-f, --format N limit fields in -p or JSON search output
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
-j, --json JSON formatted output for -p and search
--colors COLORS set output colors in five-letter string
--nc disable color output
-n, --count N show N results per page (default 10)
--np do not show the prompt, run and exit
-o, --open [...] browse bookmarks by indices and ranges
open a random bookmark, if no arguments
--oa browse all search results immediately
--replace old new replace old tag with new tag everywhere
delete old tag, if new tag not specified
--shorten index|URL fetch shortened url from tny.im service
--expand index|URL expand a tny.im shortened url
--cached index|URL browse a cached page from Wayback Machine
--suggest show similar tags when adding bookmarks
--tacit reduce verbosity
--threads N max network connections in full refresh
default N=4, min N=1, max N=10
-V check latest upstream version available
-z, --debug show debug information and verbose logs
SYMBOLS:
> url
+ comment
# tags
PROMPT KEYS:
1-N browse search result indices and/or ranges
O [id|range [...]] open search results/indices in GUI browser
toggle try GUI browser if no arguments
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
t [tag, ...] search by tags; show taglist, if no args
g taglist id|range [...] [>>|>|<<] [record id|range ...]
append, set, remove (all or specific) tags
search by taglist id(s) if records are omitted
n show next page of search results
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
c id copy url at search result index to clipboard
? show this help
q, ^D, double Enter exit buku
颜色
usage: buku [OPTIONS] [KEYWORD [KEYWORD ...]]
Bookmark manager like a text-based mini-web.
POSITIONAL ARGUMENTS:
KEYWORD search keywords
GENERAL OPTIONS:
-a, --add URL [tag, ...]
bookmark URL with comma-separated tags
-u, --update [...] update fields of an existing bookmark
accepts indices and ranges
refresh title and desc if no edit options
if no arguments:
- update results when used with search
- otherwise refresh all titles and desc
-w, --write [editor|index]
open editor to edit a fresh bookmark
edit last bookmark, if index=-1
to specify index, EDITOR must be set
-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
-h, --help show this information and exit
-v, --version show the program version and exit
EDIT OPTIONS:
--url keyword bookmark link
--tag [+|-] [...] comma-separated tags
clear bookmark tagset, if no arguments
'+' appends to, '-' removes from tagset
--title [...] bookmark title; if no arguments:
-a: do not set title, -u: clear title
-c, --comment [...] notes or description of the bookmark
clears description, if no arguments
--immutable N disable web-fetch during auto-refresh
N=0: mutable (default), N=1: immutable
SEARCH OPTIONS:
-s, --sany [...] find records with ANY matching keyword
this is the default search option
-S, --sall [...] find records matching ALL the keywords
special keywords -
"blank": entries with empty title/tag
"immutable": entries with locked title
--deep match substrings ('pen' matches 'opens')
-r, --sreg expr run a regex search
-t, --stag [tag [,|+] ...] [- tag, ...]
search bookmarks by tags
use ',' to find entries matching ANY tag
use '+' to find entries matching ALL tags
excludes entries with tags after ' - '
list all tags, if no search keywords
-x, --exclude [...] omit records matching specified keywords
ENCRYPTION OPTIONS:
-l, --lock [N] encrypt DB in N (default 8) # iterations
-k, --unlock [N] decrypt DB in N (default 8) # iterations
POWER TOYS:
--ai auto-import from Firefox/Chrome/Chromium
-e, --export file export bookmarks to Firefox format HTML
export Markdown, if file ends with '.md'
format: [title](url), 1 entry per line
export Orgfile, if file ends with '.org'
format: *[[url][title]], 1 entry per line
export buku DB, if file ends with '.db'
combines with search results, if opted
-i, --import file import bookmarks based on file extension
supports 'html', 'json', 'md', 'org', 'db'
-p, --print [...] show record details by indices, ranges
print all bookmarks, if no arguments
-n shows the last n results (like tail)
-f, --format N limit fields in -p or JSON search output
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
-j, --json JSON formatted output for -p and search
--colors COLORS set output colors in five-letter string
--nc disable color output
-n, --count N show N results per page (default 10)
--np do not show the prompt, run and exit
-o, --open [...] browse bookmarks by indices and ranges
open a random bookmark, if no arguments
--oa browse all search results immediately
--replace old new replace old tag with new tag everywhere
delete old tag, if new tag not specified
--shorten index|URL fetch shortened url from tny.im service
--expand index|URL expand a tny.im shortened url
--cached index|URL browse a cached page from Wayback Machine
--suggest show similar tags when adding bookmarks
--tacit reduce verbosity
--threads N max network connections in full refresh
default N=4, min N=1, max N=10
-V check latest upstream version available
-z, --debug show debug information and verbose logs
SYMBOLS:
> url
+ comment
# tags
PROMPT KEYS:
1-N browse search result indices and/or ranges
O [id|range [...]] open search results/indices in GUI browser
toggle try GUI browser if no arguments
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
t [tag, ...] search by tags; show taglist, if no args
g taglist id|range [...] [>>|>|<<] [record id|range ...]
append, set, remove (all or specific) tags
search by taglist id(s) if records are omitted
n show next page of search results
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
c id copy url at search result index to clipboard
? show this help
q, ^D, double Enter exit buku
buku
支持自定义颜色。有关如何自定义颜色的详细信息,请访问wiki页面。
快速启动
导出
visual
或editor
以指向您喜爱的编辑器。注意visual
优先于editor
创造一个更甜蜜的快捷方式和一些方便。
alias b='buku --suggest'
从浏览器自动导入书签。请提前退出相关浏览器,以确保数据库未被锁定。
b --ai
手动添加书签(用于实际操作)。
b -w
用数据库索引列出书签。
0# pip3 install certifi urllib3 cryptography beautifulsoup4
有关图形用户界面和浏览器集成(或将书签与您喜爱的书签管理服务同步),请参阅系统集成上的wiki页面。
< > >编辑并添加来自编辑器的书签:
1# pip3 install certifi urllib3 cryptography beautifulsoup4
第一个命令从环境变量
editor
中选择editor。第二个命令以阻塞模式打开gedit。第三个命令打开带有选项-f和模板中填充的url和标记的macvim。添加带有标记的书签
搜索引擎
和
隐私
,评论
有优惠的搜索引擎
,从网站获取页面标题
2# pip3 install certifi urllib3 cryptography beautifulsoup4
其中,>;:url,+:comment,:标记
添加带有标签的书签
搜索引擎
&;
隐私
和不可变的自定义标题
ddg
:
3# pip3 install certifi urllib3 cryptography beautifulsoup4
请注意,URL必须位于标记之前。
添加不带标题的书签(也适用于更新):
4# pip3 install certifi urllib3 cryptography beautifulsoup4
编辑和更新来自编辑器的书签:
5# pip3 install certifi urllib3 cryptography beautifulsoup4
这将在编辑器中打开现有书签的详细信息进行修改。必须设置环境变量"编辑器"。
更新索引15012014处的现有书签,添加新的URL、标记和注释,从网站获取标题:
6# pip3 install certifi urllib3 cryptography beautifulsoup4
仅获取和更新标题用于15012014的书签:
7# pip3 install certifi urllib3 cryptography beautifulsoup4
仅更新注释用于15012014的书签:
8# pip3 install certifi urllib3 cryptography beautifulsoup4
也适用于--url、--title和--tag。
导出标记为
标记1的书签
或标记2的书签
到HTML、标记、组织文件或新数据库:
9# pip3 install certifi urllib3 cryptography beautifulsoup4
如果不选择搜索,则导出所有书签。
从html、markdown或orgfile导入书签:
0# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
仅删除注释用于15012014的书签:
1# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
也适用于--title和--tag。如果不删除书签,则无法删除URL。
使用网页标题更新或刷新整个数据库
2# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
此操作可以更新标题或说明n个字段的非不变书签通过解析获取的页面。仅当获取的字段为非空时,才会更新字段。标签保持不变。
删除索引15012014处的书签:
3# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
最后一个索引移动到已删除的索引以保持数据库的紧凑。
全部删除书签:
4# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
删除书签的范围或列表:
5# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
在URL、标题或标记中搜索
kernel
和debugging
关键字的任何书签:
6# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
在url、title或tags中搜索带有all关键字
kernel
和调试的书签:
7# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
搜索书签标记
一般内核概念
:
8# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
搜索与任何标记匹配的书签
kernel
,debugging
,general kernel concepts
:
9# apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
搜索与所有标记匹配的书签
内核
,
调试
,
一般内核概念
:
0$ sudo make install
搜索匹配任何关键字
hello
或world
的书签,不包括关键字real
和life
,同时匹配标记kernel
和调试
,但是排除标签一般内核概念
和
书籍
:
1$ sudo make install
按字母顺序列出所有唯一的标记
2$ sudo make install
运行搜索并更新结果:
3$ sudo make install
运行搜索并删除结果:
4$ sudo make install
使用自定义迭代次数(15)加密或解密数据库以生成密钥:
5$ sudo make install
必须为一个锁定和解锁实例指定相同的迭代次数。如果省略,默认值为8。
显示索引15012014处书签的详细信息,范围为20-30、40-50:
6$ sudo make install
显示最近10个书签的详细信息
7$ sudo make install
全部显示带有数据库中真实索引的书签:
8$ sudo make install
用"新标记"替换"旧标记":
9$ sudo make install
从数据库中删除标记"旧标记":
0$ sudo make uninstall
在索引15012014处的书签的现有标记上附加(或删除)标记"标记1"、"标记2":
1$ sudo make uninstall
在浏览器中打开索引15012014处的url:
2$ sudo make uninstall
列出不带标题或标记的书签以进行记帐:
3$ sudo make uninstall
列出标题不可变的书签
4$ sudo make uninstall
缩短urlwww.google.com和索引20处的url:
5$ sudo make uninstall
提示时追加、删除标记(标记列表索引在左侧,书签索引在右侧):
6$ sudo make uninstall
列出带有彩色输出的书签
7$ sudo make uninstall
更多帮助
8$ sudo make uninstall
< > >- bukubrow,浏览器集成的Webextension
- 机油,键入cli前端时搜索
- buku-run,rofi前端
- pinku,一个pinboard to buku导入实用程序
- buku-dmenu,一个简单的bash-dmenu包装器
示例
自动化
可以使用expect自动化交互式工作流。issue368有一个自动导入的工作示例。
故障排除
编辑器集成
您可能会遇到gui编辑器的问题,这些编辑器默认情况下只维护一个实例,然后立即从其他实例返回。打开新文档时,使用适当的编辑器选项阻止调用方。见问题210用于GEDIT。
合作者
版权所有©2015-2019
贡献
缺少功能?有一个滚动的任务列表。欢迎投稿!请遵循公关指南