Skip to content

Commit 9ad98a2

Browse files
committed
feat(terminology): add terminology protocol launcher support
1 parent 3d37210 commit 9ad98a2

File tree

17 files changed

+294
-0
lines changed

17 files changed

+294
-0
lines changed

.changeset/frank-suns-nail.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(terminology): add terminology protocol launcher support

apps/docs/.vitepress/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export default defineConfig({
9595
'en/apps/steam.md': 'apps/steam.md',
9696
'en/apps/tally.md': 'apps/tally.md',
9797
'en/apps/telegram.md': 'apps/telegram.md',
98+
'en/apps/terminology.md': 'apps/terminology.md',
9899
'en/apps/termius.md': 'apps/termius.md',
99100
'en/apps/textastic.md': 'apps/textastic.md',
100101
'en/apps/textmate.md': 'apps/textmate.md',
@@ -237,6 +238,7 @@ export default defineConfig({
237238
{ text: 'Steam', link: '/apps/steam' },
238239
{ text: 'Tally', link: '/apps/tally' },
239240
{ text: 'Telegram', link: '/apps/telegram' },
241+
{ text: 'Terminology', link: '/apps/terminology' },
240242
{ text: 'Termius', link: '/apps/termius' },
241243
{ text: 'Textastic', link: '/apps/textastic' },
242244
{ text: 'TextMate', link: '/apps/textmate' },
@@ -384,6 +386,7 @@ export default defineConfig({
384386
{ text: 'Steam', link: '/apps/steam' },
385387
{ text: 'Tally', link: '/apps/tally' },
386388
{ text: 'Telegram', link: '/apps/telegram' },
389+
{ text: 'Terminology', link: '/apps/terminology' },
387390
{ text: 'Termius', link: '/apps/termius' },
388391
{ text: 'Textastic', link: '/apps/textastic' },
389392
{ text: 'TextMate', link: '/apps/textmate' },
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export const lookupParams = {
2+
text: 'automation',
3+
}
4+
5+
export const searchParams = {
6+
q: 'protocol',
7+
}

apps/docs/en/apps/terminology.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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, lookup, search } from 'protocol-launcher/terminology'
9+
import { SelectInstallationMethod } from '../../.vitepress/components'
10+
import { lookupParams, searchParams } from '../../.vitepress/constants/terminology'
11+
12+
const currentMethod = ref('On-Demand')
13+
const importPath = computed(() =>
14+
currentMethod.value === 'On-Demand' ? 'protocol-launcher/terminology' : 'protocol-launcher',
15+
)
16+
</script>
17+
18+
# Terminology
19+
20+
[Terminology](https://agiletortoise.com/terminology/) is a browser for the English language – part dictionary, part thesaurus, and part research tool. **Protocol Launcher** allows you to generate deep links to look up words and search in Terminology.
21+
22+
## Usage
23+
24+
There are two ways to use this library:
25+
26+
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
27+
- Full Import from the root package is convenient but includes all app modules.
28+
29+
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
30+
31+
<SelectInstallationMethod v-model="currentMethod" />
32+
33+
### Open App
34+
35+
```ts-vue [{{currentMethod}}]
36+
import { {{ currentMethod === 'On-Demand' ? 'open' : 'terminology' }} } from '{{ importPath }}'
37+
38+
const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}open()
39+
```
40+
41+
<div class="flex justify-center">
42+
<VPLink :href="open()" target="_self">
43+
<Button Text>
44+
</VPLink>
45+
</div>
46+
47+
### Lookup Word
48+
49+
Open directly to a detail look up for a term in Terminology.
50+
51+
```ts-vue [{{currentMethod}}]
52+
import { {{ currentMethod === 'On-Demand' ? 'lookup' : 'terminology' }} } from '{{ importPath }}'
53+
54+
const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}lookup({
55+
text: 'automation',
56+
})
57+
```
58+
59+
<div class="flex justify-center">
60+
<VPLink :href="lookup(lookupParams)" target="_self">
61+
<Button Text>
62+
</VPLink>
63+
</div>
64+
65+
### Search
66+
67+
Open directly to a word search for a string in Terminology.
68+
69+
```ts-vue [{{currentMethod}}]
70+
import { {{ currentMethod === 'On-Demand' ? 'search' : 'terminology' }} } from '{{ importPath }}'
71+
72+
const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}search({
73+
q: 'protocol',
74+
})
75+
```
76+
77+
<div class="flex justify-center">
78+
<VPLink :href="search(searchParams)" target="_self">
79+
<Button Text>
80+
</VPLink>
81+
</div>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ For detailed usage instructions for each application, please refer to their resp
200200
- [Steam](../apps/steam.md)
201201
- [Tally](../apps/tally.md)
202202
- [Telegram](../apps/telegram.md)
203+
- [Terminology](../apps/terminology.md)
203204
- [Termius](../apps/termius.md)
204205
- [Textastic](../apps/textastic.md)
205206
- [TextMate](../apps/textmate.md)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Currently, we support the following applications:
9898
- [Steam](../apps/steam.md)
9999
- [Tally](../apps/tally.md)
100100
- [Telegram](../apps/telegram.md)
101+
- [Terminology](../apps/terminology.md)
101102
- [Termius](../apps/termius.md)
102103
- [Textastic](../apps/textastic.md)
103104
- [TextMate](../apps/textmate.md)

apps/docs/zh/apps/terminology.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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, lookup, search } from 'protocol-launcher/terminology'
9+
import { SelectInstallationMethod } from '../../.vitepress/components'
10+
import { lookupParams, searchParams } from '../../.vitepress/constants/terminology'
11+
12+
const currentMethod = ref('On-Demand')
13+
const importPath = computed(() =>
14+
currentMethod.value === 'On-Demand' ? 'protocol-launcher/terminology' : 'protocol-launcher',
15+
)
16+
</script>
17+
18+
# Terminology
19+
20+
[Terminology](https://agiletortoise.com/terminology/) 是一款英语语言浏览器——集词典、同义词词典和研究工具于一体。**Protocol Launcher** 允许您生成深度链接以在 Terminology 中查找单词和搜索。
21+
22+
## 使用方式
23+
24+
有两种使用此库的方式:
25+
26+
- 按需导入(On-Demand):从子路径导入支持 tree-shaking,保持较小的打包体积。
27+
- 完整导入(Full Import):从根包导入更方便,但会包含所有应用模块。
28+
29+
生产构建建议选择按需导入;快速脚本或演示可以使用完整导入。
30+
31+
<SelectInstallationMethod v-model="currentMethod" />
32+
33+
### 打开应用
34+
35+
```ts-vue [{{currentMethod}}]
36+
import { {{ currentMethod === 'On-Demand' ? 'open' : 'terminology' }} } from '{{ importPath }}'
37+
38+
const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}open()
39+
```
40+
41+
<div class="flex justify-center">
42+
<VPLink :href="open()" target="_self">
43+
<Button Text>
44+
</VPLink>
45+
</div>
46+
47+
### 查找单词
48+
49+
直接在 Terminology 中打开某个术语的详细查询页面。
50+
51+
```ts-vue [{{currentMethod}}]
52+
import { {{ currentMethod === 'On-Demand' ? 'lookup' : 'terminology' }} } from '{{ importPath }}'
53+
54+
const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}lookup({
55+
text: 'automation',
56+
})
57+
```
58+
59+
<div class="flex justify-center">
60+
<VPLink :href="lookup(lookupParams)" target="_self">
61+
<Button Text>
62+
</VPLink>
63+
</div>
64+
65+
### 搜索
66+
67+
直接在 Terminology 中打开单词搜索。
68+
69+
```ts-vue [{{currentMethod}}]
70+
import { {{ currentMethod === 'On-Demand' ? 'search' : 'terminology' }} } from '{{ importPath }}'
71+
72+
const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}search({
73+
q: 'protocol',
74+
})
75+
```
76+
77+
<div class="flex justify-center">
78+
<VPLink :href="search(searchParams)" target="_self">
79+
<Button Text>
80+
</VPLink>
81+
</div>

apps/docs/zh/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default defineAdditionalConfig({
107107
{ text: 'Steam', link: '/zh/apps/steam' },
108108
{ text: 'Tally', link: '/zh/apps/tally' },
109109
{ text: 'Telegram', link: '/zh/apps/telegram' },
110+
{ text: 'Terminology', link: '/zh/apps/terminology' },
110111
{ text: 'Termius', link: '/zh/apps/termius' },
111112
{ text: 'Textastic', link: '/zh/apps/textastic' },
112113
{ text: 'TextMate', link: '/zh/apps/textmate' },

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ import { cherryStudio, cursor, githubDesktop } from 'protocol-launcher'
200200
- [Steam](../apps/steam.md)
201201
- [Tally](../apps/tally.md)
202202
- [Telegram](../apps/telegram.md)
203+
- [Terminology](../apps/terminology.md)
203204
- [Termius](../apps/termius.md)
204205
- [Textastic](../apps/textastic.md)
205206
- [TextMate](../apps/textmate.md)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ layout: doc
9797
- [Steam](../apps/steam.md)
9898
- [Tally](../apps/tally.md)
9999
- [Telegram](../apps/telegram.md)
100+
- [Terminology](../apps/terminology.md)
100101
- [Termius](../apps/termius.md)
101102
- [Textastic](../apps/textastic.md)
102103
- [TextMate](../apps/textmate.md)

0 commit comments

Comments
 (0)