1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 09:18:08 +00:00

Documentation generation

This commit is contained in:
Julien Duponchelle 2015-01-14 12:32:56 +01:00
parent aab944fb6c
commit 1431c66c54
6 changed files with 42 additions and 11 deletions

3
.gitignore vendored
View File

@ -40,3 +40,6 @@ nosetests.xml
# Gedit Backup Files # Gedit Backup Files
*~ *~
#Documentation build
docs/_build

0
docs/_static/.keep vendored Normal file
View File

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# POC documentation build configuration file, created by # GNS3 documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 5 14:15:48 2015. # sphinx-quickstart on Mon Jan 5 14:15:48 2015.
# #
# This file is execfile()d with the current directory set to its # This file is execfile()d with the current directory set to its
@ -21,7 +21,7 @@ import os
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('..'))
from demoserver.version import __version__, __version_info__ from gns3server.version import __version__, __version_info__
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
@ -46,8 +46,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = 'POC' project = 'GNS3'
copyright = '2015, POC Team' copyright = '2015, GNS3 GNS3 Technologies Inc.'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -179,7 +179,7 @@ html_static_path = ['_static']
# html_file_suffix = None # html_file_suffix = None
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'POCdoc' htmlhelp_basename = 'GNS3doc'
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
@ -199,7 +199,7 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
('index', 'POC.tex', 'POC Documentation', 'POC Team', 'manual'), ('index', 'GNS3.tex', 'GNS3 Documentation', 'GNS3 Team', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
@ -228,8 +228,8 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'gns3', 'POC Documentation', ('index', 'gns3', 'GNS3 Documentation',
['POC Team'], 1) ['GNS3 Team'], 1)
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
@ -242,8 +242,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'POC', 'POC Documentation', ('index', 'GNS3', 'GNS3 Documentation',
'POC Team', 'POC', 'One line description of project.', 'GNS3 Team', 'GNS3', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]

27
documentation.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
#
# Copyright (C) 2015 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Build the documentation
#
set -e
py.test
python gns3server/web/documentation.py
cd docs
make html

View File

@ -16,3 +16,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = "1.3.dev1" __version__ = "1.3.dev1"
__version_info__ = (1, 3, 0, 0)

View File

@ -18,7 +18,7 @@
import re import re
import os.path import os.path
from .route import Route from gns3server.web.route import Route
class Documentation(object): class Documentation(object):