-
Notifications
You must be signed in to change notification settings - Fork 23
/
package.json
803 lines (803 loc) · 19.1 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
{
"$schema": "https://www.raycast.com/schemas/extension.json",
"name": "easydict",
"title": "Easy Dictionary",
"description": "Easily look up words or translate text, support 48+ languages, support Linguee and Youdao dictionary, support OpenAI, DeepL, Google, Bing, Apple, Baidu, Tencent, Volcano, Youdao and Caiyun translation.",
"icon": "Eudic.png",
"author": "isfeng",
"license": "MIT",
"contributors": [],
"commands": [
{
"name": "easydict",
"title": "Search Word",
"subtitle": "Easydict",
"description": "Automatically detect the input text language, and query preferred language dictionary or translate the text.",
"mode": "view",
"arguments": [
{
"name": "queryText",
"placeholder": "Query",
"type": "text",
"required": false
}
]
},
{
"name": "ocr",
"title": "OCR Translate",
"icon": "ocr.png",
"subtitle": "Query text from image",
"description": "Screenshot OCR, and query text from image.",
"mode": "no-view"
}
],
"categories": [
"Applications",
"Productivity",
"Developer Tools",
"Web"
],
"keywords": [
"dictionary",
"translate",
"linguee",
"deepl",
"google",
"bing",
"apple",
"youdao",
"baidu",
"tencent",
"eudic",
"openai"
],
"dependencies": {
"@raycast/api": "^1.68.0",
"@vitalets/google-translate-api": "^9.1.0",
"axios": "^1.7.4",
"cheerio": "^1.0.0-rc.12",
"crypto-js": "^4.2.0",
"eventsource": "^2.0.2",
"eventsource-parser": "^0.1.0",
"execa": "^7.1.0",
"file-type": "^18.2.0",
"franc": "^6.1.0",
"hpagent": "^1.2.0",
"mac-system-proxy": "^1.0.4",
"node-fetch": "^3.3.0",
"node-html-parser": "^6.1.5",
"play-sound": "^1.1.6",
"qs": "^6.11.0",
"run-applescript": "^6.1.0",
"tencentcloud-sdk-nodejs-tmt": "^4.0.559"
},
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@raycast/eslint-config": "^1.0.8",
"@types/crypto-js": "^4.1.1",
"@types/eventsource": "^1.1.11",
"@types/node": "^20.8.10",
"@types/play-sound": "^1.1.0",
"@types/qs": "^6.9.7",
"@types/react": "^18.2.27",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"eslint": "^8.36.0",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"prettier": "^2.8.4",
"react": "^18.2.0",
"typescript": "^4.9.5"
},
"scripts": {
"build": "ray build -e dist",
"build-swift": "swift build --configuration=release --arch arm64 --arch x86_64 && mv .build/apple/Products/Release/recognizeText assets",
"dev": "ray develop",
"lint": "ray lint",
"fix-lint": "ray lint --fix",
"lint-staged": "lint-staged",
"prepare": "husky install",
"eslint": "eslint src/** --fix --ext .ts,.tsx,.js,.jsx"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": "npm run eslint",
"**/*": [
"prettier --write . --ignore-unknown"
]
},
"preferences": [
{
"title": "First Language",
"name": "language1",
"type": "dropdown",
"required": true,
"default": "zh-CHS",
"description": "Your first language",
"data": [
{
"title": "Chinese-Simplified",
"value": "zh-CHS"
},
{
"title": "English",
"value": "en"
},
{
"title": "Chinese-Traditional",
"value": "zh-CHT"
},
{
"title": "Japanese",
"value": "ja"
},
{
"title": "Korean",
"value": "ko"
},
{
"title": "French",
"value": "fr"
},
{
"title": "Spanish",
"value": "es"
},
{
"title": "Portuguese",
"value": "pt"
},
{
"title": "Italian",
"value": "it"
},
{
"title": "Russian",
"value": "ru"
},
{
"title": "German",
"value": "de"
},
{
"title": "Arabic",
"value": "ar"
},
{
"title": "Swedish",
"value": "sv"
},
{
"title": "Dutch",
"value": "nl"
},
{
"title": "Romanian",
"value": "ro"
},
{
"title": "Thai",
"value": "th"
},
{
"title": "Slovak",
"value": "sk"
},
{
"title": "Hungarian",
"value": "hu"
},
{
"title": "Greek",
"value": "el"
},
{
"title": "Danish",
"value": "da"
},
{
"title": "Finnish",
"value": "fi"
},
{
"title": "Polish",
"value": "pl"
},
{
"title": "Czech",
"value": "cs"
},
{
"title": "Turkish",
"value": "tr"
},
{
"title": "Lithuanian",
"value": "lt"
},
{
"title": "Latvian",
"value": "lv"
},
{
"title": "Ukrainian",
"value": "uk"
},
{
"title": "Bulgarian",
"value": "bg"
},
{
"title": "Indonesian",
"value": "id"
},
{
"title": "Malay",
"value": "ms"
},
{
"title": "Slovenian",
"value": "sl"
},
{
"title": "Estonian",
"value": "et"
},
{
"title": "Vietnamese",
"value": "vi"
},
{
"title": "Persian",
"value": "fa"
},
{
"title": "Hindi",
"value": "hi"
},
{
"title": "Telugu",
"value": "te"
},
{
"title": "Tamil",
"value": "ta"
},
{
"title": "Urdu",
"value": "ur"
},
{
"title": "Filipino",
"value": "fil"
},
{
"title": "Khmer",
"value": "km"
},
{
"title": "Lao",
"value": "lo"
},
{
"title": "Bengali",
"value": "bn"
},
{
"title": "Burmese",
"value": "my"
},
{
"title": "Georgian",
"value": "ka"
},
{
"title": "Serbian",
"value": "sr"
},
{
"title": "Croatian",
"value": "hr"
},
{
"title": "Montenegrin",
"value": "sr-Latn"
},
{
"title": "Hebrew",
"value": "he"
}
]
},
{
"title": "Second Language",
"name": "language2",
"type": "dropdown",
"required": true,
"default": "en",
"description": "Your second language",
"data": [
{
"title": "English",
"value": "en"
},
{
"title": "Chinese-Simplified",
"value": "zh-CHS"
},
{
"title": "Chinese-Traditional",
"value": "zh-CHT"
},
{
"title": "Japanese",
"value": "ja"
},
{
"title": "Korean",
"value": "ko"
},
{
"title": "French",
"value": "fr"
},
{
"title": "Spanish",
"value": "es"
},
{
"title": "Portuguese",
"value": "pt"
},
{
"title": "Italian",
"value": "it"
},
{
"title": "Russian",
"value": "ru"
},
{
"title": "German",
"value": "de"
},
{
"title": "Arabic",
"value": "ar"
},
{
"title": "Swedish",
"value": "sv"
},
{
"title": "Dutch",
"value": "nl"
},
{
"title": "Romanian",
"value": "ro"
},
{
"title": "Thai",
"value": "th"
},
{
"title": "Slovak",
"value": "sk"
},
{
"title": "Hungarian",
"value": "hu"
},
{
"title": "Greek",
"value": "el"
},
{
"title": "Danish",
"value": "da"
},
{
"title": "Finnish",
"value": "fi"
},
{
"title": "Polish",
"value": "pl"
},
{
"title": "Czech",
"value": "cs"
},
{
"title": "Turkish",
"value": "tr"
},
{
"title": "Lithuanian",
"value": "lt"
},
{
"title": "Latvian",
"value": "lv"
},
{
"title": "Ukrainian",
"value": "uk"
},
{
"title": "Bulgarian",
"value": "bg"
},
{
"title": "Indonesian",
"value": "id"
},
{
"title": "Malay",
"value": "ms"
},
{
"title": "Slovenian",
"value": "sl"
},
{
"title": "Estonian",
"value": "et"
},
{
"title": "Vietnamese",
"value": "vi"
},
{
"title": "Persian",
"value": "fa"
},
{
"title": "Hindi",
"value": "hi"
},
{
"title": "Telugu",
"value": "te"
},
{
"title": "Tamil",
"value": "ta"
},
{
"title": "Urdu",
"value": "ur"
},
{
"title": "Filipino",
"value": "fil"
},
{
"title": "Khmer",
"value": "km"
},
{
"title": "Lao",
"value": "lo"
},
{
"title": "Bengali",
"value": "bn"
},
{
"title": "Burmese",
"value": "my"
},
{
"title": "Georgian",
"value": "ka"
},
{
"title": "Serbian",
"value": "sr"
},
{
"title": "Croatian",
"value": "hr"
},
{
"title": "Montenegrin",
"value": "sr-Latn"
},
{
"title": "Hebrew",
"value": "he"
}
]
},
{
"title": "Bing Host",
"name": "bingHost",
"type": "dropdown",
"label": "Bing Host",
"required": false,
"description": "Bing Host Type",
"default": "",
"data": [
{
"title": "Auto",
"value": ""
},
{
"title": "cn.bing.com",
"value": "cn.bing.com"
},
{
"title": "www.bing.com",
"value": "www.bing.com"
}
]
},
{
"title": "Switch Boxes",
"name": "enableAutomaticQuerySelectedText",
"type": "checkbox",
"label": "Query Selected Text Automatically",
"required": false,
"description": "Automatically query selected text from the frontmost application",
"default": true
},
{
"name": "showOpenInEudicFirst",
"type": "checkbox",
"label": "Show Open in Eudic First",
"required": false,
"description": "If enabled and Eudic is installed, `Open in Eudic` action will be shown in the first, otherwise `Copy Text` will be shown.",
"default": false
},
{
"name": "enableDetectLanguageSpeedFirst",
"type": "checkbox",
"label": "Detect Language Speed First",
"required": false,
"description": "Turned on by default, the speed and accuracy of language detection is well balanced. Turn off if you want more accurate language detection, but slower ⚠️ .",
"default": true
},
{
"name": "enableAutomaticPlayWordAudio",
"type": "checkbox",
"label": "Play Word Pronunciation Automatically",
"required": false,
"description": "Automatically play word pronunciation after looking up a `English` word",
"default": true
},
{
"name": "enableSelectTargetLanguage",
"type": "checkbox",
"label": "Show Select Target Language",
"required": false,
"description": "If you need to select target language manually, turn on it.",
"default": false
},
{
"name": "enableSystemProxy",
"type": "checkbox",
"label": "Use System Proxy",
"required": false,
"description": "⚠️ Note that it should only be enabled if needed, as it can slow down requests.",
"default": false
},
{
"title": "Langauge Detection",
"name": "enableBaiduLanguageDetect",
"type": "checkbox",
"label": "Enable Baidu Language Detect",
"required": false,
"description": "Turn on/off Baidu Language Detect.",
"default": true
},
{
"title": "Apple System Features",
"name": "enableAppleTranslate",
"type": "checkbox",
"label": "Apple Translate",
"required": false,
"description": "⚠️ An `Apple Translate` shortcut needs to be installed, please see README for more details.",
"default": false
},
{
"title": "Dictionary Services",
"type": "checkbox",
"name": "enableYoudaoDictionary",
"label": "Youdao Dictionary",
"required": false,
"description": "Support 5 languages: (Chinese), English, French, Japanese, Korean.",
"default": true
},
{
"type": "checkbox",
"name": "enableLingueeDictionary",
"label": "Linguee Dictionary",
"required": false,
"description": "Support 19 languages: (Chinese, Japanese, Russian), English, French, Spanish, Portuguese, Italian, German, Swedish, Romanian, Slovak, Dutch, Hungarian, Greek, Danish, Finnish, Polish, Czech.",
"default": true
},
{
"title": "Translation Services",
"type": "checkbox",
"name": "enableOpenAITranslate",
"label": "OpenAI Translate",
"required": false,
"description": "Turn on/off OpenAI Translate. Use system proxy by default. App Key is required.",
"default": false
},
{
"type": "checkbox",
"name": "enableDeepLTranslate",
"label": "DeepL Translate",
"required": false,
"description": "Turn on/off DeepL Translate. Use system proxy by default. App Key is required.",
"default": false
},
{
"name": "enableGoogleTranslate",
"type": "checkbox",
"label": "Google Translate",
"required": false,
"description": "⚠️ Use system proxy by default. A proxy is required to use Google if you are in China.",
"default": false
},
{
"name": "enableBingTranslate",
"type": "checkbox",
"label": "Bing Translate",
"required": false,
"description": "Turn on/off Bing Translate",
"default": true
},
{
"name": "enableBaiduTranslate",
"type": "checkbox",
"label": "Baidu Translate",
"required": false,
"description": "Turn on/off Baidu Translate. App Key is required.",
"default": false
},
{
"name": "enableTencentTranslate",
"type": "checkbox",
"label": "Tencent Translate",
"required": false,
"description": "Turn on/off Tencent Translate. App Key is required.",
"default": true
},
{
"name": "enableVolcanoTranslate",
"type": "checkbox",
"label": "Volcano Translate",
"required": false,
"description": "Turn on/off Volcano Translate. App Key is required.",
"default": false
},
{
"name": "enableYoudaoTranslate",
"type": "checkbox",
"label": "Youdao Translate",
"required": false,
"description": "Turn on/off Youdao Translate",
"default": false
},
{
"name": "enableCaiyunTranslate",
"type": "checkbox",
"label": "Caiyun Translate",
"required": false,
"description": "Turn on/off Caiyun Translate. App Key is required.",
"default": false
},
{
"title": "Service List Order",
"name": "servicesOrder",
"type": "textfield",
"required": false,
"description": "Separate by comma, default is Youao Dictionary, Linguee Dictionary, OpenAI, DeepL, Google, Bing, Apple, Baidu, Tencent, Volcano, Youdao, Caiyun",
"default": "",
"placeholder": "youdao dictionary, linguee dictionary, openai, deepl, google, bing, apple, baidu, tencent, volcano, youdao, caiyun"
},
{
"title": "OpenAI API Key",
"name": "openAIAPIKey",
"type": "textfield",
"required": false,
"description": "Your OpenAI API Key",
"default": ""
},
{
"title": "OpenAI Endpoint",
"name": "openAIAPIURL",
"type": "textfield",
"required": false,
"description": "Custom OpenAI API URL",
"default": "https://api.openai.com/v1/chat/completions",
"placeholder": "https://api.openai.com/v1/chat/completions"
},
{
"title": "OpenAI Model",
"name": "openAIModel",
"type": "textfield",
"required": false,
"description": "OpenAI Model",
"default": "gpt-4o-mini"
},
{
"title": "DeepL Auth Key",
"name": "deepLAuthKey",
"type": "textfield",
"required": false,
"description": "Your DeepL Auth Key",
"default": ""
},
{
"title": "DeepL API URL",
"name": "deepLEndpoint",
"type": "textfield",
"required": false,
"description": "Custom DeepL API URL",
"placeholder": "https://api-free.deepl.com/v2/translate",
"default": ""
},
{
"title": "Baidu App ID",
"name": "baiduAppId",
"type": "textfield",
"required": false,
"description": "Your Baidu App ID",
"default": ""
},
{
"title": "Baidu App Secret",
"name": "baiduAppSecret",
"type": "textfield",
"required": false,
"description": "Your Baidu App Secret",
"default": ""
},
{
"title": "Tencent SecretId",
"name": "tencentSecretId",
"type": "textfield",
"required": false,
"description": "Your Tencent SecretId",
"default": ""
},
{
"title": "Tencent SecretKey",
"name": "tencentSecretKey",
"type": "textfield",
"required": false,
"description": "Your Tencent SecretKey",
"default": ""
},
{
"title": "Volcano Access Key ID",
"name": "volcanoAccessKeyId",
"type": "textfield",
"required": false,
"description": "Your Volcano Access Key ID",
"default": ""
},
{
"title": "Volcano Access Key Secret",
"name": "volcanoAccessKeySecret",
"type": "textfield",
"required": false,
"description": "Your Volcano Access Key Secret",
"default": ""
},
{
"title": "Caiyun Token",
"name": "caiyunToken",
"type": "textfield",
"required": false,
"description": "Your Caiyun Token",
"default": ""
}
]
}