Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 32 lines (26 sloc) 615 Bytes
#!/usr/bin/env python
from urllib import quote
def call(cmd, input=None):
import os
fin,fout = os.popen4(cmd)
result = fout.read()
return result
#import subprocess
#p = subprocess.Popen(args)
#output = p.stdout.read()
#p.close()
#return output
def compress(file):
return quote(call('yui-compressor %s' % file))
files = [
'wordyclouds.js',
'marklet.js'
]
last_line = 'init(String(window.location));'
marklet = ['javascript:(function(){']
for file in files:
marklet.append(compress(file))
marklet.append(quote(last_line))
marklet.append('})()')
marklet = ''.join(marklet)
print marklet
Jump to Line
Something went wrong with that request. Please try again.