Skip to content

Day One ​

Day One 是排名第一的日记应用,用于记录生活中的重要时刻。Protocol Launcher 允许您生成深度链接以在 Day One 中创建、编辑和查看日记条目。

使用方式 ​

有两种使用此库的方式:

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

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

选择安装方式

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

Windows 支持日历、时间线、媒体、设置、模板、兑换码及空白新条目链接。它会忽略条目文本、标签、日记本和提示词参数,不支持按条目 ID 查看或编辑。在 Windows 上使用 openTimeline({ platform: 'windows' });默认调用为其他平台保留 dayone://entries。

打开应用 ​

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

const url = open()

创建条目 ​

On-Demand
ts
import { createEntry } from 'protocol-launcher/day-one'

const url = createEntry({
  entry: 'Hello World',
  tags: 'work, test',
})

编辑条目 ​

On-Demand
ts
import { editEntry } from 'protocol-launcher/day-one'

const url = editEntry({
  entryId: '3415BB00651C4533B41F62544A775CCC',
})

查看条目 ​

On-Demand
ts
import { viewEntry } from 'protocol-launcher/day-one'

const url = viewEntry({
  entryId: '22B178B33B2A4149538280F9C34102C5',
})

按标签筛选 ​

On-Demand
ts
import { filterByTag } from 'protocol-launcher/day-one'

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

打开日历 ​

On-Demand
ts
import { openCalendar } from 'protocol-launcher/day-one'

const url = openCalendar()

打开每日提示 ​

On-Demand
ts
import { openDailyPrompt } from 'protocol-launcher/day-one'

const url = openDailyPrompt({
  promptId: 'ck7zw8sybj6kv09983znvrmof',
})

打开日期 ​

On-Demand
ts
import { openDate } from 'protocol-launcher/day-one'

const url = openDate({
  date: '2020-04-02',
})

打开历史上的今天 ​

On-Demand
ts
import { openOnThisDay } from 'protocol-launcher/day-one'

const url = openOnThisDay()

打开设置 ​

On-Demand
ts
import { openSettings } from 'protocol-launcher/day-one'

const url = openSettings()

打开星标条目 ​

On-Demand
ts
import { openStarred } from 'protocol-launcher/day-one'

const url = openStarred()

打开时间线 ​

On-Demand
ts
import { openTimeline } from 'protocol-launcher/day-one'

const url = openTimeline()

最近提示词 ​

在 iOS 上打开最近提示词。

On-Demand
ts
import { openRecentPrompts } from 'protocol-launcher/day-one'

const url = openRecentPrompts()

打开标签 ​

在 iOS 或 macOS 上应用标签筛选。

On-Demand
ts
import { openTags } from 'protocol-launcher/day-one'

const url = openTags({
  name: 'work'
})

书籍打印 ​

在 iOS 上打开书籍打印。

On-Demand
ts
import { openBook } from 'protocol-launcher/day-one'

const url = openBook()

模板 ​

在 iOS 或 Windows 上打开模板。

On-Demand
ts
import { openTemplates } from 'protocol-launcher/day-one'

const url = openTemplates()

兑换码 ​

在 iOS 或 Windows 上打开兑换码界面。

On-Demand
ts
import { openRedeem } from 'protocol-launcher/day-one'

const url = openRedeem()

加密密钥 ​

在 iOS 或 macOS 上打开加密密钥界面。

On-Demand
ts
import { openEncryptionKey } from 'protocol-launcher/day-one'

const url = openEncryptionKey()

Siri 快捷指令 ​

在 iOS 上打开 Siri 快捷指令设置。

On-Demand
ts
import { openSiri } from 'protocol-launcher/day-one'

const url = openSiri()

媒体 ​

在 Windows 上打开媒体视图。

On-Demand
ts
import { openMedia } from 'protocol-launcher/day-one'

const url = openMedia()

官方文档 ​