Skip to content

Agenda

Agenda 是一款专为创意人士和专业人士设计的笔记应用,让您能够按日期组织想法。Protocol Launcher 允许您生成深度链接,以在 Agenda 中创建和管理笔记、项目和分类。

使用方式

有两种使用此库的方式:

  • 按需导入(On-Demand):从子路径导入支持 tree-shaking,保持较小的打包体积。
  • 完整导入(Full Import):从根包导入更方便,但会包含所有应用模块。

生产构建建议选择按需导入;快速脚本或演示可以使用完整导入。

选择安装方式

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

创建笔记

On-Demand
ts
import { createNote } from 'protocol-launcher/agenda'

const url = createNote({
  title: '会议记录',
  text: '讨论项目路线图',
  projectTitle: '工作',
  onTheAgenda: true,
  date: '2024-01-15',
})

创建项目

On-Demand
ts
import { createProject } from 'protocol-launcher/agenda'

const url = createProject({
  title: '新项目',
  categoryTitle: '工作',
  select: true,
  sortOrder: 'newest-first',
})

创建分类

On-Demand
ts
import { createCategory } from 'protocol-launcher/agenda'

const url = createCategory({
  title: '新分类',
})

打开笔记

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

const url = openNote({
  title: '与 Peta 的会议',
  projectTitle: '工作',
})

打开项目

On-Demand
ts
import { openProject } from 'protocol-launcher/agenda'

const url = openProject({
  title: '工作项目',
})

打开概览

On-Demand
ts
import { openOverview } from 'protocol-launcher/agenda'

const url = openOverview({
  title: '本周',
})

打开搜索

On-Demand
ts
import { openSearch } from 'protocol-launcher/agenda'

const url = openSearch({
  query: '#重要',
})

追加到笔记

On-Demand
ts
import { appendToNote } from 'protocol-launcher/agenda'

const url = appendToNote({
  title: '某些笔记',
  text: '更多文本',
  onTheAgenda: true,
})

替换笔记

On-Demand
ts
import { replaceNote } from 'protocol-launcher/agenda'

const url = replaceNote({
  title: '某些笔记',
  text: '新内容',
})

获取标识符

On-Demand
ts
import { getIdentifier } from 'protocol-launcher/agenda'

const url = getIdentifier({
  projectTitle: '欢迎',
  title: '尝试事项',
})

获取选择

On-Demand
ts
import { getSelection } from 'protocol-launcher/agenda'

const url = getSelection()

获取选中的笔记

On-Demand
ts
import { getSelectedNote } from 'protocol-launcher/agenda'

const url = getSelectedNote()

获取选中的项目

On-Demand
ts
import { getSelectedProject } from 'protocol-launcher/agenda'

const url = getSelectedProject()

今天

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

const url = today()

在议程上

On-Demand
ts
import { onTheAgenda } from 'protocol-launcher/agenda'

const url = onTheAgenda()