File tree 4 files changed +33
-1
lines changed
4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -1270,11 +1270,17 @@ ${lastRunBlock}
1270
1270
shortcut : `${ cmd } +.` ,
1271
1271
description : "Open {{name}}'s markdown in your editor"
1272
1272
} ,
1273
+ 'share-script-to-scriptkit' : {
1274
+ group : 'Share' ,
1275
+ name : 'Share to ScriptKit.com' ,
1276
+ description : 'Share {{name}} to the community script library' ,
1277
+ shortcut : `${ cmd } +s`
1278
+ } ,
1273
1279
'share-script-as-discussion' : {
1274
1280
group : 'Share' ,
1275
1281
name : 'Post to Community Scripts' ,
1276
1282
description : 'Share {{name}} on GitHub Discussions' ,
1277
- shortcut : `${ cmd } +s`
1283
+ shortcut : `${ cmd } +opt+ s`
1278
1284
} ,
1279
1285
'share-script-as-link' : {
1280
1286
group : 'Share' ,
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ export interface CLI {
70
70
"search-docs" : Promise < typeof import ( "./search-docs" ) >
71
71
"view-docs" : Promise < typeof import ( "./view-docs" ) >
72
72
"share-copy" : Promise < typeof import ( "./share-copy" ) >
73
+ "share-script-to-scriptkit" : Promise <
74
+ typeof import ( "./share-script-to-scriptkit" )
75
+ >
73
76
"share-script-as-discussion" : Promise <
74
77
typeof import ( "./share-script-as-discussion" )
75
78
>
Original file line number Diff line number Diff line change
1
+ //Menu: Share Script to ScriptKit.com
2
+ //Description: Copy script to clipboard and open ScriptKit.com to create a new script
3
+
4
+ let { filePath } = await selectScript (
5
+ `Share which script?`
6
+ )
7
+
8
+ const content = await readFile ( filePath , "utf8" )
9
+ await clipboard . writeText ( content )
10
+ await notify ( {
11
+ title : "Script contents copied to clipboard" ,
12
+ body : "Opening scriptkit.com/new to paste script"
13
+ } )
14
+
15
+ await open ( `https://scriptkit.com/new` )
16
+
17
+ export { }
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ let how: keyof CLI = await arg(
15
15
resize : true ,
16
16
} ,
17
17
[
18
+ {
19
+ name : "Share on ScriptKit.com" ,
20
+ description :
21
+ "Post script to the community script library" ,
22
+ value : "share-script-to-scriptkit" ,
23
+ } ,
18
24
{
19
25
name : "Create Github Discussion" ,
20
26
description :
You can’t perform that action at this time.
0 commit comments