This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Make HTML more self-contained by in-lining:

  • JavaScript (minified)
  • CSS (minified)
  • Images (base-64 encoded)
    • Including (explicitly linked) favicons

For straightforward cases, this will take an HTML document which might have external dependencies and return an HTML document with no external dependencies - a single self-contained file that you could send as an email attachment, or show as a presentation without worrying about internet connectivity, for example.

Cases that are not straightforward are those that involve loading things via JavaScript, iframe things, fonts, and things I haven’t thought of. Pull requests welcome!

Usage

Loaded as a module, selfcontain() takes an HTML string and base path or URL and is the main function to know. Command-line usage wraps the minor extension selfcontain_ref(), which takes a string specifying a file path or URL to fetch and process:

selfcontain test_in.html > test_out.html
# or
selfcontain https://raw.githubusercontent.com/ajschumacher/selfcontain/master/test_in.html > test_out.html
Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
selfcontain-0.2.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Aug 11, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting