nb

其他源码 2025-08-23


nb是一条命令行,本地网络记录,书签,存档和知识库应用程序:

  • 纯文本数据存储,
  • 加密,
  • 过滤,固定,#taging和搜索,
  • git支持的版本控制和同步,
  • 潘多克支持的转换,
  • [[Wiki风格的链接]],
  • 终端和GUI网络浏览,
  • 内联图像,
  • 带任务的戒酒,
  • 全球和本地笔记本,
  • 带有文件夹的组织
  • 可自定义的颜色主题,
  • 通过插件的可扩展性,

以及更多,在一个便携式脚本中。

nb以基于文本的格式创建注释,例如Markdown,Org,Latex和Asciidoc,可以使用任何格式的文件,可以将笔记导入和导出许多文档格式,并可以创建由密码保护的私有密码加密注释和书签。使用nb ,您可以使用VIM,Emacs,VS代码,崇高的文本以及您喜欢的任何其他文本编辑器以及终端和GUI Web浏览器编写注释。 nb在任何标准的Linux / UNIX环境中都可以使用,包括MACOS和Windows通过WSL,MSYS和Cygwin。可以安装可选的依赖性以增强功能,但是没有它们, nb效果很好。

nb也是一个有力的书签系统:

  • 本地服务,以文本为中心的,无干扰的书签在终端和GUI网络浏览器中浏览,
  • 局部对带有正则表达支持的缓存页面内容的全文搜索,
  • 方便的过滤和清单,
  • Internet存档Wayback Machine快照查找破裂的链接,
  • 标记,固定,链接和与其他nb功能完全集成。

页面信息已下载,清理,结构化并保存到针对人类制作的普通标记文档中,因此书签易于查看和编辑,就像其他任何笔记一样。

nb在后台使用git自动记录更改并与远程存储库同步笔记本。 nb还可以使用通用同步实用程序(例如Dropbox)配置为同步笔记本,以便在任何设备上的其他应用程序中都可以编辑注释。

nb设计为便携式,注重未来的且独立的供应商,在高度可容纳的多模式以用户为中心的文本界面中提供了功能丰富且直观的体验。整个程序包含在一个经过良好测试的外壳脚本中,该脚本几乎可以在任何地方安装,复制或卷曲,并且使用受到渐进增强启发的策略,以在功能更强大的环境中进行各种经验改进。 nb无论您有一个笔记本,只有几张笔记还是数十本笔记本,其中包含数千个笔记,书签和其他物品。 nb使得合并其他工具,编写应用程序和工作流程变得容易。 nb可以偶尔使用一点,或者仅用于一部分功能。 nb是灵活的。

???✅??

nb

安装·概述

帮助

安装

依赖性

必需的
  • bash
    • nb与ZSH,FISH和其他任何其他壳体作为主要登录外壳的完美配合,系统只需要在其上提供bash即可。
  • git
  • 具有命令行支持的文本编辑器,例如:
    • vim,
    • emacs,
    • 视觉工作室代码,
    • 崇高的文字,
    • 螺旋,
    • 微,
    • 纳米,
    • 原子,
    • 文字人,
    • MacDown,
    • 其中一些,
    • 其中许多。
选修的

nb利用标准命令行工具和在标准Linux / UNIX环境中工作。 nb还检查了一些其他可选工具的环境,并在可用时使用它们来增强体验。

受到推崇的:

  • 蝙蝠
  • NCAT或SOCAT
  • 潘多克
  • RG
  • 提格
  • W3M

还支持各种增强功能:

Ack, afplay, asciidoctor, The Silver Searcher (ag), catimg, Chafa, Chromium / Chrome, eza, ffplay, ImageMagick, glow, GnuPG, highlight, imgcat, joshuto, kitty's icat kitten, lowdown, lsd, Links, Lynx, mdcat, mdless, mdv, Midnight Commander (mc), mpg123, MPlayer, ncat, netcat, note-link-janitor (via plugin), pdftotext, Pygments, Ranger, readability-cli, rga / ripgrep-all, sc-im, socat, termvisage, termpdf.py, Tidy-Viewer (tv), timg, vifm, viu, VisiData

MacOS / Homebrew

brew install xwmx/taps/ nb

与自制的nb安装NB还安装了上述建议的依赖项,并为bash,ZSH和FISH安装了填写脚本。

从存储库中安装最新的开发版本:

brew install xwmx/taps/ nb --head

nb也可以在Homebrew-Core中使用。建议将其与Bash公式一起安装:

brew install nb bash

Ubuntu,Windows等

NPM
npm install -g nb .sh

NPM安装完成后,运行sudo“ $( nb )”完成安装以安装bash和zsh完成脚本(建议)。

在Ubuntu和WSL上,您可以运行sudo“ $( nb )” INV安装以安装可选依赖项。

当nb安装在Windows上时,建议使用Socat(MSYS,Cygwin)。

nb也可在其原始软件包名称Notes.sh下找到,该名称带有额外的笔记可执行包装nb 。

下载并安装

要作为管理员安装,请复制并粘贴以下多行命令之一:

nb && sudo chmod +x /usr/local/bin/ nb && sudo nb completions install # install using curl sudo curl -L https://raw.*git*h*ub.com/xwmx/nb/master/ nb -o /usr/local/bin/ nb && sudo chmod +x /usr/local/bin/ nb && sudo nb completions install">
 # install using wget
sudo wget https://raw.*git*h*ub.com/xwmx/nb/master/ nb -O /usr/local/bin/ nb &&
  sudo chmod +x /usr/local/bin/ nb &&
  sudo nb completions install

# install using curl
sudo curl -L https://raw.*git*h*ub.com/xwmx/nb/master/ nb -o /usr/local/bin/ nb &&
  sudo chmod +x /usr/local/bin/ nb &&
  sudo nb completions install

在Ubuntu和WSL上,您可以运行sudo nb env安装以安装可选依赖项。

仅用户安装

要仅使用用户权限安装,只需将nb脚本添加到您的$路径中即可。例如,如果您已经有一个〜/bin目录,则可以使用以下命令之一:

nb && chmod +x ~/bin/ nb # download with curl curl -L https://raw.*git*h*ub.com/xwmx/nb/master/ nb -o ~/bin/ nb && chmod +x ~/bin/ nb ">
 # download with wget
wget https://raw.*git*h*ub.com/xwmx/nb/master/ nb -O ~ /bin/ nb && chmod +x ~ /bin/ nb

