Comment

Peter Bengtsson

It already exists. The API is built such that you feed it URLs till your done then call the `.process()` method to start the calculation. For example:

  >>> from mincss.processor import Processor
  >>> p = Processor()
  >>> p.process_url('http://example.com/page1.html')
  >>> p.process_url('http://example.com/page2.html')
  >>> p.process()

However, if you do that, the `p.inlines` will be confusing since you won't know which URL it came from. There's a shortcut to when you just have 1 single URL to worry about and that's to use `.process()` directly:

  >>> from mincss.processor import Processor
  >>> p = Processor()
  >>> p.process('http://example.com/page.html')

Or you can actually do this too:

  >>> from mincss.processor import Processor
  >>> p = Processor()
  >>> p.process('http://example.com/page1.html', 'http://example.com/page2.html')

Messing around with doing one page at a time and using inline is more advanced and perhaps something just for those who want the absolutely fastest.

Parent comment

Joe Ciskey

The obvious feature to add is taking a list of pages, applying the script to each of them, and then aggregating the entire result so that you have a site-wide CSS file that can be cached by browsers. I might just fork this and give it a try.