Skip to content

Pushcut

Pushcut 是一款自动化应用。Protocol Launcher 可以生成官方 Pushcut URL scheme 链接,用于打开 Pushcut 及其文档列出的视图。

Pushcut 官方 URL scheme 以 pushcut:// 开头。文档列出的打开形式是 pushcut://open/ 后接视图名:notificationstriggerswidgetsserveraccountrunServermonitorServernotificationsLog

使用方式

有两种使用此库的方式:

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

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

选择安装方式

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

打开 Pushcut

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

const url = open()

打开视图

On-Demand
ts
import { openView } from 'protocol-launcher/pushcut'

const url = openView({
  view: 'notifications',
})

打开 Notifications

On-Demand
ts
import { openNotifications } from 'protocol-launcher/pushcut'

const url = openNotifications()

打开 Triggers

On-Demand
ts
import { openTriggers } from 'protocol-launcher/pushcut'

const url = openTriggers()

打开 Widgets

On-Demand
ts
import { openWidgets } from 'protocol-launcher/pushcut'

const url = openWidgets()

打开 Server

On-Demand
ts
import { openServer } from 'protocol-launcher/pushcut'

const url = openServer()

打开 Account

On-Demand
ts
import { openAccount } from 'protocol-launcher/pushcut'

const url = openAccount()

Run Server

On-Demand
ts
import { runServer } from 'protocol-launcher/pushcut'

const url = runServer()

Monitor Server

On-Demand
ts
import { monitorServer } from 'protocol-launcher/pushcut'

const url = monitorServer()

打开 Notifications Log

On-Demand
ts
import { openNotificationsLog } from 'protocol-launcher/pushcut'

const url = openNotificationsLog()

参考资料