Skip to content

Instantly share code, notes, and snippets.

@scripting
Created January 2, 2023 18:50
Show Gist options
  • Save scripting/231ba2151c3f1bbff8b1383d334e775f to your computer and use it in GitHub Desktop.
Save scripting/231ba2151c3f1bbff8b1383d334e775f to your computer and use it in GitHub Desktop.
The script I use to publish from Drummer to Micro.blog
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