| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: klaus |
| 3 |
Version: 2.0.3 |
| 4 |
Summary: The first Git web viewer that Just Works™. |
| 5 |
Home-page: https://github.com/jonashaag/klaus |
| 6 |
Author: Jonas Haag |
| 7 |
Author-email: [email protected] |
| 8 |
Classifier: Development Status :: 5 - Production/Stable |
| 9 |
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content |
| 10 |
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application |
| 11 |
Classifier: Topic :: Software Development :: Version Control |
| 12 |
Classifier: Environment :: Web Environment |
| 13 |
Classifier: Intended Audience :: Developers |
| 14 |
Classifier: License :: OSI Approved :: ISC License (ISCL) |
| 15 |
Classifier: Programming Language :: Python |
| 16 |
Classifier: Programming Language :: Python :: 2.7 |
| 17 |
Classifier: Programming Language :: Python :: 3 |
| 18 |
License-File: LICENSE |
| 19 |
|
| 20 |
|travis-badge| |gitter-badge| |
| 21 |
|
| 22 |
.. |travis-badge| image:: https://travis-ci.org/jonashaag/klaus.svg?branch=master |
| 23 |
:target: https://travis-ci.org/jonashaag/klaus |
| 24 |
|
| 25 |
.. |gitter-badge| image:: https://badges.gitter.im/Join%20Chat.svg |
| 26 |
:alt: Join the chat at https://gitter.im/jonashaag/klaus |
| 27 |
:target: https://gitter.im/jonashaag/klaus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge |
| 28 |
|
| 29 |
klaus: a simple, easy-to-set-up Git web viewer that Just Works™. |
| 30 |
================================================================ |
| 31 |
|
| 32 |
(If it doesn't Just Work for you, please file a bug.) |
| 33 |
|
| 34 |
* Super easy to set up -- no configuration required |
| 35 |
* Syntax highlighting |
| 36 |
* Markdown + RestructuredText rendering support |
| 37 |
* Pull + push support (Git Smart HTTP) |
| 38 |
* Code navigation using Exuberant ctags |
| 39 |
|
| 40 |
:Demo: http://klausdemo.lophus.org |
| 41 |
:Mailing list: http://groups.google.com/group/klaus-users |
| 42 |
:On PyPI: http://pypi.python.org/pypi/klaus/ |
| 43 |
:Wiki: https://github.com/jonashaag/klaus/wiki |
| 44 |
:License: ISC (BSD) |
| 45 |
|
| 46 |
|
| 47 |
Running with Docker |
| 48 |
-------------------- |
| 49 |
|
| 50 |
The easiest way to get started. We maintain a Docker image that has syntax highlighting, Markdown rendering, code navigation, etc. pre-configured:: |
| 51 |
|
| 52 |
docker run -v /path/to/your/repos:/repos \ |
| 53 |
-p 7777:80 \ |
| 54 |
-it jonashaag/klaus:latest \ |
| 55 |
klaus --host 0.0.0.0 --port 80 /repos/repo1 /repos/repo2 ... |
| 56 |
|
| 57 |
(Replace ``/path/to/your/repos`` with the folder that contains your Git repositories on the Docker host. You can also pass in multiple ``-v`` arguments if your repos are in multiple folders on the host.) |
| 58 |
|
| 59 |
Go to http://localhost:7777 on the Docker host et voilà! |
| 60 |
|
| 61 |
The command line above simply runs the ``klaus`` script -- for usage details, see the "Using the ``klaus`` script" section below. |
| 62 |
|
| 63 |
|
| 64 |
Local setup |
| 65 |
----------- |
| 66 |
:: |
| 67 |
|
| 68 |
pip install klaus |
| 69 |
|
| 70 |
(Optional dependencies: see `Markup rendering <https://github.com/jonashaag/klaus/wiki/Markup-rendering>`_ in the wiki.) |
| 71 |
|
| 72 |
Usage |
| 73 |
----- |
| 74 |
|
| 75 |
See also: `Klaus wiki <https://github.com/jonashaag/klaus/wiki>`_ |
| 76 |
|
| 77 |
Using the ``klaus`` script |
| 78 |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 79 |
**NOTE:** This is intended for testing/low-traffic local installations *only*! |
| 80 |
The `klaus` script uses wsgiref_ internally which doesn't scale *at all* |
| 81 |
(in fact it's single-threaded and non-asynchronous). |
| 82 |
|
| 83 |
To run klaus using the default options: |
| 84 |
|
| 85 |
.. code-block:: bash |
| 86 |
|
| 87 |
# With Docker: |
| 88 |
docker run ... jonashaag/klaus:latest klaus [repo1 [repo2 ...]] |
| 89 |
# Local setup: |
| 90 |
klaus [repo1 [repo2 ...]] |
| 91 |
|
| 92 |
For more options, see: |
| 93 |
|
| 94 |
.. code-block:: bash |
| 95 |
|
| 96 |
# With Docker: |
| 97 |
docker run ... jonashaag/klaus:latest klaus --help |
| 98 |
# Local setup: |
| 99 |
klaus --help |
| 100 |
|
| 101 |
|
| 102 |
Using a real server |
| 103 |
^^^^^^^^^^^^^^^^^^^ |
| 104 |
The ``klaus`` module contains a ``make_app`` function which returns a WSGI app. |
| 105 |
|
| 106 |
An example WSGI helper script is provided with klaus (see ``klaus/contrib/wsgi.py``), |
| 107 |
configuration being read from environment variables. Use it like this (uWSGI example):: |
| 108 |
|
| 109 |
uwsgi -w klaus.contrib.wsgi \ |
| 110 |
--env KLAUS_SITE_NAME="Klaus Demo" \ |
| 111 |
--env KLAUS_REPOS="/path/to/repo1 /path/to/repo2 ..." \ |
| 112 |
... |
| 113 |
|
| 114 |
Gunicorn example:: |
| 115 |
|
| 116 |
gunicorn --env KLAUS_SITE_NAME="Klaus Demo" \ |
| 117 |
--env KLAUS_REPOS="/path/to/repo1 /path/to/repo2 ..." \ |
| 118 |
klaus.contrib.wsgi |
| 119 |
|
| 120 |
The Docker image also has uwsgi preinstalled:: |
| 121 |
|
| 122 |
docker run ... jonashaag/klaus:latest uwsgi ... |
| 123 |
|
| 124 |
See also `deployment section in the wiki <https://github.com/jonashaag/klaus/wiki#deployment>`_. |
| 125 |
|
| 126 |
.. _wsgiref: http://docs.python.org/library/wsgiref.html |
| 127 |
|
| 128 |
|
| 129 |
Contributing |
| 130 |
------------ |
| 131 |
Please do it! |
| 132 |
|
| 133 |
I'm equally happy with bug reports/feature ideas and code contributions. |
| 134 |
If you have any questions/issues, I'm happy to help! |
| 135 |
|
| 136 |
For starters, `here are a few ideas what to work on. <https://github.com/jonashaag/klaus/issues?q=is%3Aissue+is%3Aopen+label%3A%22C%3A+1%22>`_ :-) |
| 137 |
|
| 138 |
|
| 139 |
|img1|_ |img2|_ |img3|_ |
| 140 |
|
| 141 |
.. |img1| image:: https://i.imgur.com/2XhZIgw.png |
| 142 |
.. |img2| image:: https://i.imgur.com/6LjC8Cl.png |
| 143 |
.. |img3| image:: https://i.imgur.com/EYJdQwv.png |
| 144 |
|
| 145 |
.. _img1: https://i.imgur.com/MV3uFvw.png |
| 146 |
.. _img2: https://i.imgur.com/9HEZ3ro.png |
| 147 |
.. _img3: https://i.imgur.com/kx2HaTq.png |