# download with curl
curl -L https://raw.*git*h*ub.com/xwmx/nb/master/ nb -o ~ /bin/ nb && chmod +x ~ /bin/ nb

仅使用用户权限安装不包括可选的依赖项或完成,但是nb Core功能在没有它们的情况下起作用。如果您具有sudo访问并想要安装完成脚本和依赖项,请运行以下命令:

sudo nb env install
制作

要使用Make安装,请克隆此存储库,导航到克隆的根目录,然后运行:

sudo make install

这还将在所有系统以及Ubuntu和WSL上的建议依赖项上安装完成脚本。

BPKG

使用BPKG安装:

bpkg install xwmx/ nb 
Basher

与Basher一起安装:

basher install xwmx/ nb 

选项卡完成

假设您具有适当的系统权限或使用sudo安装,则应在使用上面的方法安装nb时启用Bash,Fish和ZSH选项卡的完成。如果在安装nb后完成完成,请参见“完成安装说明”。

更新

使用NPM或Homebrew等软件包管理器安装nb时,请使用软件包管理器的升级功能将nb更新为最新版本。通过其他方法安装时,可以使用nb Update子命令将nb更新到最新版本。

概述

注释·添加·列表·编辑·查看·书签·↕️导入 /导出·设置和设置·颜色主题·插件·插件·< / selectors·01元数据·shell·shell·快捷方式·?帮助·$变量·规格·测试

要开始,只需运行:

 nb

nb首次运行时,将设置您的初始笔记本。

默认情况下,笔记本和注释是全局(〜/ nb ),因此无论当前的工作目录如何,NB始终可供nb使用。 nb还支持本地笔记本。

笔记

添加

↑· nb添加, nb浏览添加

使用nb add(快捷方式: nb a, nb +)创建新注释:

nb add # create a new note with the filename "example.md" nb add example.md # create a new note containing "This is a note." nb add "This is a note." # create a new note with piped content echo "Note content." | nb add # create a new password-protected, encrypted note titled "Secret Document" nb add --title "Secret Document" --encrypt # create a new note in the notebook named "example" nb example:add "This is a note." # create a new note in the folder named "sample" nb add sample/">
 # create a new note in your text editor
nb add

# create a new note with the filename "example.md"
nb add example.md

# create a new note containing "This is a note."
nb add " This is a note. "

# create a new note with piped content
echo " Note content. " | nb add

# create a new password-protected, encrypted note titled "Secret Document"
nb add --title " Secret Document " --encrypt

# create a new note in the notebook named "example"
nb example:add " This is a note. "

# create a new note in the folder named "sample"
nb add sample/

nb添加没有参数或输入将打开环境首选文本编辑器中的新的空白说明。您可以使用$编辑器环境变量或nb集编辑器更改编辑器。

nb文件默认情况下是降级文件。默认文件类型可以更改为您喜欢使用nb SET DEFAULT_EXTENSION的任何内容。

nb Add具有明智的论点解析,并且根据其收到的参数类型的方式行为不同。指定带有扩展名的文件名时,编辑器中打开了带有该文件名的新注释:

 nb add example.md

指定字符串时,立即将其作为内容创建新的注释,而无需打开编辑器:

nb add "This is a note." Added: [1] 20200101000000.md">
❯ nb add " This is a note. "
Added: [1] 20200101000000.md

nb添加可用于直接通过命令行快速记下注释。引用内容是可选的,但建议使用。

当未指定文件名时, nb添加使用当前的DateTime作为文件名。

nb Add还可以接收管道内容,其行为与nb Add 相同:

nb add Added: [6] 20200101000100.md # create a new note containing the clipboard contents on macOS ❯ pbpaste | nb add Added: [7] 20200101000200.md # create a new note containing the clipboard contents using xclip ❯ xclip -o | nb add Added: [8] 20200101000300.md">
 # create a new note containing "Note content."echo " Note content. " | nb add
Added: [6] 20200101000100.md

# create a new note containing the clipboard contents on macOS
❯ pbpaste | nb add
Added: [7] 20200101000200.md

# create a new note containing the clipboard contents using xclip
❯ xclip -o | nb add
Added: [8] 20200101000300.md

内容可以使用-Co​​ntent 选项传递,该选项也可以创建一个新的注释,而无需打开编辑器:

 nb add --content " Note content. "

当内容被管道,用-content 指定或以字符串参数传递时,请使用-edit标志在更改进行更改之前打开编辑器中的文件。

标题,文件名和内容也可以用长和简短的选项指定:

nb add --filename "example.md" -t "Example Title" -c "Example content." Added: [9] example.md "Example Title"">
❯ nb add --filename " example.md " -t " Example Title " -c " Example content. "
Added: [9] example.md " Example Title "

