Created
January 5, 2020 05:38
-
-
Save lewisjkl/e4f8564b853db92893ae9a528d736dd9 to your computer and use it in GitHub Desktop.
Shows how to use Scriptable to send Gists to Carbon
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
let url = args.urls[0] | |
if (!url) { | |
let alert = new Alert() | |
alert.message = "Please provide a gist url as input!" | |
alert.present() | |
} else { | |
let paths = url.split("/") | |
let gistId = paths[paths.length - 1] | |
let carbonUrl = "https://carbon.now.sh/" + gistId | |
Safari.openInApp(carbonUrl) | |
} | |
Script.complete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment