Skip to content

Bear

Bear 是一款精美、灵活的写作应用,用于撰写笔记和散文。Bear 可在 iPhone、iPad 和 Mac 上运行,提供编写、编辑和组织想法所需的一切功能。凭借强大的标签管理系统、Markdown 支持以及跨设备无缝同步,Bear 非常适合从快速笔记到深度文章的各种场景。Protocol Launcher 允许你生成深度链接,在 Bear 中打开笔记、创建内容、搜索和管理标签。

使用方法

使用这个库有两种方式:

  • 按需从子路径导入支持 tree-shaking,保持打包体积小。
  • 从根目录完整导入很方便,但会包含所有应用模块。

生产构建选择按需导入;完整导入适合快速脚本或演示。

选择安装方式

按需加载
推荐使用。生产环境优化。
全量导入
使用便捷。适合快速脚本。

打开 Bear

On-Demand
ts
import { open } from 'protocol-launcher/bear'

const url = open()

打开笔记

On-Demand
ts
import { openNote } from 'protocol-launcher/bear'

const url = openNote({
  title: 'Shopping',
})

创建笔记

On-Demand
ts
import { create } from 'protocol-launcher/bear'

const url = create({
  title: 'Shopping',
  text: 'Milk',
  tags: 'home,groceries',
})

添加文本到笔记

On-Demand
ts
import { addText } from 'protocol-launcher/bear'

const url = addText({
  text: 'new line',
  id: '4EDAF0D1',
  mode: 'append',
})

搜索

On-Demand
ts
import { search } from 'protocol-launcher/bear'

const url = search({
  term: 'nemo',
  tag: 'movies',
})

打开标签

On-Demand
ts
import { openTag } from 'protocol-launcher/bear'

const url = openTag({
  tag: 'work',
})

重命名标签

On-Demand
ts
import { renameTag } from 'protocol-launcher/bear'

const url = renameTag({
  tag: 'old-tag',
  newTag: 'new-tag',
})

删除标签

On-Demand
ts
import { deleteTag } from 'protocol-launcher/bear'

const url = deleteTag({
  tag: 'obsolete-tag',
})

显示待办事项

On-Demand
ts
import { todo } from 'protocol-launcher/bear'

const url = todo({
  search: 'home',
})

显示今日笔记

On-Demand
ts
import { today } from 'protocol-launcher/bear'

const url = today()

显示已锁定笔记

On-Demand
ts
import { locked } from 'protocol-launcher/bear'

const url = locked()

显示未标记笔记

On-Demand
ts
import { untagged } from 'protocol-launcher/bear'

const url = untagged()

显示废纸篓

On-Demand
ts
import { trash } from 'protocol-launcher/bear'

const url = trash()

显示归档

On-Demand
ts
import { archive } from 'protocol-launcher/bear'

const url = archive()

抓取网址

On-Demand
ts
import { grabUrl } from 'protocol-launcher/bear'

const url = grabUrl({
  url: 'https://bear.app',
})

获取所有标签

On-Demand
ts
import { tags } from 'protocol-launcher/bear'

const url = tags({
  token: '123456-123456-123456',
})