Skip to content

Commit ecf45d6

Browse files
committed
feat(beorg): add beorg protocol launcher support
1 parent e61c52e commit ecf45d6

File tree

20 files changed

+785
-0
lines changed

20 files changed

+785
-0
lines changed

.changeset/shiny-lights-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'protocol-launcher': minor
3+
---
4+
5+
feat(beorg): add beorg protocol launcher support

apps/docs/.vitepress/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default defineConfig({
3131
'en/apps/1writer.md': 'apps/1writer.md',
3232
'en/apps/bbedit.md': 'apps/bbedit.md',
3333
'en/apps/bear.md': 'apps/bear.md',
34+
'en/apps/beorg.md': 'apps/beorg.md',
3435
'en/apps/cal2todo.md': 'apps/cal2todo.md',
3536
'en/apps/cherry-studio.md': 'apps/cherry-studio.md',
3637
'en/apps/code-buddy.md': 'apps/code-buddy.md',
@@ -179,6 +180,7 @@ export default defineConfig({
179180
{ text: '1Writer', link: '/apps/1writer' },
180181
{ text: 'BBEdit', link: '/apps/bbedit' },
181182
{ text: 'Bear', link: '/apps/bear' },
183+
{ text: 'Beorg', link: '/apps/beorg' },
182184
{ text: 'Cal2Todo', link: '/apps/cal2todo' },
183185
{ text: 'Cherry Studio', link: '/apps/cherry-studio' },
184186
{ text: 'CodeBuddy', link: '/apps/code-buddy' },
@@ -333,6 +335,7 @@ export default defineConfig({
333335
{ text: '1Writer', link: '/apps/1writer' },
334336
{ text: 'BBEdit', link: '/apps/bbedit' },
335337
{ text: 'Bear', link: '/apps/bear' },
338+
{ text: 'Beorg', link: '/apps/beorg' },
336339
{ text: 'Cal2Todo', link: '/apps/cal2todo' },
337340
{ text: 'Cherry Studio', link: '/apps/cherry-studio' },
338341
{ text: 'CodeBuddy', link: '/apps/code-buddy' },
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export const captureParams = {
2+
title: 'Shopping List',
3+
notes: 'Buy eggs',
4+
scheduled: '2017-10-03',
5+
file: 'shopping',
6+
}
7+
8+
export const captureWithDeadlineParams = {
9+
title: 'New task',
10+
notes: 'Complete project',
11+
deadline: '2017-10-10',
12+
template: 'Daily Review',
13+
edit: true,
14+
}
15+
16+
export const searchParams = {
17+
search: 't bookmark',
18+
}
19+
20+
export const searchWithCallbackParams = {
21+
search: 't bookmark',
22+
xSuccess: 'shortcuts://x-callback-url/run-shortcut?name=ProcessResults',
23+
}
24+
25+
export const showTasksParams = {
26+
search: 't bookmark',
27+
}
28+
29+
export const viewFileParams = {
30+
file: 'shopping',
31+
}

apps/docs/en/apps/beorg.md

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
layout: doc
3+
---
4+
5+
<script setup lang="ts">
6+
import { ref, computed } from 'vue';
7+
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue';
8+
import { open, capture, search, showAgenda, showTasks, viewFile } from 'protocol-launcher/beorg';
9+
import { SelectInstallationMethod } from '../../.vitepress/components';
10+
import {
11+
captureParams,
12+
captureWithDeadlineParams,
13+
searchParams,
14+
searchWithCallbackParams,
15+
showTasksParams,
16+
viewFileParams,
17+
} from '../../.vitepress/constants/beorg';
18+
19+
const currentMethod = ref('On-Demand');
20+
const importPath = computed(() => currentMethod.value === 'On-Demand' ? 'protocol-launcher/beorg' : 'protocol-launcher');
21+
</script>
22+
23+
# Beorg
24+
25+
[Beorg](https://www.beorgapp.com/) is a powerful task management app for iPhone and iPad that uses plain text files in Org mode syntax. **Protocol Launcher** allows you to generate deep links to open Beorg, capture tasks, search for items, and view your agenda and tasks.
26+
27+
## Usage
28+
29+
There are two ways to use this library:
30+
31+
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
32+
- Full Import from the root package is convenient but includes all app modules.
33+
34+
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
35+
36+
<SelectInstallationMethod v-model="currentMethod" />
37+
38+
### Open Beorg
39+
40+
```ts-vue [{{currentMethod}}]
41+
import { {{ currentMethod === 'On-Demand' ? 'open' : 'beorg' }} } from '{{ importPath }}'
42+
43+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}open()
44+
```
45+
46+
<div class="flex justify-center">
47+
<VPLink :href="open()" target="_self">
48+
Open Beorg
49+
</VPLink>
50+
</div>
51+
52+
### Capture
53+
54+
Add a new item to Beorg (capture).
55+
56+
```ts-vue [{{currentMethod}}]
57+
import { {{ currentMethod === 'On-Demand' ? 'capture' : 'beorg' }} } from '{{ importPath }}'
58+
59+
// Capture with title, notes, schedule and file
60+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}capture({
61+
title: 'Shopping List',
62+
notes: 'Buy eggs',
63+
scheduled: '2017-10-03',
64+
file: 'shopping',
65+
})
66+
67+
// Capture with deadline, template and edit option
68+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}capture({
69+
title: 'New task',
70+
notes: 'Complete project',
71+
deadline: '2017-10-10',
72+
template: 'Daily Review',
73+
edit: true,
74+
})
75+
```
76+
77+
<div class="flex flex-col gap-4 items-center">
78+
<VPLink :href="capture(captureParams)" target="_self">
79+
Capture Task
80+
</VPLink>
81+
<VPLink :href="capture(captureWithDeadlineParams)" target="_self">
82+
Capture with Deadline
83+
</VPLink>
84+
</div>
85+
86+
### Search
87+
88+
Search for items in Beorg and return results as JSON.
89+
90+
```ts-vue [{{currentMethod}}]
91+
import { {{ currentMethod === 'On-Demand' ? 'search' : 'beorg' }} } from '{{ importPath }}'
92+
93+
// Simple search
94+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}search({
95+
search: 't bookmark',
96+
})
97+
98+
// Search with callback URL
99+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}search({
100+
search: 't bookmark',
101+
xSuccess: 'shortcuts://x-callback-url/run-shortcut?name=ProcessResults',
102+
})
103+
```
104+
105+
<div class="flex flex-col gap-4 items-center">
106+
<VPLink :href="search(searchParams)" target="_self">
107+
Search in Beorg
108+
</VPLink>
109+
<VPLink :href="search(searchWithCallbackParams)" target="_self">
110+
Search with Callback
111+
</VPLink>
112+
</div>
113+
114+
### Show Agenda
115+
116+
Show the agenda in Beorg.
117+
118+
```ts-vue [{{currentMethod}}]
119+
import { {{ currentMethod === 'On-Demand' ? 'showAgenda' : 'beorg' }} } from '{{ importPath }}'
120+
121+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}showAgenda()
122+
```
123+
124+
<div class="flex justify-center">
125+
<VPLink :href="showAgenda()" target="_self">
126+
Show Agenda
127+
</VPLink>
128+
</div>
129+
130+
### Show Tasks
131+
132+
Show the tasks tab in Beorg, optionally with a search filter.
133+
134+
```ts-vue [{{currentMethod}}]
135+
import { {{ currentMethod === 'On-Demand' ? 'showTasks' : 'beorg' }} } from '{{ importPath }}'
136+
137+
// Show all tasks
138+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}showTasks({})
139+
140+
// Show tasks with search filter
141+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}showTasks({
142+
search: 't bookmark',
143+
})
144+
```
145+
146+
<div class="flex flex-col gap-4 items-center">
147+
<VPLink :href="showTasks({})" target="_self">
148+
Show All Tasks
149+
</VPLink>
150+
<VPLink :href="showTasks(showTasksParams)" target="_self">
151+
Show Tasks with Filter
152+
</VPLink>
153+
</div>
154+
155+
### View File
156+
157+
View a specific file in Beorg.
158+
159+
```ts-vue [{{currentMethod}}]
160+
import { {{ currentMethod === 'On-Demand' ? 'viewFile' : 'beorg' }} } from '{{ importPath }}'
161+
162+
const url = {{currentMethod === 'On-Demand' ? '' : 'beorg.'}}viewFile({
163+
file: 'shopping',
164+
})
165+
```
166+
167+
<div class="flex justify-center">
168+
<VPLink :href="viewFile(viewFileParams)" target="_self">
169+
View File
170+
</VPLink>
171+
</div>

apps/docs/en/guide/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ For detailed usage instructions for each application, please refer to their resp
136136
- [Appigo Todo](../apps/appigo-todo.md)
137137
- [BBEdit](../apps/bbedit.md)
138138
- [Bear](../apps/bear.md)
139+
- [Beorg](../apps/beorg.md)
139140
- [Cal2Todo](../apps/cal2todo.md)
140141
- [Cherry Studio](../apps/cherry-studio.md)
141142
- [CodeBuddy](../apps/code-buddy.md)

apps/docs/en/guide/what-is-it.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Currently, we support the following applications:
3434
- [Appigo Todo](../apps/appigo-todo.md)
3535
- [BBEdit](../apps/bbedit.md)
3636
- [Bear](../apps/bear.md)
37+
- [Beorg](../apps/beorg.md)
3738
- [Cal2Todo](../apps/cal2todo.md)
3839
- [Cherry Studio](../apps/cherry-studio.md)
3940
- [CodeBuddy](../apps/code-buddy.md)

0 commit comments

Comments
 (0)