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

This simple script lets people include bits of your content (hosted on whatever server you like) into their own pages. It uses the age-old technique used by ads of issuing writes from a Javascript file.

If you mount this at http://example.com/includer.js then you can use tags like:

<script
 src="http://example.com/includer.js?url=encoded-url"></script>

<script
 src="http://example.com/includer.js?url=encoded-url%23fragment"></script>

<script
 src="http://example.com/includer.js?url=encoded-url&dest=otherId"></script>

These each include the content from the encoded-url. If you give a fragment, it grabs just the bit of identified text. If you don’t, it’ll take all the text in the <body> of the page.

It will put the output exactly where the <script> tag is in the page. If you want to put it someplace else, &dest=id will put it in the element with the given id. In that case it adds a little onload(-like) handler, and then sets the innerHTML of element with that id. If you can’t fetch the url, then it will put a small error message into the page in its place.

By default it restricts urls based on the opt-in wildcards of the allowed_urls setting. You can use allowed_urls = * to allow anything, but this is not recommended. You can also use same_host = true to allow requests to the same host as where the includer is hosted.

To minimize backend traffic, set cache_dir to a location to save the requested pages. All the caching is handled by httplib2.

Example

To run an example, install the package and use paster serve development.ini (development.ini is in the tarball). This will start up a server on http://localhost:8080/ where you can view an example.

News

0.2

  • In some cases extra <body> tags would be included in the transcluded content (when that tag should never be present).

0.1

Initial release

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

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
ScriptTranscluder-0.2.tar.gz (8.4 kB) Copy SHA256 Checksum SHA256 Source Feb 10, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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