书签管理器就像一个基于文本的迷你网络。

buku的Python项目详细描述


布库

最新版本aurhomebrewpypidebian stretch+fedora 27+/a>opensuse leap 15.0+ubuntu zesty+

availability生成状态docs status许可证

布库行动中!

布库开始行动!

简介

buku是一个用python3和sqlite3编写的强大书签管理器。当我开始编写它时,我找不到一个灵活的命令行解决方案,它有一个私有的、可移植的、可合并的数据库以及无缝的gui集成。因此,buku(在我儿子的昵称之后,在我的语言中,意思是接近心脏的。

bukuserver在本地web主机服务器上显示可浏览的前端。

buku可以从浏览器中自动导入书签,也可以从Web获取书签URL的标题和说明。您可以使用您喜爱的编辑器编写和更新书签。有多个搜索选项,包括regex和深度扫描模式(特别是对于url),它可以立即找到任何书签。buku可以在回程机上查找断开链路的最新快照。还有一个复活节彩蛋可以重新访问随机遗忘的书签!buku太忙,无法跟踪您:没有隐藏的历史记录、过时的记录、使用情况分析或重设原点。

要立即开始,请跳到快速启动部分。我们有最好的文档之一。你也可以在手册页找到有用的例子。有关更多详细信息,请参阅操作说明中的wiki页面

有几个基于buku的项目,包括浏览器插件。

喜欢智能高效的公用事业?探索我的存储库。如果他们帮你,请给我买杯咖啡。

IMG ALT= ="通过PayPal捐赠!" src="https://warehouse camo.cmh1.psfhosted.org/6f1db44cb5803100db958b2981b4c093f40a58ce/68747470733a2f2f696d672e736869656c6473e696f626164672f50617950616c2d646f6e6174652d31656230662e737667" />

目录

功能

  • 存储带有自动获取的标题、标记和说明的书签
  • 从Firefox、Google Chrome和Chrome自动导入
  • 在浏览器中打开书签和搜索结果
  • 缩短、扩展URL、浏览缓存页FROM回程机
  • 文本编辑器集成
  • 轻巧、干净的界面、自定义颜色
  • 强大的搜索选项(regex、substring…)
  • 使用动态模式开关进行连续搜索
  • 可移植、可合并的数据库,以便在系统之间进行同步
  • 从/到HTML、标记或组织文件导入/导出书签
  • 使用重定向的智能标记管理(>;、>;、<;)
  • 多线程全数据库刷新,手动加密支持
  • Shell完成脚本,手册页,附带方便的示例

安装

依赖关系

<表><广告>功能 依赖性< /广告><正文>脚本语言巨蟒3.5+httpsCertifi,urllib3加密密码学HTML美化组4,HTML5lib

要使用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复制粘贴缓冲区。

来自包管理器

发布包

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

颜色

buku支持自定义颜色。有关如何自定义颜色的详细信息,请访问wiki页面。

快速启动

  1. 导出visualeditor以指向您喜爱的编辑器。注意visual优先于editor

  2. 创造一个更甜蜜的快捷方式和一些方便。

    alias b='buku --suggest'
    
  3. 从浏览器自动导入书签。请提前退出相关浏览器,以确保数据库未被锁定。

    b --ai
    
  4. 手动添加书签(用于实际操作)。

    b -w
    
  5. 用数据库索引列出书签。

    # pip3 install certifi urllib3 cryptography beautifulsoup4
    
    0
  6. 有关图形用户界面和浏览器集成(或将书签与您喜爱的书签管理服务同步),请参阅系统集成上的wiki页面。

  7. < > >

    示例

    1. 编辑并添加来自编辑器的书签:

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      1

      第一个命令从环境变量editor中选择editor。第二个命令以阻塞模式打开gedit。第三个命令打开带有选项-f和模板中填充的url和标记的macvim。

    2. 添加带有标记的书签搜索引擎隐私评论有优惠的搜索引擎从网站获取页面标题

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      2

      其中,>;:url,+:comment,:标记

    3. 添加带有标签的书签搜索引擎&;隐私不可变的自定义标题ddg

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      3

      请注意,URL必须位于标记之前。

    4. 添加不带标题的书签(也适用于更新):

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      4
    5. 编辑和更新来自编辑器的书签:

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      5

      这将在编辑器中打开现有书签的详细信息进行修改。必须设置环境变量"编辑器"。

    6. 更新索引15012014处的现有书签,添加新的URL、标记和注释,从网站获取标题:

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      6
    7. 仅获取和更新标题用于15012014的书签:

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      7
    8. 仅更新注释用于15012014的书签:

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      8

      也适用于--url、--title和--tag。

    9. 导出标记为标记1的书签标记2的书签到HTML、标记、组织文件或新数据库:

      # pip3 install certifi urllib3 cryptography beautifulsoup4
      
      9

      如果不选择搜索,则导出所有书签。

    10. 从html、markdown或orgfile导入书签:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      0
    11. 仅删除注释用于15012014的书签:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      1

      也适用于--title和--tag。如果不删除书签,则无法删除URL。

    12. 使用网页标题更新或刷新整个数据库

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      2

      此操作可以更新标题或说明n个字段的非不变书签通过解析获取的页面。仅当获取的字段为非空时,才会更新字段。标签保持不变。

    13. 删除索引15012014处的书签:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      3

      最后一个索引移动到已删除的索引以保持数据库的紧凑。

    14. 全部删除书签:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      4
    15. 删除书签的范围或列表:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      5
    16. 在URL、标题或标记中搜索kerneldebugging关键字的任何书签:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      6
    17. 在url、title或tags中搜索带有all关键字kernel调试的书签:

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      7
    18. 搜索书签标记一般内核概念

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      8
    19. 搜索与任何标记匹配的书签kerneldebugginggeneral kernel concepts

      # apt-get install ca-certificates python3-urllib3 python3-cryptography python3-bs4
      
      9
    20. 搜索与所有标记匹配的书签内核调试一般内核概念

      $ sudo make install
      
      0
    21. 搜索匹配任何关键字helloworld的书签,不包括关键字reallife,同时匹配标记kernel调试,但是排除标签一般内核概念书籍

      $ sudo make install
      
      1
    22. 按字母顺序列出所有唯一的标记

      $ sudo make install
      
      2
    23. 运行搜索并更新结果:

      $ sudo make install
      
      3
    24. 运行搜索并删除结果:

      $ sudo make install
      
      4
    25. 使用自定义迭代次数(15)加密或解密数据库以生成密钥:

      $ sudo make install
      
      5

      必须为一个锁定和解锁实例指定相同的迭代次数。如果省略,默认值为8。

    26. 显示索引15012014处书签的详细信息,范围为20-30、40-50:

      $ sudo make install
      
      6
    27. 显示最近10个书签的详细信息

      $ sudo make install
      
      7
    28. 全部显示带有数据库中真实索引的书签:

      $ sudo make install
      
      8
    29. 用"新标记"替换"旧标记":

      $ sudo make install
      
      9
    30. 从数据库中删除标记"旧标记":

      $ sudo make uninstall
      
      0
    31. 在索引15012014处的书签的现有标记上附加(或删除)标记"标记1"、"标记2":

      $ sudo make uninstall
      
      1
    32. 在浏览器中打开索引15012014处的url:

      $ sudo make uninstall
      
      2
    33. 列出不带标题或标记的书签以进行记帐:

      $ sudo make uninstall
      
      3
    34. 列出标题不可变的书签

      $ sudo make uninstall
      
      4
    35. 缩短urlwww.google.com和索引20处的url:

      $ sudo make uninstall
      
      5
    36. 提示时追加、删除标记(标记列表索引在左侧,书签索引在右侧):

      $ sudo make uninstall
      
      6
    37. 列出带有彩色输出的书签

      $ sudo make uninstall
      
      7
    38. 更多帮助

      $ sudo make uninstall
      
      8
    39. < > >

      自动化

      可以使用expect自动化交互式工作流。issue368有一个自动导入的工作示例。

      故障排除

      编辑器集成

      您可能会遇到gui编辑器的问题,这些编辑器默认情况下只维护一个实例,然后立即从其他实例返回。打开新文档时,使用适当的编辑器选项阻止调用方。见问题210用于GEDIT。

      合作者

      版权所有©2015-2019

      gitter聊天

      贡献

      缺少功能?有一个滚动的任务列表。欢迎投稿!请遵循公关指南

      相关项目

      • bukubrow,浏览器集成的Webextension
      • 机油,键入cli前端时搜索
      • buku-run,rofi前端
      • pinku,一个pinboard to buku导入实用程序
      • buku-dmenu,一个简单的bash-dmenu包装器

      stable docs

      在新闻界

      欢迎加入QQ群-->: 979659372 Python中文网_新手群

      推荐PyPI第三方库


热门话题
JAXB可以将ArrayList作为逗号分隔的值输出吗?   java使用bcel将一个内部类移动到另一个外部类   java无法识别Lucene MoreLikeThis中的错误   安卓如何在Frida中将动态类转换为json或java文件   java如何使用Struts2在blob类型的列中保存我的sql中的图像?   使用mavenreleaseplugin将java maven发布到nexus 3.0.1失败   java这是正确的方法吗?   Windows上的java Runner不工作   找不到java Hibernate+Spring xml映射   java如何访问WMI查询的数据(通过JNA)SAFEARRAY结果   java如何在本地导入库而不使用Maven中的Nexus?   java渐变本地项目依赖项   使用URLFetchService/URL Google appengine for java