1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-29 00:52:29 +01:00
Ilya Kreymer 31209db311 New Documentation (#252)
* docs work:
- remove old doc folder
- generate new sphinx docs
rewrite: fix existing docstrings for rst
add 'make apidoc' to rerun apidoc on pywb root
apidocs in docs/code
first pass on usage manual in docs/manual

* use default theme

* docs config work:
- remove modules.rst, use pywb toc directly
- make apidoc force rebuild
- comment out alabaster theme config

* Update usage.rst with working dir info

* docs: add configuring web archive page, ui customizations, custom collections explanations

* work on 'custom collections' section

* docs: update dir tree, switch recording/proxy order

* docs: improve framed vs frameless intro
add 'custom outer replay frame' section
2017-10-04 22:02:03 -07:00
..
2017-09-22 12:36:02 -07:00
2014-02-17 10:01:09 -08:00
2017-05-23 19:08:29 -07:00
2017-09-27 13:47:02 -07:00
2017-05-22 18:52:17 -07:00
2014-02-18 18:13:44 -08:00
2017-10-04 22:02:03 -07:00
2017-09-11 18:49:41 -07:00
2017-09-27 13:47:02 -07:00
2017-10-02 18:06:03 -07:00
2017-09-27 13:47:02 -07:00
2017-10-04 22:02:03 -07:00

pywb.rewrite

This package includes the content rewriting component of the pywb wayback tool suite.

This package applies standard rewriting content rewriting, in the form of url rewriting, for HTTP headers, html, css, js and xml content.

An additional domain-specific rewritin is planned, especially for JS, to allow for proper replay of difficult pages.

Command-Line Rewriter

To enable easier testing of rewriting, this package includes a command-line rewriter which will fetch a live url and apply the registered rewriting rules to that url:

Run:

python ./pywb.rewrite/rewrite_live.py http://example.com

To specify custom timestamp and prefix:

python ./pywb.rewrite/rewrite_live.py http://example.com /mycoll/20141026000102/http://mysite.example.com/path.html

This will print to stdout the content of http://example.com with all urls rewritten relative to /mycoll/20141026000102/http://mysite.example.com/path.html.

Headers are also rewritten, for further details, consult the get_rewritten function in pywb_rewrite/rewrite_live.py

Tests

Rewriting doctests as well as live rewriting tests (subject to change) are provided.

pywb.rewrite is part of a full test suite that can be executed via python run-tests.py