diff -r 000000000000 -r d9b71931f372 quotes/create_quote.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/quotes/create_quote.py Thu May 27 13:10:09 2010 +0200 @@ -0,0 +1,22 @@ +#!/usr/bin/python + +import sys +import subprocess +from subprocess import PIPE + +SCRIPT_FILE = "../script.js" + +if __name__ == "__main__": + if len(sys.argv) < 3: + print "not enough arguments provided" + print "usage: %s \"quote text\" author" % sys.argv[0] + quote = sys.argv[1] + author = sys.argv[2] + quote_num = int(subprocess.Popen("ls quote*.html | wc -l", shell=True, stdout=PIPE).communicate()[0]) + 1 + file = open("quote%s.html" % str(quote_num), "w") + try: + file.write("

"%s"

- %s

" % (quote, author)) + finally: + file.close() + +