Metadata-Version: 2.1
Name: naucse
Version: 0.5.3
Summary: Website for course materials
Author: naucse.python.cz contributors
Author-email: Petr Viktorin <encukou@gmail.com>
License: The MIT License (MIT)
        
        Copyright (c) 2016-2017 naucse.python.cz contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        Provided license texts might have their own copyrights and restrictions
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
        
Project-URL: home, https://github.com/pyvec/naucse
Project-URL: changelog, https://github.com/pyvec/naucse/blob/master/CHANGELOG.md
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test
License-File: LICENSE.MIT

# naucse

This is a server for open course material.

To use it, you will need some content.
Usually, the repository with the content will require the `naucse` module,
and will run using `python -m naucse`.

We use content at https://github.com/pyvec/naucse.python.cz to generate
[naucse.python.cz](https://naucse.python.cz).


## Installation

Install from a virtual environment.

To install the latest release:

    (venv)$ python -m pip install naucse

To install from a cloned repository, for development:

    (venv)$ python -m pip install -e.[dev]


## Running

To run the serve, either change (`cd`) to the directory with content,
or set `NAUCSE_ROOT_PATH` to that directory.
Then run:

    (venv)$ python -m naucse serve

Instead of `serve`, you can run `freeze` to generate a static website.
See [Elsa](https://pypi.org/project/elsa/) for other usage, including
deployment to GitHub Pages.


## Served courses

The courses on the served website are taken from two sources:

- `courses.yml` in `$NAUCSE_ROOT_PATH`, with entries like:

  ```yaml
    course_slug:
        url: https://github.com/user/repo
        branch: main
        path: _compiled
  ```

  The named repositories will be cloned. At the given path in the given branch,
  naucse expects compiled course info, as prepared by
  `python -m naucse_render compile`.

  This is intended for the production site, which aggregates lots of individual
  courses.

  If `courses.yml` is present, naucse will use a pretty homepage
  (rather than listing all courses on the homepage).

- Any courses found by `python -m naucse_render ls`.
  This is useful when developing a course locally.


## Tests

Tests can be run using `tox`:

    (venv)$ tox

or `pytest` directly:

    (venv)$ python -m pytest


## Licence

The code is licensed under the terms of the MIT license, see [LICENSE.MIT] file
for full text. By contributing code to this repository, you agree to have it
licensed under the same license.

Content has its own license specified in the appropriate matadata.
Only [free content licenses] are used. By contributing to an already licensed
document, you agree to have it licensed under the same license.
(And feel free to add yourself to the authors list in its metadata.)
When contributing new document(s) a license must be specified in the metadata.

[LICENSE.MIT]: https://github.com/pyvec/naucse.python.cz/blob/master/LICENSE.MIT
[free content licenses]: https://en.wikipedia.org/wiki/List_of_free_content_licenses
