Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/westurner/pgs
Serve a directory or a git revision over HTTP with Bottle and WSGI; and try_files $1.html https://pypi.python.org/pypi/pgs
https://github.com/westurner/pgs
bottlepy github-pages python static-server wsgi
Last synced: about 1 month ago
JSON representation
Serve a directory or a git revision over HTTP with Bottle and WSGI; and try_files $1.html https://pypi.python.org/pypi/pgs
- Host: GitHub
- URL: https://github.com/westurner/pgs
- Owner: westurner
- License: mit
- Created: 2015-04-13T09:29:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T19:44:00.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T11:18:13.803Z (about 1 month ago)
- Topics: bottlepy, github-pages, python, static-server, wsgi
- Language: Python
- Homepage: https://pypi.python.org/pypi/pgs
- Size: 79.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - westurner/pgs - Serve a directory or a git revision over HTTP with Bottle and WSGI; and try_files $1.html https://pypi.python.org/pypi/pgs (Python)
README
===============================
pgs
===============================.. .. image:: https://img.shields.io/travis/westurner/pgs.svg
.. :target: https://travis-ci.org/westurner/pgs.. .. image:: https://img.shields.io/pypi/v/pgs.svg
.. :target: https://pypi.python.org/pypi/pgsA bottle webapp for serving static files from a git branch,
or from the local filesystem.* Free software: MIT license
* Source: https://github.com/westurner/pgsFeatures
--------* [x] Serve static files from a filesystem directory
* [x] Serve static files from a git branch,
with Last-Modified headers according to git timestamps
* [x] Guess MIME-types from paths
* [x] subprocess bindings to ``git cat-file`` and ``git show``
* [ ] dulwich
* [ ] pygit2Usage
------Serve ``/var/www/html`` from http://localhost:8082/
.. code:: bash
pgs -p /var/www/html
Serve the ``gh-pages`` branch of this repo from http://localhost:8083
.. code:: bash
pgs -g $VIRTUAL_ENV/src/pgs -r gh-pages -P 8083
Further Usage:
.. code:: bash
$ pgs --help
Usage: pgs [-p ] [-g ] [-r ]Serve a directory or a git revision over HTTP with Bottle, WSGI, MIME types,
and Last-Modified headersOptions:
-h, --help show this help message and exit
-p ROOT_FILEPATH, --path=ROOT_FILEPATH, --root_filepath=ROOT_FILEPATH
-g GIT_REPO_PATH, --git=GIT_REPO_PATH
Path to git repo to serve files from
-r GIT_REPO_REV, --rev=GIT_REPO_REV
Git repo revision (commit hash, branch, tag)
-H HOST, --host=HOST
-P PORT, --port=PORT
--debug set bottle debug=False
--reload set bottle reload=False
-v, --verbose
-q, --quiet
-t, --testCaveat Emptor
---------------
* Upstream caching would be necessary for all but the most local use
cases
* True git bindings would likely do less buffering of
``subprocess.check_output``