# OSM User Guide

## Scope of the document

This document collects Open Source MANO User Guide.

## Guidelines for contributors

- OSM [Workflow for documentation production](https://osm.etsi.org/gitlab/osm-doc/documentation-how-to/blob/master/Workflow%20for%20documentation%20production%20in%20OSM.md#guide-for-contributors) must be used.
- Every section of this document, under a "H1" tag (single #), must be contained in a single file and formatted according to the following [sample document](#)

## Exporting the document to HTML

This markdown format can be easily exported by installing and using [Sphinx](http://www.sphinx-doc.org/en/master/) in your local machine.

Install the required packages:

```bash
sudo -H python3 -m pip install -r requirements.txt
```

Before proceeding, **make sure that there are no uncommitted changes in your workdir or your staging area** (in case of doubt, do all the corresponding `add`'s and `commit`'s).

Then run:

```bash
# Clean previous html
make clean
# Fix references to sections in other docs
for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done
# Build html documentation
make html
# Restore the markdown files to their previous state
git reset --hard
```

The generated HTML output is stored in `_build/html`. You can go to that folder and publish the content locally with a Simple HTTP Server in Python.

```bash
python3 -m http.server <PORT>
```

Then you can check the generated HTML output with a local web browser pointing to <http://localhost:PORT>
