Skip to content

New documentation site for CDNOT #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# CDNOT repo

[![Documentation Status](https://readthedocs.org/projects/cdnot/badge/?version=latest)](https://cdnot.readthedocs.io/en/latest/?badge=latest)
30 changes: 30 additions & 0 deletions add-file.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

BASEDIR=~/cdnot/docs
REPODIR=~/docs-repos
REPO=$1
WD=$(pwd)
if [ -z "$1"]
then
echo "No repository supplied."
exit 1
fi

cp $BASEDIR/index.rst $BASEDIR/.index.rst.bak

cd $REPODIR/$REPO

if [ -z "$2" ]
then
echo "No filename supplied."
exit 1
else
FN=$2
echo "bash update-repo.sh $REPODIR/$REPO $FN" >> update-docs.sh
BASEFN="${FN%.*}"
sed -i '/idp_user_accounts/ a \ $BASEFN' $BASEDIR/index.rst
fi
cd $BASEDIR
git add index.rst .index.rst.bak
git commit -m "updated toc tree"
echo "New changes to CDNOT docs, review and push." | sendmail [email protected]
42 changes: 42 additions & 0 deletions add-repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

BASEDIR=~/cdnot/docs
REPODIR=~/docs-repos
REPOURL=$1
WD=$(pwd)
if [ -z "$1"]
then
echo "No repository supplied"
exit 0
fi
REPOGIT=${REPOURL##*/}
REPO="${REPOGIT%.*}"
TEMPLATE="for FILE in $REPO/docs/*
do
fn=\$(basename \$FILE)
bash update-repo.sh $REPO \$fn
done"

cp $BASEDIR/index.rst $BASEDIR/.index.rst.bak

cd $REPODIR
git clone $REPOURL

if [ -z "$2" ]
then
echo "$TEMPLATE" >> update-docs.sh
for FILE in $REPO/docs/*
do
BASEFN="${FILE%.*}"
sed -i '/idp_user_accounts/ a \ $BASEFN' $BASEDIR/index.rst
done
else
FN=$2
echo "bash update-repo.sh $REPO $FN" >> update-docs.sh
BASEFN="${FN%.*}"
sed -i '/idp_user_accounts/ a \ $BASEFN' $BASEDIR/index.rst
fi
cd $BASEDIR
git add index.rst .index.rst.bak
git commit -m "updated toc tree"
echo "New changes to CDNOT docs, review and push." | sendmail [email protected]
3 changes: 3 additions & 0 deletions conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export PATH=~/anaconda2/bin:$PATH

. ~/.bashrc
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
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)
57 changes: 57 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- 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('.'))
import sphinx_glpi_theme

# -- Project information -----------------------------------------------------

project = 'ESGF Documentation'
copyright = '2021, Elysia Witham, Sasha Ames'
author = 'Elysia Witham, Sasha Ames'

# The full version, including alpha/beta/rc tags
release = '5.0.0a'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

master_doc = 'index'

# 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 = ['_build', 'Thumbs.db', '.DS_Store']


# -- 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 = 'glpi'
html_theme_path = sphinx_glpi_theme.get_html_themes_path()
# 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']
Loading