1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

README: update 2.0 -> 2.1 (#396)

cli: fix typo in enable-auto-fetch, add test
This commit is contained in:
Ilya Kreymer 2018-10-23 09:58:10 -07:00 committed by GitHub
parent 0db8e5d718
commit a9e4b5c469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Webrecorder pywb 2.0
Webrecorder pywb 2.1
====================
.. image:: https://travis-ci.org/webrecorder/pywb.svg?branch=master
@ -11,7 +11,7 @@ Webrecorder pywb 2.0
Web Archiving Tools for All
---------------------------
`View the full pywb 2.0 documentation <https://pywb.readthedocs.org>`_
`View the full pywb documentation <https://pywb.readthedocs.org>`_
**pywb** is a Python (2 and 3) web archiving toolkit for replaying web archives large and small as accurately as possible.
The toolkit now also includes new features for creating high-fidelity web archives.
@ -23,7 +23,7 @@ that is used by other web archives, including the traditional "Wayback Machine"
New Features
^^^^^^^^^^^^
The 2.0 release includes a major overhaul of pywb and introduces many new features, including the following:
The 2.0 release included a major overhaul of pywb and introduces many new features, including the following:
* Dynamic multi-collection configuration system with no-restart updates.

View File

@ -61,7 +61,7 @@ class BaseCli(object):
parser.add_argument('--proxy-enable-wombat', action='store_true',
help='Enable partial wombat JS overrides support in proxy mode')
parser.add_argument('--enable-auto-fetch', action='store_true',
help='Enable auto-fetch worker to capture resources from stylesheets, imgset when running in live/recording mode')
help='Enable auto-fetch worker to capture resources from stylesheets, <img srcset> when running in live/recording mode')
self.desc = desc
self.extra_config = {}
@ -78,9 +78,11 @@ class BaseCli(object):
'recording': self.r.proxy_record,
'enable_wombat': self.r.proxy_enable_wombat
}
self.extra_config['enable_auto_fetch'] = self.r.enable_auto_fetch
self.r.live = True
self.extra_config['enable_auto_fetch'] = self.r.enable_auto_fetch
self.application = self.load()
if self.r.profile:

View File

@ -23,6 +23,10 @@ class TestProxyCLIConfig(CollsDirMixin, BaseTestClass):
'enable_wombat': False}
assert res.extra_config['proxy'] == exp
def test_auto_fetch_cli(self):
res = wayback(['--enable-auto-fetch'])
assert res.extra_config['enable_auto_fetch'] == True
def test_proxy_cli_rec(self):
res = wayback(['--proxy', 'test', '--proxy-record'])
assert res.extra_config['proxy']['recording'] == True