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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="refresh" content="0; pythonista://foo.py&action=run&argv=bar"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script language="JavaScript"> | |
setTimeout("self.close()", 500); | |
</script> | |
</head> |
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
# To call script from Drafts, use the follwing URL as URL Action: | |
# <pythonista://list.py?action=run&argv=[[draft]]> | |
import os | |
import re | |
import sys | |
import urllib | |
import webbrowser | |
a = re.sub(r"(?m)^[*-] ", "", sys.argv[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
# To call script from Drafts, use the follwing URL as URL Action: | |
# <pythonista://calculate.py?action=run&argv=[[draft]]> | |
# Except for the last ten lines, this script was written by Erez Shinan, see <http://erezsh.wordpress.com/2013/02/24/how-to-write-a-calculator-in-70-python-lines-by-writing-a-recursive-descent-parser/>. | |
'''A Calculator Implemented With A Top-Down, Recursive-Descent Parser''' | |
# Author: Erez Shinan, Dec 2012 | |
import re, collections, sys | |
from operator import add,sub,mul,div |
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
# To call script from Drafts, use the follwing URL as URL Action: | |
# <pythonista://sort?action=run&argv=[[draft]]> | |
import sys | |
import urllib | |
import webbrowser | |
a = sys.argv[1].split("\n") | |
a.sort(key=str.lower) | |
a = "\n".join(a) |
NewerOlder