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
import re | |
import string | |
import console | |
import urllib | |
import sys | |
import clipboard | |
import webbrowser | |
console.clear() |
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
indent all | |
function actionHere () { | |
var string = op.getLineText(); | |
if (string.charAt(0) == " ") { | |
op.reorg (right, 1); | |
var newline = string.substring(1); | |
op.setLineText(newline); | |
} | |
} | |
var ctheads = 0; |
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
split x times | |
var line = op.getLineText(); | |
var tagArray = line.split("^"); | |
op.setLineText(tagArray[0]); | |
for (var i=1; i < tagArray.length; i++) { | |
op.insert (tagArray[i], down); | |
} |
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
split into 2 | |
line = op.getLineText(); | |
line1 = line.split('^')[0]; | |
line2 = line.split('^')[1]; | |
op.setLineText(line1); | |
op.insert (line2, down); |
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
export as html | |
var title = op.getLineText(); | |
var s = ""; | |
var head = "<html><body><h1>" + title + "</h1>"; | |
var foot = "</body></html>"; | |
op.visitSubs ( | |
function (headline, level) { | |
s += string.filledString ("\t", level) + "<li>" + headline.getLineText () + "</li>\r\n"; | |
}, | |
function () {s += "<ul>";}, |
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
convert to Music-Map | |
var band = op.getLineText(); | |
band = band.trim(); | |
var newband = band.replace(" ","+"); | |
var link = 'http://www.music-map.com/' + newband + '.html'; | |
op.insert('Music-Map',right); | |
op.attributes.setOne("type","link"); | |
op.attributes.setOne("url",link); | |
op.attributes.setOne("icon","map-marker"); |
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
<?php | |
/* | |
Plugin Name: OPML in WordPress | |
Author: Jeffrey Kishner | |
*/ | |
function fargo2opml ($opmlfile) { | |
$opmfile = shortcode_atts(array( | |
'url' => '', |
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
todo | |
var value = op.attributes.getOne ("icon"); | |
if (!value) { | |
op.attributes.setOne ("icon", "check-empty"); | |
} | |
else if (value == "check-empty") { | |
op.attributes.deleteOne ("icon"); | |
op.attributes.setOne ("icon", "check"); | |
} | |
else if (value == "check") { |
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
Move Child to Next Parent | |
op.reorg (left, 1); | |
op.reorg (down, 1); | |
op.reorg (right, 1); |
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
TweetBlog | |
var text = op.getLineText(); | |
dialog.ask ("Enter link below", "", "", function (name) { | |
op.attributes.setOne("type", "link"); | |
op.attributes.setOne("url", name); | |
var url = op.attributes.getOne ("url"); | |
window.open("https://twitter.com/share?text=" + text + "&url=" + url,"_blank"); | |
var date = clock.now().toDateString(); | |
op.insert ("Posted: " + date, up); | |
op.attributes.setOne("icon", "twitter-sign"); |