File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Dependency: requires the google-docs-to-markdown npm package: https://github.com/Mr0grog/google-docs-to-markdown
4
+
5
+ # Required parameters:
6
+ # @raycast.schemaVersion 1
7
+ # @raycast.title Convert Google Docs Rich Text HTML to Markdown
8
+ # @raycast.mode silent
9
+
10
+ # Optional parameters:
11
+ # @raycast.icon 📋
12
+ # @raycast.packageName Conversions
13
+ # @raycast.description A script to take the HTML pastboard type filled by google docs and convert it to nicely formatted markdown
14
+
15
+ # Documentation:
16
+ # @raycast.author Michael Bianco
17
+ # @raycast.authorURL https://github.com/iloveitaly
18
+
19
+ set -euo pipefail
20
+
21
+ swift - << EOF | npx google-docs-to-markdown | pbcopy
22
+ import Cocoa
23
+
24
+ let type = NSPasteboard.PasteboardType.html
25
+
26
+ guard let string = NSPasteboard.general.string(forType:type) else {
27
+ fputs("Could not find string data of type '\(type)' on the system pasteboard\n", stderr)
28
+ exit(1)
29
+ }
30
+
31
+ print(string)
32
+ EOF
33
+
You can’t perform that action at this time.
0 commit comments