Skip to content

Commit 02527a1

Browse files
committed
Add more doc comments
1 parent b94cbcc commit 02527a1

File tree

3 files changed

+52
-34
lines changed

3 files changed

+52
-34
lines changed

actions/mac.cherri

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22
macOS-only actions
33
*/
44

5-
#define action mac v18 'filter.apps' getApps()
5+
// [Doc]: Get Apps: Get list of applications.
6+
#define action mac v18 'filter.apps' getApps(): array
67

8+
// [Doc]: Make Disk Image: Create a new disk image.
79
#define action mac v15 makeDiskImage(text name: 'VolumeName', variable contents: 'WFInput', bool ?encrypt: 'EncryptImage' = false) {
810
"SizeToFit": true
911
}
1012

11-
/* Device */
12-
13+
// [Doc]: [Device] Start Screensaver
1314
#define action mac startScreensaver()
1415

16+
// [Doc]: [Device] Sleep: Puts the Mac to sleep.
1517
#define action mac v17 sleep()
1618

19+
// [Doc]: [Device] Display Sleep: Only puts the Mac display to sleep, device remains awake.
1720
#define action mac v17 displaySleep()
1821

19-
/* Interactive Screenshot */
20-
2122
enum screenshotSelection {
2223
'Window',
2324
'Custom',
2425
}
2526

27+
// [Doc]: Take Interactive Screenshot
2628
#define action mac 'takescreenshot' takeInteractiveScreenshot(screenshotSelection ?selection: 'WFTakeScreenshotActionInteractiveSelectionType' = "Window") {
2729
"WFTakeScreenshotScreenshotType": "Interactive"
2830
}
2931

