diff --git a/.gitignore b/.gitignore index a4f4c4bed..cd582050b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,16 @@ node_modules/ libs/Cesium/ dist/ target/ +docs/source/_build +docs/build +docs/source/locale/**/*.mo *.sublime-* npm-debug.log coverage/ -web/.classpath -web/.project +**/.classpath +**/.project +**/.settings +.vscode backend/.classpath backend/.project package-lock.json diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 000000000..6c4f63d76 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,23 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Build documentation with MkDocs +#mkdocs: +# configuration: mkdocs.yml + +# Optionally build your docs in additional formats such as PDF and ePub +formats: all + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.7 +# install: +# - requirements: docs/requirements.txt diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..69fe55ecf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,19 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 000000000..543c6b13b --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/docs/source/cadastrapp/index.rst b/docs/source/cadastrapp/index.rst new file mode 100644 index 000000000..6596becd1 --- /dev/null +++ b/docs/source/cadastrapp/index.rst @@ -0,0 +1,5 @@ +========== +Cadastrapp +========== + +Welcome to Cadastrapp documentation. diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 000000000..b6a0556c7 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,181 @@ +# -*- coding: utf-8 -*- +# +# Configuration file for the Sphinx documentation builder. +# +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = u'Georchestra - MapStore' +copyright = u'2019, GeoSolutions S.a.s.' +author = u'GeoSolutions S.a.s.' + +# The short X.Y version +version = u'' +# The full version, including alpha/beta/rc tags +release = u'' + + +# -- General configuration --------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.githubpages', + 'sphinx_rtd_theme', + 'recommonmark' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None +locale_dirs = ['locale/'] # path is example but recommended. +gettext_compact = False # optional. + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = None + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +# html_sidebars = {} + + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Georchestra-MapStoredoc' + + +# -- Options for LaTeX output ------------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'Georchestra-MapStore.tex', u'Georchestra - MapStore Documentation', + u'GeoSolutions S.a.s.', 'manual'), +] + + +# -- Options for manual page output ------------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'georchestra-mapstore', u'Georchestra - MapStore Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ---------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'Georchestra-MapStore', u'Georchestra - MapStore Documentation', + author, 'Georchestra-MapStore', 'One line description of project.', + 'Miscellaneous'), +] + + +# -- Options for Epub output ------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = project + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +# +# epub_identifier = '' + +# A unique identification for the text. +# +# epub_uid = '' + +# A list of files that should not be packed into the epub file. +epub_exclude_files = ['search.html'] + + +# -- Extension configuration ------------------------------------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 000000000..170fc79fb --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,22 @@ +.. Georchestra - MapStore documentation master file, created by + sphinx-quickstart on Thu Oct 10 12:25:43 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Georchestra documentation! +===================================== + +.. toctree:: + :maxdepth: 4 + + cadastrapp/index + mapstore/index + localize + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/docs/source/locale/fr/LC_MESSAGES/cadastrapp/index.po b/docs/source/locale/fr/LC_MESSAGES/cadastrapp/index.po new file mode 100644 index 000000000..4c9a7a717 --- /dev/null +++ b/docs/source/locale/fr/LC_MESSAGES/cadastrapp/index.po @@ -0,0 +1,28 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2019, GeoSolutions S.a.s. +# This file is distributed under the same license as the Georchestra - +# MapStore package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Georchestra - MapStore \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-10-11 10:32+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../source/cadastrapp/index.rst:3 +msgid "Cadastrapp" +msgstr "Cadastrapp" + +#: ../../source/cadastrapp/index.rst:5 +msgid "Welcome to Cadastrapp documentation." +msgstr "Bienvenue dans la documentation Cadastrapp." + diff --git a/docs/source/locale/fr/LC_MESSAGES/index.po b/docs/source/locale/fr/LC_MESSAGES/index.po new file mode 100644 index 000000000..18dd574dd --- /dev/null +++ b/docs/source/locale/fr/LC_MESSAGES/index.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2019, GeoSolutions S.a.s. +# This file is distributed under the same license as the Georchestra - +# MapStore package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Georchestra - MapStore \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-10-11 10:31+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../source/index.rst:7 +msgid "Welcome to Georchestra documentation!" +msgstr "Bienvenue dans Georchestra - Documentation" + +#: ../../source/index.rst:18 +msgid "Indices and tables" +msgstr "Indices et tableau" + +#: ../../source/index.rst:20 +msgid ":ref:`genindex`" +msgstr ":ref:`genindex`" + +#: ../../source/index.rst:21 +msgid ":ref:`search`" +msgstr ":ref:`search`" diff --git a/docs/source/locale/fr/LC_MESSAGES/localize.po b/docs/source/locale/fr/LC_MESSAGES/localize.po new file mode 100644 index 000000000..400dd7560 --- /dev/null +++ b/docs/source/locale/fr/LC_MESSAGES/localize.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2019, GeoSolutions S.a.s. +# This file is distributed under the same license as the Georchestra - +# MapStore package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Georchestra - MapStore \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-10-11 12:34+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../source/localize.rst:3 +msgid "Localize this documentation" +msgstr "Localiser cette documentation" + +#: ../../source/localize.rst:5 +msgid "To localize this documentation install sphinx-intl:" +msgstr "Pour localiser cette documentation, installez sphinx-intl:" + +#: ../../source/localize.rst:11 +msgid "" +"Every time you have to update the translation files you have to update " +"the .po files running the following commands:" +msgstr "Chaque fois que vous devez mettre à jour les fichiers de traduction, vous devez mettre à jour" +"les fichiers .po exécutant les commandes suivantes:" + +#: ../../source/localize.rst:19 +msgid "Then you can edit the .po files and commit them" +msgstr "Ensuite, vous pouvez éditer les fichiers .po et les commettre" + +#: ../../source/localize.rst:21 +msgid "To generate the documentation locally for the you can run (on linux)" +msgstr "Pour générer la documentation localement pour le que vous pouvez exécuter (sous Linux)" + +#: ../../source/localize.rst:27 +msgid "This will generate `mo` files that should be ignored in .gitignore" +msgstr "Cela générera des fichiers `mo` qui devraient être ignorés dans .gitignore" + diff --git a/docs/source/locale/fr/LC_MESSAGES/mapstore/index.po b/docs/source/locale/fr/LC_MESSAGES/mapstore/index.po new file mode 100644 index 000000000..ff415089a --- /dev/null +++ b/docs/source/locale/fr/LC_MESSAGES/mapstore/index.po @@ -0,0 +1,31 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2019, GeoSolutions S.a.s. +# This file is distributed under the same license as the Georchestra - +# MapStore package. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Georchestra - MapStore \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-10-11 10:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: ../../source/mapstore/index.rst:3 +msgid "MapStore Guide" +msgstr "Guide de MapStore" + +#: ../../source/mapstore/index.rst:5 +msgid "" +"The official documentation of MapStore is available `here " +"`_." +msgstr "La documentation officielle de MapStore " +"est `ici `_." + diff --git a/docs/source/localize.rst b/docs/source/localize.rst new file mode 100644 index 000000000..ea5b3ed1c --- /dev/null +++ b/docs/source/localize.rst @@ -0,0 +1,27 @@ + +Localize this documentation +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To localize this documentation install sphinx-intl: + +.. code-block:: console + + sudo pip install sphinx-intl + +Every time you have to update the translation files you have to update the .po files running the following commands: + +.. code-block:: python + + cd docs # all commands must run in docs directory + make gettext # generates .pot files + sphinx-intl update -p build/gettext -l fr # generate .po files for fr lang + +Then you can edit the .po files and commit them + +To generate the documentation locally for the you can run (on linux) + +.. code-block:: console + + sphinx-build -b html -D language=fr source build/html/fr + +This will generate `mo` files that should be ignored in .gitignore diff --git a/docs/source/mapstore/index.rst b/docs/source/mapstore/index.rst new file mode 100644 index 000000000..830305d36 --- /dev/null +++ b/docs/source/mapstore/index.rst @@ -0,0 +1,5 @@ +============== +MapStore Guide +============== + +The official documentation of MapStore is available `here `_.