Created
September 7, 2014 09:31
-
-
Save guypursey/8963ca9c6e16f5d11867 to your computer and use it in GitHub Desktop.
Post a file to Scriptogr.am via the API
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 script requires `curl` package to be installed. | |
# Replace `$APP_KEY` with the app key from your Scriptogr.am account below OR uncomment the line below and add the ID as a value to the variable. You can get the app key by adding your application on this page (when logged in): http://scriptogr.am/dashboard#developers | |
# $APP_KEY= | |
# Replace `$USER_ID` with the ID from your Scriptogr.am account below OR uncomment the line below and add the ID as a value to the variable. You can get your user ID from towards the bottom of this page (when logged in): http://scriptogr.am/dashboard#settings | |
# $USER_ID= | |
# Replace `$POST_NAME` with the name of the file containing the Markdown content of the post (minus the `.md` extension) OR uncomment the line below and add the extension-less filename as a value to the variable. | |
# $POST_NAME= | |
curl \ | |
-d app_key=$APP_KEY \ | |
-d user_id=$USER_ID \ | |
-d name="$POST_NAME" \ | |
--data-urlencode text@"$POST_NAME.md" \ | |
\ | |
http://scriptogr.am/api/article/post/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment