This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import time | |
| import socket | |
| from tornado.iostream import IOStream | |
| from tornado.ioloop import IOLoop | |
| from tornado import stack_context | |
| import functools | |
| import collections |
| #!/usr/bin/python | |
| # Equivalent of "tail -f" as a webpage using websocket | |
| # Usage: webtail.py PORT FILENAME | |
| # Tested with tornado 2.1 | |
| # Thanks to Thomas Pelletier for it's great introduction to tornado+websocket | |
| # http://thomas.pelletier.im/2010/08/websocket-tornado-redis/ | |
| import tornado.httpserver |
| def add_subdomain_to_global(endpoint, values): | |
| g.subdomain = values.pop('subdomain', None) | |
| def add_subdomain_to_url_params(endpoint, values): | |
| if not 'subdomain' in values: | |
| values['subdomain'] = g.subdomain | |
| def add_subdomain_support(app): | |
| app.url_value_preprocessor(add_subdomain_to_global) | |
| app.url_defaults(add_subdomain_to_url_params) |
| from flask import make_response | |
| from reportlab.pdfgen import canvas | |
| # ... | |
| @app.route('/pdf') | |
| def pdf(): | |
| import cStringIO | |
| output = cStringIO.StringIO() |