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
remind me | |
dialog.ask("When do you want to be reminded?","","use military time e.g. 15:20", function (time) { | |
reminder = op.getLineText(); | |
dialog.alert("You have asked to be reminded to " + reminder + " at " + time + " today"); | |
var myVar=setInterval(function(){myTimer()},60000); | |
function myTimer() { | |
var now = clock.now().toString(); | |
var date = clock.now().toDateString(); | |
var due = date + " " + time + ":00 GMT-0500 (EST)"; | |
if (now > due) { dialog.alert (reminder); clearInterval(myVar); } |
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
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
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
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
javascript:alert('<opml><body><outline text="<a href='+location.href+'>'+document.title+'</a>"><outline text="'+window.getSelection()+'" icon="quote-left"/></outline></body></opml>'); |
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
function PaperlessWeb(url,title) { | |
url = url.replace("www.dropbox","dl.dropboxusercontent"); | |
var xmlDoc=loadXMLDoc(url); | |
var howmanyitems=xmlDoc.getElementsByTagName("itemName"); | |
//var howmanynotes=xmlDoc.getElementsByTagName("itemNote"); | |
var output="<p>"; | |
for (i=0;i<howmanyitems.length;i++) { | |
//exclude completed items |
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
Tweet Note/Link | |
var t = op.getLineText(); | |
var et = encodeURIComponent(t); | |
var link = op.attributes.getOne("url"); | |
var twt = "https://twitter.com/share?text=" + et + "&url=" + link; | |
window.open(twt); |
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
View feed | |
$.getScript("DOMAIN.COM/rssReader.js", function() { | |
var rss = new RssReader; | |
rss.main(); | |
}); |