-t / - -title <title>选项还将文件名设置为标题,以空格和非FILENAME字符的下降为基础,替换为下划线: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb add --title "Example Title" "Example content." Added: [10] example_title.md "Example Title""><pre>❯ nb add --title <span class="pl-s"><span class="pl-pds">"</span> Example Title <span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span> Example content. <span class="pl-pds">"</span></span> Added: [10] example_title.md <span class="pl-s"><span class="pl-pds">"</span> Example Title <span class="pl-pds">"</span></span></pre> </div> <p dir="auto">可以使用-TAGS <tag1>,<tag2> ...选项添加标签,该选项获取逗号分隔的标签列表,将它们转换为#hashtags,然后在标题和内容之间插入它们: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb add "Example content." --title "Tagged Example" --tags tag1,tag2 Added: [11] tagged_example.md "Tagged Example" ❯ nb show 11 --print # Tagged Example #tag1 #tag2 Example content."><pre>❯ nb add <span class="pl-s"><span class="pl-pds">"</span> Example content. <span class="pl-pds">"</span></span> --title <span class="pl-s"><span class="pl-pds">"</span> Tagged Example <span class="pl-pds">"</span></span> --tags tag1,tag2 Added: [11] tagged_example.md <span class="pl-s"><span class="pl-pds">"</span> Tagged Example <span class="pl-pds">"</span></span> ❯ nb show 11 --print <span class="pl-c"><span class="pl-c">#</span> Tagged Example</span> <span class="pl-c"><span class="pl-c">#</span> tag1 #tag2</span> Example content.</pre> </div> <p dir="auto">使用nb搜索 / nb搜索标记的项目Q: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content='# search for items tagged with "#tag1" <span class=' notranslate keguazi>nb search --tag tag1 # search for items tagged with "#tag1" AND "#tag2", short options nb q -t tag1 -t tag2 # search for items tagged with "#tag1" OR "#tag2", arguments nb q #tag1 --or #tag2"><pre> <span class="pl-c"><span class="pl-c">#</span> search for items tagged with "#tag1"</span> nb search --tag tag1 <span class="pl-c"><span class="pl-c">#</span> search for items tagged with "#tag1" AND "#tag2", short options</span> nb q -t tag1 -t tag2 <span class="pl-c"><span class="pl-c">#</span> search for items tagged with "#tag1" OR "#tag2", arguments</span> nb q <span class="pl-cce">#</span> tag1 --or <span class="pl-cce">#</span> tag2</pre> </div> <p dir="auto">可以通过指定文件名(示例.md),扩展名(.md)或通过-Type <type> option(-type md)中的扩展名来使用任何文件类型创建文件: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# open a new Org file in the editor <span class=" notranslate keguazi>nb add example.org # open a new reStructuredText file in the editor nb add --type rst # open a new JavaScript file in the editor nb add .js"><pre> <span class="pl-c"><span class="pl-c">#</span> open a new Org file in the editor</span> nb add example.org <span class="pl-c"><span class="pl-c">#</span> open a new reStructuredText file in the editor</span> nb add --type rst <span class="pl-c"><span class="pl-c">#</span> open a new JavaScript file in the editor</span> nb add .js</pre> </div> <p dir="auto">将类型的参数与管道剪贴板内容相结合,提供了一种非常方便的方法,可以使用剪贴板实用程序(例如PBPASTE,XCLIP或PB)保存代码片段: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# save the clipboard contents as a JavaScript file in the current notebook pb | <span class=" notranslate keguazi>nb add .js # save the clipboard contents as a Rust file in the "rust" notebook # using the shortcut alias ` nb a` pb | nb a rust: .rs # save the clipboard contents as a Haskell file named "example.hs" in the # "snippets" notebook using the shortcut alias ` nb +` pb | nb + snippets: example.hs"><pre> <span class="pl-c"><span class="pl-c">#</span> save the clipboard contents as a JavaScript file in the current notebook</span> pb <span class="pl-k">|</span> nb add .js <span class="pl-c"><span class="pl-c">#</span> save the clipboard contents as a Rust file in the "rust" notebook</span> <span class="pl-c"><span class="pl-c">#</span> using the shortcut alias ` nb a`</span> pb <span class="pl-k">|</span> nb a rust: .rs <span class="pl-c"><span class="pl-c">#</span> save the clipboard contents as a Haskell file named "example.hs" in the</span> <span class="pl-c"><span class="pl-c">#</span> "snippets" notebook using the shortcut alias ` nb +`</span> pb <span class="pl-k">|</span> nb + snippets: example.hs</pre> </div> <p dir="auto">使用nb Show和nb浏览来查看具有自动语法突出显示的代码段,并使用nb编辑在编辑器中打开。</p> <p dir="auto">剪辑插件也可用于从剪贴板内容中创建笔记。</p> <p dir="auto">管道, - title <title>, - tags <tag-list>, - content <content>,并且可以根据需要将传递的参数传递的内容合并,以使用单个命令使用来自多个输入方法和源的内容创建注释: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ pb | <span class=" notranslate keguazi>nb add "Argument content." --title "Sample Title" --tags tag1,tag2 --content "Option content." Added: [12] sample_title.md "Sample Title" ❯ nb show 12 --print # Sample Title #tag1 #tag2 Argument content. Option content. Clipboard content."><pre>❯ pb <span class="pl-k">|</span> nb add <span class="pl-s"><span class="pl-pds">"</span> Argument content. <span class="pl-pds">"</span></span> --title <span class="pl-s"><span class="pl-pds">"</span> Sample Title <span class="pl-pds">"</span></span> --tags tag1,tag2 --content <span class="pl-s"><span class="pl-pds">"</span> Option content. <span class="pl-pds">"</span></span> Added: [12] sample_title.md <span class="pl-s"><span class="pl-pds">"</span> Sample Title <span class="pl-pds">"</span></span> ❯ nb show 12 --print <span class="pl-c"><span class="pl-c">#</span> Sample Title</span> <span class="pl-c"><span class="pl-c">#</span> tag1 #tag2</span> Argument content. Option content. Clipboard content.</pre> </div> <p dir="auto">有关nb Add的选项的完整列表,请运行nb帮助添加。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 受密码保护的加密笔记和书签</h5></div> <p dir="auto">用-e / -encrypt标志创建了受密码保护的注释和书签,并使用openssl默认使用AES-256加密。还支持GPG,可以使用nb Set Encryption_Tool配置。</p> <p dir="auto">每个受保护的笔记和书签都用自己的密码单独加密。当查看,编辑或打开加密项目时, nb将在继续之前,只需提示该项目的密码即可。编辑项目后, nb会自动重新加入它并保存新版本。</p> <p dir="auto">可以直接使用OPENSL和GPG命令行工具来解密加密的注释,因此您不依赖nb来解密文件。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 模板</h5></div> <p dir="auto">通过将模板字符串或路径分配给模板文件,以添加-template <Template>:: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# create a new note based on a template specified by path <span class=" notranslate keguazi>nb add --template /path/to/example/template # create a new note based on a template defined as a string nb add --template "{{title}} • {{content}}""><pre> <span class="pl-c"><span class="pl-c">#</span> create a new note based on a template specified by path</span> nb add --template /path/to/example/template <span class="pl-c"><span class="pl-c">#</span> create a new note based on a template defined as a string</span> nb add --template <span class="pl-s"><span class="pl-pds">"</span> {{title}} • {{content}} <span class="pl-pds">"</span></span></pre> </div> <p dir="auto"> nb模板标签包含在双卷发括号中。支持的标签包括:</p> <dl> <dt> {{标题}}</dt> <dd>注释标题,如add -title <title>所指定</dd> <dt>{{tags}}</dt> <dd>主题标签的列表,如add -tags <tag1>,<tag2></dd> <dt> {{内容}}</dt> <dd>注释内容,如添加<content>,add -content <content>和管道内容。</dd> <dt> {{日期}}</dt> <dd>系统的日期命令的OUPUT。使用日期命令选项控制格式,例如{{date +“%y-%m-%d”}}。</dd> </dl> <p dir="auto">一个示例完整的降价模板看起来如下: </p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content='# {{title}} {{date +"%Y-%m-%d"}} {{tags}} {{content}}'><pre class="notranslate"># {{title}} {{date +"%Y-%m-%d"}} {{tags}} {{content}} </pre></div> <p dir="auto">模板是使用eval处理的bash字符串,因此您可以使用命令替换($(echo“示例命令”))来包括命令行工具和壳代码的输出。</p> <p dir="auto">可以通过将字符串或路径分配给〜/中的$ nb _default_template变量来配置默认模板。 nb RC文件: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# set the default template to a path export <span class=" notranslate keguazi>nb_DEFAULT_TEMPLATE="/path/to/example/template" # set the default template with a string export nb _DEFAULT_TEMPLATE="{{title}} • {{content}}""><pre> <span class="pl-c"><span class="pl-c">#</span> set the default template to a path</span> <span class="pl-k">export</span> nb _DEFAULT_TEMPLATE= <span class="pl-s"><span class="pl-pds">"</span> /path/to/example/template <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> set the default template with a string</span> <span class="pl-k">export</span> nb _DEFAULT_TEMPLATE= <span class="pl-s"><span class="pl-pds">"</span> {{title}} • {{content}} <span class="pl-pds">"</span></span></pre> </div> <p dir="auto">分配一个模板时,请使用nb add-no-template使用模板跳过。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 快捷方式别名: nb A, nb +</h5></div> <p dir="auto"> nb包括许多命令的快捷方式,包括nb A和nb + nb添加: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# create a new note in your text editor <span class=" notranslate keguazi>nb a # create a new note with the filename "example.md" nb a example.md # create a new note containing "This is a note." nb + "This is a note." # create a new note containing the clipboard contents with xclip xclip -o | nb + # create a new note in the notebook named "example" nb example:a"><pre> <span class="pl-c"><span class="pl-c">#</span> create a new note in your text editor</span> nb a <span class="pl-c"><span class="pl-c">#</span> create a new note with the filename "example.md"</span> nb a example.md <span class="pl-c"><span class="pl-c">#</span> create a new note containing "This is a note."</span> nb + <span class="pl-s"><span class="pl-pds">"</span> This is a note. <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> create a new note containing the clipboard contents with xclip</span> xclip -o <span class="pl-k">|</span> nb + <span class="pl-c"><span class="pl-c">#</span> create a new note in the notebook named "example"</span> nb example:a</pre> </div> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto">其他别名: nb创建, nb新</h5></div> <p dir="auto">为了方便起见,也可以使用nb Create和nb New调用nb Add: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content='# create a new note containing "Example note content." <span class=' notranslate keguazi>nb new "Example note content." # create a new note with the title "Example Note Title" nb create --title "Example Note Title""><pre> <span class="pl-c"><span class="pl-c">#</span> create a new note containing "Example note content."</span> nb new <span class="pl-s"><span class="pl-pds">"</span> Example note content. <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> create a new note with the title "Example Note Title"</span> nb create --title <span class="pl-s"><span class="pl-pds">"</span> Example Note Title <span class="pl-pds">"</span></span> </pre> </div> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto">加上nb浏览</h5></div> <p dir="auto">也可以使用nb浏览 / nb BA中的终端和GUI Web浏览器中添加项目: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb browse add ❯ nb · home : + [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [add]"><pre>❯ nb browse add ❯ nb · home <span class="pl-c1">:</span> + [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [add]</pre> </div> <p dir="auto">通过文件名,相对路径和 /或笔记本名称,以在该位置创建新的注释: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content='# open the add form in the browser to create the file "file.md" in the folder "example" nb browse add "example/file.md"'><pre> <span class="pl-c"><span class="pl-c"># open the add form in the browser to create the file "file.md" in the folder "example"</span> nb browse add <span class="pl-s"><span class="pl-pds">"</span> example/file.md <span class="pl-pds">"</span></span></span></pre></div> <p dir="auto"> nb浏览添加包含的选项可以快速预先填充具有内容的新笔记: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb browse add --title "Example Title" --content "Example content." --tags tag1,tag2 ❯ nb · home : + [# Example Title ] [ ] [#tag1 #tag2 ] [ ] [Example content. ] [ ] [ ] [ ] [ ] [ ] [add]"><pre>❯ nb browse add --title <span class="pl-s"><span class="pl-pds">"</span> Example Title <span class="pl-pds">"</span></span> --content <span class="pl-s"><span class="pl-pds">"</span> Example content. <span class="pl-pds">"</span></span> --tags tag1,tag2 ❯ nb · home <span class="pl-c1">:</span> + [ <span class="pl-c"><span class="pl-c">#</span> Example Title ]</span> [ ] [ <span class="pl-c"><span class="pl-c">#</span> tag1 #tag2 ]</span> [ ] [Example content. ] [ ] [ ] [ ] [ ] [ ] [add]</pre> </div> <p dir="auto"> nb浏览添加也可以使用nb add -browse / nb a -b打开。</p> <p dir="auto">有关更多信息,请参见浏览。</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto"> 清单和过滤</h4></div> <p dir="auto"><sup>↑· nb LS, nb列表, nb浏览</sup></p> <p dir="auto">要列出笔记和笔记本,请运行nb LS(快捷方式别名: nb ):</p> <div align="center" dir="auto"></div> <p dir="auto">笔记本电脑在行上方列出,当前笔记本电脑突出显示和/或下划线,具体取决于终端功能。 nb LS还包括一个带有示例命令的页脚,以便引用。笔记本电脑标题和命令页脚可以使用nb Set标头和nb设置页脚进行配置或隐藏。 </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls home ---- [3] example.md · "Example content." [2] sample.md · "Sample content." [1] demo.md · "- Demo list item one.""><pre>❯ nb ls home ---- [3] example.md · <span class="pl-s"><span class="pl-pds">"</span> Example content. <span class="pl-pds">"</span></span> [2] sample.md · <span class="pl-s"><span class="pl-pds">"</span> Sample content. <span class="pl-pds">"</span></span> [1] demo.md · <span class="pl-s"><span class="pl-pds">"</span> - Demo list item one. <span class="pl-pds">"</span></span></pre> </div> <p dir="auto">当前笔记本中的注释是按照上次修改的顺序列出的。默认情况下,每个注释都列出了注释第一行的ID,文件名和摘录。当音符具有标题时,显示标题而不是文件名和第一行。</p> <p dir="auto">可以使用Markdown H1样式或YAML Front Matter在注释中定义标题: </p> <div class="highlight highlight-text-md notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Example Title"><pre> <span class="pl-mh"># <span class="pl-en">Example Title</span></span> </pre></div> <div class="highlight highlight-text-md notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Sample Title ============"><pre>Sample Title <span class="pl-mh">============</span> </pre></div> <div class="highlight highlight-text-md notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- title: Demo Title ---"><pre> <span class="pl-s">---</span> <span class="pl-ent">title</span> : <span class="pl-s">Demo Title</span> <span class="pl-s">---</span></pre></div> <p dir="auto"> .org,.latex和.asciidoc / .adoc文件中识别org,latex和asciidoc标题: </p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#+title: Example Org Title"><pre lang="text" class="notranslate">#+title: Example Org Title </pre></div> <div class="highlight highlight-text-tex-latex notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="title{Example LaTeX Title}"><pre> <span class="pl-c1">title</span> {Example LaTeX Title}</pre></div> <div class="highlight highlight-text-html-asciidoc notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="= Example AsciiDoc Title"><pre> <span class="pl-mh">= <span class="pl-en">Example AsciiDoc Title</span></span></pre></div> <p dir="auto">定义后,将显示标题代替nb LS输出中的文件名和第一行: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls home ---- [3] Example Title [2] Sample Title [1] Demo Title"><pre>❯ nb ls home ---- [3] Example Title [2] Sample Title [1] Demo Title</pre> </div> <p dir="auto">传递ID,文件名或标题以查看该注释的清单: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls Sample Title [2] Sample Title ❯ nb ls 3 [3] Example Title"><pre>❯ nb ls Sample <span class="pl-cce"> </span>Title [2] Sample Title ❯ nb ls 3 [3] Example Title</pre> </div> <p dir="auto">如果没有确切的匹配, nb将列出具有标题和文件名的项目,这些项目模糊匹配查询: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls exa [3] Example Title ❯ nb ls ample [3] Example Title [2] Sample Title"><pre>❯ nb ls exa [3] Example Title ❯ nb ls ample [3] Example Title [2] Sample Title</pre> </div> <p dir="auto">多个单词的作用为或过滤器,列出了与任何单词匹配的所有标题或文件名: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls example demo [3] Example Title [1] Demo Title"><pre>❯ nb ls example demo [3] Example Title [1] Demo Title</pre> </div> <p dir="auto">当引用多个单词时,该短语的过滤标题和文件名: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls "example title" [3] Example Title"><pre>❯ nb ls <span class="pl-s"><span class="pl-pds">"</span> example title <span class="pl-pds">"</span></span> [3] Example Title</pre> </div> <p dir="auto">有关全文搜索,请参见搜索。</p> <p dir="auto">要查看注释摘录,请使用-excerpt或-e选项,该选项可选地接受长度: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls 3 --excerpt [3] Example Title ----------------- # Example Title This is an example excerpt. ❯ nb ls 3 -e 8 [3] Example Title ----------------- # Example Title This is an example excerpt. More example content: - one - two"><pre>❯ nb ls 3 --excerpt [3] Example Title ----------------- <span class="pl-c"><span class="pl-c">#</span> Example Title</span> This is an example excerpt. ❯ nb ls 3 -e 8 [3] Example Title ----------------- <span class="pl-c"><span class="pl-c">#</span> Example Title</span> This is an example excerpt. More example content: - one - two</pre> </div> <p dir="auto">用表情符号指标表示几类文件类型,以使其在列表中易于识别。例如,书签和加密注释列出了?和: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls home ---- [4] Example Note [3] encrypted-note.md.enc [2] ? Example Bookmark (example.com) [1] ? encrypted.bookmark.md.enc"><pre>❯ nb ls home ---- [4] Example Note [3] encrypted-note.md.enc [2] ? Example Bookmark (example.com) [1] ? encrypted.bookmark.md.enc</pre> </div> <p dir="auto">文件类型包括: </p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Audio Book ? Bookmark Encrypted Folder ? Image ? PDF, Word, or Open Office document ? Video"><pre lang="text" class="notranslate"> Audio Book ? Bookmark Encrypted Folder ? Image ? PDF, Word, or Open Office document ? Video </pre></div> <p dir="auto">默认情况下,从最近修改开始列出了项目。要扭转订单,请使用-r或 - 反向标志: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls home ---- [2] Todos [3] Example Title [1] Ideas ❯ nb ls --reverse [1] Ideas [3] Example Title [2] Todos"><pre>❯ nb ls home ---- [2] Todos [3] Example Title [1] Ideas ❯ nb ls --reverse [1] Ideas [3] Example Title [2] Todos</pre> </div> <p dir="auto">笔记可以用-s / -sort标志对其进行排序,可以将其与-r / - reverse组合: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb ls home ---- [2] Sample Title [3] Example Title [1] Demo Title ❯ nb ls --sort [1] Demo Title [2] Sample Title [3] Example Title ❯ nb ls --sort --reverse [3] Example Title [2] Sample Title [1] Demo Title"><pre>❯ nb ls home ---- [2] Sample Title [3] Example Title [1] Demo Title ❯ nb ls --sort [1] Demo Title [2] Sample Title [3] Example Title ❯ nb ls --sort --reverse [3] Example Title [2] Sample Title [1] Demo Title</pre> </div> <p dir="auto">没有子命令的nb的行为就像是nb LS的别名,因此可以在没有LS的情况下运行上面的示例: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb home ---- [2] Sample Title [3] Example Title [1] Demo Title ❯ nb example [3] Example Title ❯ nb 3 --excerpt [3] Example Title ----------------- # Example Title This is an example excerpt. ❯ nb 3 -e 8 [3] Example Title ----------------- # Example Title This is an example excerpt. More example content: - one - two ❯ nb --sort [1] Demo Title [2] Sample Title [3] Example Title ❯ nb --sort --reverse [3] Example Title [2] Sample Title [1] Demo Title"><pre>❯ nb home ---- [2] Sample Title [3] Example Title [1] Demo Title ❯ nb example [3] Example Title ❯ nb 3 --excerpt [3] Example Title ----------------- <span class="pl-c"><span class="pl-c">#</span> Example Title</span> This is an example excerpt. ❯ nb 3 -e 8 [3] Example Title ----------------- <span class="pl-c"><span class="pl-c">#</span> Example Title</span> This is an example excerpt. More example content: - one - two ❯ nb --sort [1] Demo Title [2] Sample Title [3] Example Title ❯ nb --sort --reverse [3] Example Title [2] Sample Title [1] Demo Title</pre> </div> <p dir="auto">简短的选项可以简洁合并: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# equivalent to `nb --sort --reverse --excerpt 2` and ` <span class=" notranslate keguazi>nb -s -r -e 2`: ❯ nb -sre 2 [3] Example Title ----------------- # Example Title [2] Sample Title ---------------- Sample Title ============ [1] Demo Title -------------- --- title: Demo Title"><pre> <span class="pl-c"><span class="pl-c">#</span> equivalent to ` nb --sort --reverse --excerpt 2` and ` nb -s -r -e 2`:</span> ❯ nb -sre 2 [3] Example Title ----------------- <span class="pl-c"><span class="pl-c">#</span> Example Title</span> [2] Sample Title ---------------- Sample Title ============ [1] Demo Title -------------- --- title: Demo Title</pre> </div> <p dir="auto"> nb和nb LS显示了15个最近修改的项目。默认限制可以使用nb集限制<数字>更改。要按命令列出不同数量的项目,请使用-n <limit>, - limit <limit>, - <limit>,-a和 - all flags: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb -n 1 home ---- [5] Example Five 4 omitted. 5 total. ❯ nb --limit 2 home ---- [5] Example Five [4] Example Four 3 omitted. 5 total. ❯ nb --3 home ---- [5] Example Five [4] Example Four [3] Example Three 2 omitted. 5 total. ❯ nb --all home ---- [5] Example Five [4] Example Four [3] Example Three [2] Example Two [1] Example One"><pre>❯ nb -n 1 home ---- [5] Example Five 4 omitted. 5 total. ❯ nb --limit 2 home ---- [5] Example Five [4] Example Four 3 omitted. 5 total. ❯ nb --3 home ---- [5] Example Five [4] Example Four [3] Example Three 2 omitted. 5 total. ❯ nb --all home ---- [5] Example Five [4] Example Four [3] Example Three [2] Example Two [1] Example One</pre> </div> <p dir="auto">列表可以用-p <数字> / -page <数字>分页,默认情况下按nb设置限制的值或-n <limit>, - limit>, - limit <limit> <limit>或 - <limit>时,列表列表: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb home ---- [6] Example Six [5] Example Five [4] Example Four [3] Example Three [2] Example Two [1] Example One ❯ nb set limit 3 nb _LIMIT set to 3 ❯ nb --page 1 [6] Example Six [5] Example Five [4] Example Four ❯ nb -p 2 [3] Example Three [2] Example Two [1] Example One ❯ nb -p 2 --limit 2 [4] Example Four [3] Example Three ❯ nb -p 3 --2 [2] Example Two [1] Example One"><pre>❯ nb home ---- [6] Example Six [5] Example Five [4] Example Four [3] Example Three [2] Example Two [1] Example One ❯ nb <span class="pl-c1">set</span> limit 3 nb _LIMIT <span class="pl-c1">set</span> to 3 ❯ nb --page 1 [6] Example Six [5] Example Five [4] Example Four ❯ nb -p 2 [3] Example Three [2] Example Two [1] Example One ❯ nb -p 2 --limit 2 [4] Example Four [3] Example Three ❯ nb -p 3 --2 [2] Example Two [1] Example One</pre> </div> <p dir="auto">列表#Tagged项目通过传递 #escapated或“#Quoted”标签或标签 - 标签选项。多个标签执行和查询: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content='# list items in the current notebook tagged with "#tag1", escaped <span class=' notranslate keguazi>nb #tag1 # list items in the "example" notebook tagged with "#tag2", quoted nb example: "#tag2" # list items in all notebooks tagged with "#tag1", long option nb #tag1 --all # list items in the current notebook tagged with "#tag1" AND "#tag2" nb #tag1 "#tag2" # list items in all notebooks tagged with "#tag2" AND "#tag3", short option nb --tags tag2,tag3 -a"><pre> <span class="pl-c"><span class="pl-c">#</span> list items in the current notebook tagged with "#tag1", escaped</span> nb <span class="pl-cce">#</span> tag1 <span class="pl-c"><span class="pl-c">#</span> list items in the "example" notebook tagged with "#tag2", quoted</span> nb example: <span class="pl-s"><span class="pl-pds">"</span> #tag2 <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> list items in all notebooks tagged with "#tag1", long option</span> nb <span class="pl-cce">#</span> tag1 --all <span class="pl-c"><span class="pl-c">#</span> list items in the current notebook tagged with "#tag1" AND "#tag2"</span> nb <span class="pl-cce">#</span> tag1 <span class="pl-s"><span class="pl-pds">"</span> #tag2 <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> list items in all notebooks tagged with "#tag2" AND "#tag3", short option</span> nb --tags tag2,tag3 -a</pre> </div> <p dir="auto"> nb LS是一个视图中nb笔记本和nb列表的组合,并且接受与nb列表相同的参数,该参数仅列出没有笔记本列表的笔记,并且默认情况下没有限制: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb list [100] Example One Hundred [99] Example Ninety-Nine [98] Example Ninety-Eight ... lists all notes ... [2] Example Two [1] Example One"><pre>❯ nb list [100] Example One Hundred [99] Example Ninety-Nine [98] Example Ninety-Eight ... lists all notes ... [2] Example Two [1] Example One</pre> </div> <p dir="auto">有关列出注释选项的更多信息,请运行nb帮助LS和nb帮助列表。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 浏览列表</h5></div> <p dir="auto">可以使用nb浏览 / nb B在终端和GUI Web浏览器中列出项目: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb browse example:sample/demo/ ❯ nb · example : sample / demo / + search: [ ] [example:sample/demo/7] Title Seven [example:sample/demo/6] Title Six [example:sample/demo/5] Title Five [example:sample/demo/4] Title Four [example:sample/demo/3] Title Three next ❯"><pre>❯ nb browse example:sample/demo/ ❯ nb · example <span class="pl-c1">:</span> sample / demo / + search: [ ] [example:sample/demo/7] Title Seven [example:sample/demo/6] Title Six [example:sample/demo/5] Title Five [example:sample/demo/4] Title Four [example:sample/demo/3] Title Three next ❯</pre> </div> <p dir="auto">有关更多信息,请参见浏览。</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto"> 编辑</h4></div> <p dir="auto"><sup>↑· nb编辑, nb浏览编辑</sup></p> <p dir="auto">您可以使用nb Edit(快捷方式: nb E)在编辑器中编辑项目: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# edit note by id <span class=" notranslate keguazi>nb edit 3 # edit note by filename nb edit example.md # edit note by title nb edit "A Document Title" # edit note 12 in the notebook named "example" nb edit example:12 # edit note 12 in the notebook named "example", alternative nb example:12 edit # edit note 12 in the notebook named "example", alternative nb example:edit 12"><pre> <span class="pl-c"><span class="pl-c">#</span> edit note by id</span> nb edit 3 <span class="pl-c"><span class="pl-c">#</span> edit note by filename</span> nb edit example.md <span class="pl-c"><span class="pl-c">#</span> edit note by title</span> nb edit <span class="pl-s"><span class="pl-pds">"</span> A Document Title <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> edit note 12 in the notebook named "example"</span> nb edit example:12 <span class="pl-c"><span class="pl-c">#</span> edit note 12 in the notebook named "example", alternative</span> nb example:12 edit <span class="pl-c"><span class="pl-c">#</span> edit note 12 in the notebook named "example", alternative</span> nb example:edit 12</pre> </div> <p dir="auto">可以使用标识符和子命令名称逆转来调用使用标识符的编辑和其他子命令: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# edit note by id nb 3 edit"><pre> <span class="pl-c"><span class="pl-c"># edit note by id</span> nb 3 edit</span></pre></div> <p dir="auto"> nb Edit也可以接收管道内容,并在未打开编辑器的情况下将其附加到指定的注释上: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content='echo "Content to append." | nb edit 1'><pre> <span class="pl-c1">echo <span class="pl-s"><span class="pl-pds">"</span> Content to append. <span class="pl-pds">"</span></span> <span class="pl-k">|</span> nb edit 1</span></pre></div> <p dir="auto">内容可以使用-Co​​ntent <content>选项传递,该选项还可以在不打开编辑器的情况下附加内容: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content='nb edit 1 --content "Content to append."'><pre> <span class="notranslate keguazi">nb edit 1 --content <span class="pl-s"><span class="pl-pds">"</span> Content to append. <span class="pl-pds">"</span></span></span></pre></div> <p dir="auto">使用-OverWrite选项覆盖现有的文件内容和 - 启用选项,以在现有内容之前预先预订新内容。</p> <p dir="auto">当内容被管道或用-content <content>指定时,请在更改提交更改之前使用-edit标志在编辑器中打开文件。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 编辑加密注释</h5></div> <p dir="auto">在加密注释后, nb编辑会提示您获取Note密码,在编辑器中打开未加密的内容,然后在您完成编辑后自动重新加密注释。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 快捷方式别名: nb E</h5></div> <p dir="auto"> nb编辑可以由快捷方式别名nb e: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# edit note by id <span class=" notranslate keguazi>nb e 3 # edit note by filename nb e example.md # edit note by title nb e "A Document Title" # edit note by id, alternative nb 3 e # edit note 12 in the notebook named "example" nb e example:12 # edit note 12 in the notebook named "example", alternative nb example:12 e # edit note 12 in the notebook named "example", alternative nb example:e 12"><pre> <span class="pl-c"><span class="pl-c">#</span> edit note by id</span> nb e 3 <span class="pl-c"><span class="pl-c">#</span> edit note by filename</span> nb e example.md <span class="pl-c"><span class="pl-c">#</span> edit note by title</span> nb e <span class="pl-s"><span class="pl-pds">"</span> A Document Title <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> edit note by id, alternative</span> nb 3 e <span class="pl-c"><span class="pl-c">#</span> edit note 12 in the notebook named "example"</span> nb e example:12 <span class="pl-c"><span class="pl-c">#</span> edit note 12 in the notebook named "example", alternative</span> nb example:12 e <span class="pl-c"><span class="pl-c">#</span> edit note 12 in the notebook named "example", alternative</span> nb example:e 12</pre> </div> <p dir="auto">对于nb编辑帮助信息,请运行nb帮助编辑。</p> <div class="markdown-heading" dir="auto"><h5 tabindex="-1" class="heading-element" dir="auto"> 与浏览编辑</h5></div> <p dir="auto">可以使用nb浏览编辑 / nb在终端和GUI Web浏览器中进行编辑项目: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="❯ <span class=" notranslate keguazi>nb browse edit text:formats/markdown/123 ❯ nb · text : formats / markdown / 123 · ↓ · editing · - | + [# Daring Fireball: Markdown (daringfireball.net) ] [ ] [<https://da*ring*fi*reball.net/projects/markdown/> ] [ ] [## Related ] [ ] [- <https://en.wiki**pe*dia.org/wiki/Markdown> ] [ ] [## Comments ] [ ] [See also: ] [ ] [- [[text:formats/org]] ] [- [[cli:apps/ nb ]] ] [ ] [## Tags ] [ ] [save] · last: 2021-01-01 01:00:00"><pre>❯ nb browse edit text:formats/markdown/123 ❯ nb · text <span class="pl-c1">:</span> formats / markdown / 123 · ↓ · editing · - <span class="pl-k">|</span> + [ <span class="pl-c"><span class="pl-c">#</span> Daring Fireball: Markdown (daringfireball.net) ]</span> [ ] [ <span class="pl-k"><</span> https://**daring*fireball.net/projects/markdown/ <span class="pl-k">></span> ] [ ] [ <span class="pl-c"><span class="pl-c">#</span> # Related ]</span> [ ] [- <span class="pl-k"><</span> https://en.**wikip*edia.org/wiki/Markdown <span class="pl-k">></span> ] [ ] [ <span class="pl-c"><span class="pl-c">#</span> # Comments ]</span> [ ] [See also: ] [ ] [- [[text:formats/org]] ] [- [[cli:apps/ nb ]] ] [ ] [ <span class="pl-c"><span class="pl-c">#</span> # Tags ]</span> [ ] [save] · last: 2021-01-01 01:00:00</pre> </div> <p dir="auto">有关更多信息,请参见浏览编辑和浏览。</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto"> 观看</h4></div> <p dir="auto"><sup>↑· nb Show, nb浏览, nb Open, nb Peek</sup></p> <p dir="auto">可以使用nb Show(快捷方式: nb S)查看注释和其他项目: </p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# show note by id <span class=" notranslate keguazi>nb show 3 # show note by filename nb show example.md # show note by title nb show "A Document Title" # show note by id, alternative nb 3 show # show note 12 in the notebook named "example" nb show example:12 # show note 12 in the notebook named "example", alternative nb example:12 show # show note 12 in the notebook named "example", alternative nb example:show 12"><pre> <span class="pl-c"><span class="pl-c">#</span> show note by id</span> nb show 3 <span class="pl-c"><span class="pl-c">#</span> show note by filename</span> nb show example.md <span class="pl-c"><span class="pl-c">#</span> show note by title</span> nb show <span class="pl-s"><span class="pl-pds">"</span> A Document Title <span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> show note by id, alternative</span> nb 3 show <span class="pl-c"><span class="pl-c">#</span> show note 12 in the notebook named "example"</span> nb show exa</pre> </div> </article> <!-- --> <div class="shadow_box bg-white rounded-xl shadow-sm p-8"> <div class="title text-lg"><i class="fa fa-download text-primary mr-2"></i>下载源码</div> <div class="share_box"> <div class="share_item"> <span class="share_list active github"><i class="fa fa-github mr-2 text-xl"></i><a href="https://github.com/xwmx/nb.git" id="btnPos" rel="noreferrer nofollow" target="_blank">从 GitHub 克隆</a></span> </div> </div> <div class="copy_box"> <p>通过命令行克隆项目:</p> <div class="input_box"> <span class="text">git clone https://github.com/xwmx/nb.git</span> <span title="复制" class="copy_btn"></span> </div> </div> </div> </div> <!-- right-aside --> <div class="space-y-8"> <!-- 搜索框(移动端) --> <div class="md:hidden bg-white rounded-xl shadow-sm p-4 mb-8"> <div class="relative"> <input type="text" placeholder="搜索Python文章..." class="w-full pl-10 pr-4 py-2 rounded-full border border-gray-200 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 text-sm"> <button class="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted"> <i class="fa fa-search"></i> </button> </div> </div> <!-- 最新文章 --> <div class="bg-white rounded-xl shadow-sm p-6" style="margin-top: 0;"> <h3 class="text-lg font-bold mb-4 border-b pb-3">相关文章</h3> <div class="space-y-4"> <a href="/download/212755.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20250822/logo_68a8048ad18bd1.png" alt="blink"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> blink</h4> <p class="text-sm text-muted mt-1">2025-08-23</p> </div> </a> <a href="/download/212754.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20250822/logo_68a804477a1fc1.png" alt="kilocode"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> kilocode</h4> <p class="text-sm text-muted mt-1">2025-08-22</p> </div> </a> <a href="/download/212752.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20250822/logo_68a8042e75ac61.png" alt="dendron"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> dendron</h4> <p class="text-sm text-muted mt-1">2025-08-23</p> </div> </a> <a href="/download/212749.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20250822/logo_68a803d917e411.png" alt="vscode leetcode"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> vscode leetcode</h4> <p class="text-sm text-muted mt-1">2025-08-23</p> </div> </a> </div> </div> <!-- 推荐阅读 --> <div class="bg-white rounded-xl shadow-sm p-6"> <h3 class="text-lg font-bold mb-4 border-b pb-3">推荐阅读</h3> <div class="space-y-4"> <a href="/download/226184.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20260115/logo_69687066211c51.jpg" alt="向上:银河游戏免安装正式版"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> 向上:银河游戏免安装正式版</h4> <p class="text-sm text-muted mt-1">2026-01-23</p> </div> </a> <a href="/download/226185.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20260115/logo_6968706c955e21.jpg" alt="风暴驭使正式中文版"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> 风暴驭使正式中文版</h4> <p class="text-sm text-muted mt-1">2026-01-23</p> </div> </a> <a href="/download/226206.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20260115/logo_696876727dcb61.jpg" alt="冥河:贪婪之刃中文试玩版"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> 冥河:贪婪之刃中文试玩版</h4> <p class="text-sm text-muted mt-1">2026-01-23</p> </div> </a> <a href="/download/226207.html" class="flex group"> <div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-lg overflow-hidden flex items-center justify-center" style="position: relative;"> <div class="lazy-src" lazy-src="https://images.downcodes.com/uploads/20260115/logo_6968767dddbfc1.jpg" alt="超级键盘侠免安装绿色中文版"> </div> </div> <div class="ml-4"> <h4 class="font-medium text-dark group-hover:text-primary transition-colors line-clamp-2"> 超级键盘侠免安装绿色中文版</h4> <p class="text-sm text-muted mt-1">2026-01-23</p> </div> </a> </div> </div> </div> </div> </main> <!-- footer --> <footer class="bg-neutral-800 text-white pt-12 pb-6"> <div class="container mx-auto px-4 sm:px-6 lg:px-8"> <div class="copyright"> <a href="javascript:void(0)">关于本站</a> |  <a href="javascript:void(0)">版权声明</a> | <a href="javascript:void(0)">合作联系</a> | <a href="/download/allcategory.html">网站地图</a> |  <a href="javascript:void(0)">帮助中心</a>  </div> <p class="text_info">Copyright © 2006-2025 downcodes.com | 联系:ymdowncodes@163.com</p> <p class="text_info">备案:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">湘ICP备2022016001号-1</a> </p> </div> </footer> </body> <script type="text/javascript" src="/index/js/jquery-1.8.3.min.js"></script> <script src="/assets/ymzy/js/index.js"></script> <script src="/assets/ymzy/prism.min.js"></script> <script> // document.querySelectorAll('.copy-btn').forEach(btn => { btn.addEventListener('click', function() { const textElement = this.closest('.code-block').querySelector('.code-body pre code'); const textarea = document.createElement('textarea'); textarea.value = textElement.textContent; document.body.appendChild(textarea); textarea.select(); document.execCommand('copy'); document.body.removeChild(textarea); const originalHTML = this.innerHTML; this.innerHTML = '✓ Copied!'; setTimeout(() => { this.innerHTML = originalHTML; }, 3000); }); }); // document.querySelectorAll('.copy_btn').forEach(btn => { btn.addEventListener('click', function() { const textElement = this.closest('.input_box').querySelector('.text'); const textarea = document.createElement('textarea'); textarea.value = textElement.textContent; document.body.appendChild(textarea); textarea.select(); document.execCommand('copy'); document.body.removeChild(textarea); const originalHTML = this.innerHTML; this.innerHTML = '✓ Copied!'; this.classList.add('copied'); setTimeout(() => { this.innerHTML = originalHTML; this.classList.remove('copied'); }, 3000); }); }); </script> </html>