#!/usr/bin/env python3 # Creates a reader mode view of the current webpage # # Depends on the python-readability (lxml) package: # - http://github.com/buriy/python-readability # # Usage: # :spawn -u readability from __future__ import absolute_import import codecs, os tmpfile = "/tmp/readability.html" if not os.path.exists(os.path.dirname(tmpfile)): os.makedirs(os.path.dirname(tmpfile)) # Styling for dynamic window margin scaling and line height HEADER = """