-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update drafts extension - update package manifest with quick capture command - add quick capture command to record a new draft - add quick capture command to README - update Changelog with quick capture command addition * Update drafts extension - update all references to command Quick Capture to Capture, based on feedback from extension author
- Loading branch information
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { LaunchProps, PopToRootType, showHUD } from "@raycast/api"; | ||
import { runAppleScript } from "@raycast/utils"; | ||
|
||
export default async function main(props: LaunchProps<{ arguments: Arguments.Capture }>) { | ||
const { content } = props.arguments; | ||
|
||
const res = await runAppleScript( | ||
` | ||
on run argv | ||
tell application "Drafts" | ||
make new draft with properties {content:argv, flagged:false} | ||
end tell | ||
end run | ||
`, | ||
[content] | ||
); | ||
|
||
await showHUD("Created Draft 👍", { clearRootSearch: true, popToRootType: PopToRootType.Immediate }); | ||
} |