mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
fixup READMEs, add domain-specific rules to cdx sample app
This commit is contained in:
parent
7c1ac10d6f
commit
84e0121aa5
@ -11,8 +11,10 @@ A very simple reference WSGI app is included.
|
|||||||
|
|
||||||
Run: `python -m pywb.cdx.wsgi_cdxserver` to start the app, keyboard interrupt to stop.
|
Run: `python -m pywb.cdx.wsgi_cdxserver` to start the app, keyboard interrupt to stop.
|
||||||
|
|
||||||
The default [config.yaml](pywb_cdx/config.yaml) points to the sample data directory
|
The default [config.yaml](config.yaml) points to the sample data directory
|
||||||
and uses port 8080
|
and uses port 8080.
|
||||||
|
|
||||||
|
The domain specific [rules.yaml](rules.yaml) are also loaded.
|
||||||
|
|
||||||
#### CDX Server API Reference
|
#### CDX Server API Reference
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ import pkgutil
|
|||||||
#=================================================================
|
#=================================================================
|
||||||
CONFIG_FILE = 'config.yaml'
|
CONFIG_FILE = 'config.yaml'
|
||||||
|
|
||||||
|
RULES_FILE = 'rules.yaml'
|
||||||
|
|
||||||
DEFAULT_PORT = 8080
|
DEFAULT_PORT = 8080
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
@ -31,7 +33,7 @@ def main(paths=None):
|
|||||||
else:
|
else:
|
||||||
paths = get_test_dir() + 'cdx/'
|
paths = get_test_dir() + 'cdx/'
|
||||||
|
|
||||||
cdxserver = create_cdx_server(paths)
|
cdxserver = create_cdx_server(paths, RULES_FILE)
|
||||||
|
|
||||||
def application(env, start_response):
|
def application(env, start_response):
|
||||||
try:
|
try:
|
||||||
|
@ -4,14 +4,14 @@ This package contains a utils used by pywb wayback tool suite.
|
|||||||
|
|
||||||
#### Modules
|
#### Modules
|
||||||
|
|
||||||
* [binsearch.py](pywb.utils/binsearch.py) -- Binary search implementation over text files
|
* [binsearch.py](binsearch.py) -- Binary search implementation over text files
|
||||||
|
|
||||||
* [loaders.py](pywb.utils/loaders.py) -- Loading abstraction for loading via http or local file system.
|
* [loaders.py](loaders.py) -- Loading abstraction for loading via http or local file system.
|
||||||
|
|
||||||
* [bufferedreaders.py](pywb.utils/bufferedreaders.py) -- Buffering wrappers for file-like object, also provide gzip decompression and
|
* [bufferedreaders.py](bufferedreaders.py) -- Buffering wrappers for file-like object, also provide gzip decompression and
|
||||||
de-chunking facilities.
|
de-chunking facilities.
|
||||||
|
|
||||||
* [statusandheaders.py](pywb.utils/statusandheaders.py) -- Represent http status line + headers and parsing them out from a stream
|
* [statusandheaders.py](statusandheaders.py) -- Represent http status line + headers and parsing them out from a stream
|
||||||
|
|
||||||
* [timeutils.py](pywb.utils/timeutils.py) -- Utility functions for converting between standard datetime formats 14-digit timestamp
|
* [timeutils.py](timeutils.py) -- Utility functions for converting between standard datetime formats 14-digit timestamp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user