30-
/* Windows */
31-
3232
enum windowPosition {
3333
'Top Left',
3434
'Top Center',
@@ -42,9 +42,10 @@ enum windowPosition {
4242
'Coordinates',
4343
}
4444

45+
// [Doc]: [Windows] Move Window: Move a window to a defined position.
4546
#define action mac moveWindow(variable window: 'WFWindow', windowPosition position: 'WFPosition', bool ?bringToFront: 'WFBringToFront' = true)
4647

47-
enum windowConfiguration {
48+
enum windowSize {
4849
'Fit Screen',
4950
'Top Half',
5051
'Bottom Half',
@@ -57,12 +58,14 @@ enum windowConfiguration {
5758
'Dimensions',
5859
}
5960

60-
#define action mac resizeWindow(variable window: 'WFWindow', windowConfiguration configuration: 'WFConfiguration')
61-
62-
/* Scripts */
61+
// [Doc]: [Windows] Resize Window: Resize a window to defined size.
62+
#define action mac resizeWindow(variable window: 'WFWindow', windowSize configuration: 'WFConfiguration')
6363

64+
// [Doc]: [Scripts] Run Shell Script
6465
#define action mac runShellScript(text script: 'Script', variable input: 'Input', text ?shell: 'Shell' = "/bin/zsh", text ?inputMode: 'InputMode' = "to stdin")
6566

67+
// [Doc]: [Scripts] Run Apple Script
6668
#define action mac runAppleScript(variable input: 'Input', text script: 'Script')
6769

70+
// [Doc]: [Scripts] Run JavaScript for Automation
6871
#define action mac 'runjavascriptforautomation' runJSAutomation(variable input: 'Input', text script: 'Script')

actions/media.cherri

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
Media Actions
33
*/
44

5-
/* Stores */
6-
5+
// [Doc]: Search App Store
76
#define action searchAppStore(text query: 'WFSearchTerm')
87

8+
// [Doc]: Show In iTunes
99
#define action 'showinstore' showIniTunes(variable product: 'WFProduct')
1010

11-
/* Audio */
12-
1311
enum audioQuality {
1412
'Normal',
1513
'Very High',
@@ -31,8 +29,10 @@ enum audioSpeeds {
3129
'2X',
3230
}
3331

32+
// [Doc]: [Audio] Record Audio: Prompt the user to record audio.
3433
#define action recordAudio(audioQuality ?quality: 'WFRecordingCompression' = "Normal", audioStart ?start: 'WFRecordingStart' = "On Tap")
3534

35+
// [Doc]: [Audio] Encode Audio: Encode audio to a different format and/or speed.
3636
#define action 'encodemedia' encodeAudio(
3737
variable audio: 'WFMedia',
3838
audioFormats ?format: 'WFMediaAudioFormat' = "M4A",
@@ -41,10 +41,10 @@ enum audioSpeeds {
4141
"WFMediaAudioOnly": true
4242
}
4343

44+
// [Doc]: [Audio] Play Audio: Play a sound.
4445
#define action playSound(variable input: 'WFInput')
4546

46-
/* Shazam */
47-
47+
// [Doc]: [Shazam] Start Shazam: Prompt the user to play music for Shazam to recognize. Returns Shazam result.
4848
#define action 'shazamMedia' startShazam(bool ?show: 'WFShazamMediaActionShowWhenRun' = true, bool ?showError: 'WFShazamMediaActionErrorIfNotRecognized' = true)
4949

5050
enum shazamDetail {
@@ -61,10 +61,10 @@ enum shazamDetail {
6161
'Name',
6262
}
6363

64+
// [Doc]: [Shazam] Get Shazam Detail: Get detail about a Shazam result.
6465
#define action 'properties.shazam' getShazamDetail(variable input: 'WFInput', shazamDetail detail: 'WFContentItemPropertyName')
6566

66-
/* Camera */
67-
67+
// [Doc]: [Camera] Take Photo: Prompt the user to take one or more photos.
6868
#define action takePhoto(number count: 'WFPhotoCount' = 1, bool showPreview: 'WFCameraCaptureShowPreview' = true)
6969

7070
enum cameraOrientation {
@@ -83,19 +83,19 @@ enum recordingStart {
8383
'Immediately',
8484
}
8585

86+
// [Doc]: [Camera] Take Photo: Prompt the user to start recording a video.
8687
#define action takeVideo(
8788
cameraOrientation ?camera: 'WFCameraCaptureDevice' = "Front",
8889
videoQuality ?quality: 'WFCameraCaptureQuality' = "High",
8990
recordingStart ?recordingStart: 'WFRecordingStart' = "Immediately"
9091
)
9192

92-
/* Screenshots */
93-
93+
// [Doc]: Take Screenshot
9494
#define action takeScreenshot(bool ?mainMonitorOnly: 'WFTakeScreenshotMainMonitorOnly' = false) {
9595
"WFTakeScreenshotScreenshotType": "Full Screen"
9696
}
97-
98-
/* Podcasts */
97+
// [Doc]: [Podcasts] Search Podcasts
98+
#define action searchPodcasts(text query: 'WFSearchTerm')
9999

100100
enum podcastDetail {
101101
'Feed URL',
@@ -109,20 +109,22 @@ enum podcastDetail {
109109
'Name',
110110
}
111111

112-
#define action searchPodcasts(text query: 'WFSearchTerm')
113-
112+
// [Doc]: [Podcasts] Get Podcast Detail
114113
#define action 'properties.podcastshow' getPodcastDetail(variable podcast: 'WFInput', podcastDetail detail: 'WFContentItemPropertyName')
115114

115+
// [Doc]: [Podcasts] Get Podcasts: Get users podcasts.
116116
#define action 'getpodcastsfromlibrary' getPodcasts()
117117

118+
// [Doc]: [Podcasts] Play Podcast
118119
#define action playPodcast(variable podcast: 'WFPodcastShow')
119120

120-
/* Video Editing */
121121

122+
// [Doc]: Strip Media Metadata
122123
#define action 'encodemedia' stripMediaMetadata(variable media: 'WFMedia') {
123124
"Metadata": true
124125
}
125126

127+
// [Doc]: Set Media Metadata
126128
#define action 'encodemedia' setMetadata(
127129
variable media: 'WFMedia',
128130
variable ?artwork: 'WFMetadataArtwork',
@@ -152,6 +154,8 @@ enum encodeVideoSpeeds {
152154
'2X',
153155
}
154156

157+
// [Doc]: [Video Editing] Encode Video: Encode a video to a different format, size and/or speed.
155158
#define action 'encodemedia' encodeVideo(variable video: 'WFMedia', encodeVideoSizes ?size: 'WFMediaSize' = "Passthrough", encodeVideoSpeeds ?speed: 'WFMediaCustomSpeed' = "Normal", bool ?preserveTransparency: 'WFMediaPreserveTransparency' = false)
156159

160+
// [Doc]: [Video Editing] Trim Video: Prompts the user to trim the video.
157161
#define action trimVideo(variable video: 'WFInputMedia')

actions/music.cherri

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,28 @@
22
Music Actions
33
*/
44

5+
// [Doc]: Get Current Song: Gets the currently playing song.
56
#define action getCurrentSong()
67

8+
// [Doc]: Add to Music: Add music to library.
79
#define action 'addtoplaylist' addToMusic(variable songs: 'WFInput')
810

11+
// [Doc]: Select Music: Prompt the user to select music.
912
#define action 'exportsong' selectMusic(bool ?selectMultiple: 'WFExportSongActionSelectMultiple' = false)
1013

11-
enum playMusicShuffles {
14+
enum shuffleMode {
1215
'Off',
1316
'Songs',
1417
}
1518

16-
enum playMusicRepeats {
19+
enum repeatMode {
1720
'None',
1821
'One',
1922
'All',
2023
}
2124

22-
#define action playMusic(variable music: 'WFMediaItems', playMusicShuffles ?shuffle: 'WFPlayMusicActionShuffle', playMusicRepeats ?repeat: 'WFPlayMusicActionRepeat')
25+
// [Doc]: Play Music: Set music to play with modes for shuffle and repeat.
26+
#define action playMusic(variable music: 'WFMediaItems', shuffleMode ?shuffle: 'WFPlayMusicActionShuffle', repeatMode ?repeat: 'WFPlayMusicActionRepeat')
2327

2428
enum musicDetail {
2529
'Title',
@@ -47,40 +51,47 @@ enum musicDetail {
4751
'Name',
4852
}
4953

54+
// [Doc]: Get Music Detail: Get a detail about a song.
5055
#define action 'properties.music' getMusicDetail(variable music: 'WFInput', musicDetail detail: 'WFContentItemPropertyName')
5156

52-
/* Playback */
53-
57+
// [Doc]: [Playback] Play: Press play.
5458
#define action 'pausemusic' play() {
5559
"WFPlayPauseBehavior": "Play"
5660
}
5761

62+
// [Doc]: [Playback] Pause: Press pause.
5863
#define action 'pausemusic' pause() {
5964
"WFPlayPauseBehavior": "Pause"
6065
}
6166

67+
// [Doc]: [Playback] Toggle Play/Pause
6268
#define action 'pausemusic' togglePlayPause() {
6369
"WFPlayPauseBehavior": "Play/Pause"
6470
}
6571

72+
// [Doc]: [Playback] Skip Back: Go to the previous song.
6673
#define action skipBack() {
6774
"WFSkipBackBehavior": "Previous Song"
6875
}
6976

77+
// [Doc]: [Playback] Skip Forward: Go to the next song.
7078
#define action 'skipforward' skipFwd()
7179

80+
// [Doc]: [Playback] Play Next: Add music to play next in the queue.
7281
#define action 'addmusictoupnext' playNext(variable music: 'WFMusic') {
7382
"WFWhenToPlay": "Next"
7483
}
7584

85+
// [Doc]: [Playback] Play Next: Add music to the end of the queue.
7686
#define action 'addmusictoupnext' playLater(variable music: 'WFMusic') {
7787
"WFWhenToPlay": "Later"
7888
}
7989

90+
// [Doc]: [Playback] Clear Up Next: Clear the queue.
8091
#define action clearUpNext()
8192

82-
/* Playlists */
83-
93+
// [Doc]: [Playlists] Add to Playlist
8494
#define action addToPlaylist(text playlistName: 'WFPlaylistName', variable songs: 'WFInput')
8595

86-
#define action 'get.playlist' getPlaylistSongs(variable playlistName: 'WFPlaylistName')
96+
// [Doc]: [Playlists] Get Playlist: Gets songs from a playlist
97+
#define action 'get.playlist' getPlaylistSongs(variable playlistName: 'WFPlaylistName'): array

0 commit comments

Comments
 (0)