Created
January 2, 2023 18:50
-
-
Save scripting/231ba2151c3f1bbff8b1383d334e775f to your computer and use it in GitHub Desktop.
The script I use to publish from Drummer to Micro.blog
This file contains hidden or 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
var urlOutline = opml.getHeaders ().urlPublic; | |
if (urlOutline === undefined) { | |
dialog.alert ("Can't publish your outline because it doesn't have an \"urlPublic\" head-level attribute."); | |
} | |
else { //ping the server | |
http.readUrl ("https://micro.blog/ping?url=" + urlOutline); //ping the server | |
var options = { //try to make the update happen immediately | |
type: "POST", | |
url: "http://micro.blog/ping", | |
data: "url=https://dave.micro.blog/feed.xml" | |
}; | |
http.client (options, true); | |
speaker.beep () | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment