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

- support for running uwsgi with virtualenv

- text changes in banner
- some info about testing in README
This commit is contained in:
Ilya Kreymer 2014-01-29 17:23:19 -08:00
parent 467d880681
commit 57fe9515db
3 changed files with 25 additions and 10 deletions

View File

@ -67,6 +67,15 @@ If everything worked, the following pages should be loading (served from *sample
| `http://example.com` | [http://localhost:8080/pywb/example.com](http://localhost:8080/pywb/example.com) | [http://localhost:8080/pywb/*/example.com](http://localhost:8080/pywb/*/example.com) |
| `http://iana.org` | [http://localhost:8080/pywb/iana.org](http://localhost:8080/pywb/iana.org) | [http://localhost:8080/pywb/*/iana.org](http://localhost:8080/pywb/*/iana.org) |
### Automated Tests
Currently pywb consists of numerous doctests against the sample archive.
Additional testing is in the works.
The current set of tests can be run with Nose:
`nosetests --with-doctest`
### Sample Setup

24
run.sh
View File

@ -15,22 +15,28 @@ app="pywb.wbapp"
params="--static-map /static=$mypath/static --http-socket :8080 -b 65536"
if [ -z "$1" ]; then
# Standard root config
params="$params --wsgi pywb.wbapp"
# Standard root config
params="$params --wsgi pywb.wbapp"
else
# run with --mount
# requires a file not a package, so creating a mount_run.py to load the package
echo "#!/bin/python\n" > $mypath/mount_run.py
echo "import $app\napplication = $app.application" >> $mypath/mount_run.py
params="$params --mount $1=mount_run.py --no-default-app --manage-script-name"
# run with --mount
# requires a file not a package, so creating a mount_run.py to load the package
echo "#!/bin/python\n" > $mypath/mount_run.py
echo "import $app\napplication = $app.application" >> $mypath/mount_run.py
params="$params --mount $1=mount_run.py --no-default-app --manage-script-name"
fi
# Support for virtualenv
if [ -n "$VIRTUAL_ENV" ] ; then
params="$params -H $VIRTUAL_ENV"
fi
# Support for default, non-virtualenv path on OS X
osx_uwsgi_path="/System/Library/Frameworks/Python.framework/Versions/2.7/bin/uwsgi"
if [ -e "$osx_uwsgi_path" ]; then
uwsgi=$osx_uwsgi_path
uwsgi=$osx_uwsgi_path
else
uwsgi="uwsgi"
uwsgi="uwsgi"
fi
$uwsgi $params

View File

@ -25,7 +25,7 @@ function initBanner()
banner.setAttribute("id", BANNER_ID);
banner.setAttribute("lang", "en");
text = "Archived Content";
text = "This is an archived page ";
if (wbinfo && wbinfo.capture_str) {
text += " from <b>" + wbinfo.capture_str + "</b>";
}