diff --git a/containthedocs-bash.sh b/containthedocs-bash.sh old mode 100644 new mode 100755 diff --git a/containthedocs-build.sh b/containthedocs-build.sh old mode 100644 new mode 100755 diff --git a/containthedocs-clean.sh b/containthedocs-clean.sh old mode 100644 new mode 100755 diff --git a/containthedocs-cleanbuild.sh b/containthedocs-cleanbuild.sh old mode 100644 new mode 100755 diff --git a/containthedocs-convert.sh b/containthedocs-convert.sh old mode 100644 new mode 100755 diff --git a/containthedocs-image b/containthedocs-image old mode 100644 new mode 100755 diff --git a/containthedocs-pdf.sh b/containthedocs-pdf.sh old mode 100644 new mode 100755 diff --git a/docs/_static/back_cover.png b/docs/_static/back_cover.png new file mode 100644 index 0000000..1e9aeac Binary files /dev/null and b/docs/_static/back_cover.png differ diff --git a/docs/_static/front_cover.png b/docs/_static/front_cover.png new file mode 100644 index 0000000..7a05163 Binary files /dev/null and b/docs/_static/front_cover.png differ diff --git a/docs/conf.py b/docs/conf.py index 1147319..0d1f711 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,10 +5,10 @@ # ------------ # # REQUIRED: Your class/lab name -classname = "F5 Architectures for Private Cloud Infrastructures - OpenStack - Class 164" +classname = "F5 Private Cloud Solutions - OpenStack" # OPTIONAL: The URL to the GitHub Repository for this class -github_repo = "https://github.com/f5devcentral/f5-training-labs" +github_repo = "https://github.com/f5devcentral/f5-agility-labs-openstack" # OPTIONAL: Google Analytics # googleanalytics_id = 'UA-85156643-4' @@ -21,9 +21,14 @@ import sys import time import re +import pkgutil +import string sys.path.insert(0, os.path.abspath('.')) import f5_sphinx_theme +year = time.strftime("%Y") +eventname = "Agility %s Hands-on Lab Guide" % (year) + rst_prolog = """ .. |classname| replace:: %s .. |classbold| replace:: **%s** @@ -50,12 +55,12 @@ """ % (classname, classname, classname, - time.strftime("%Y")) + year) if 'github_repo' in locals() and len(github_repo) > 0: rst_prolog += """ .. |repoinfo| replace:: The content contained here leverages a full DevOps CI/CD - pipieline and is sourced from the GitHub repository at %s. + pipeline and is sourced from the GitHub repository at %s. Bugs and Requests for enhancements can be made using by opening an Issue within the repository. """ % (github_repo) @@ -87,6 +92,21 @@ extensions += ['sphinxcontrib.googleanalytics'] googleanalytics_enabled = True +eggs_loader = pkgutil.find_loader('sphinxcontrib.spelling') +found = eggs_loader is not None + +if found: + extensions += ['sphinxcontrib.spelling'] + spelling_lang='en_US' + spelling_word_list_filename='../wordlist' + spelling_show_suggestions=True + spelling_ignore_pypi_package_names=False + spelling_ignore_wiki_words=True + spelling_ignore_acronyms=True + spelling_ignore_python_builtins=True + spelling_ignore_importable_modules=True + spelling_filters=[] + source_parsers = { '.md': 'recommonmark.parser.CommonMarkParser', } @@ -135,7 +155,6 @@ todo_emit_warnings = True todo_include_todos = True - # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -176,22 +195,37 @@ def setup(app): # -- Options for LaTeX output --------------------------------------------- -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', +front_cover_image = 'front_cover' +back_cover_image = 'back_cover' + +front_cover_image_path = os.path.join('_static', front_cover_image + '.png') +back_cover_image_path = os.path.join('_static', back_cover_image + '.png') - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', +latex_additional_files = [front_cover_image_path, back_cover_image_path] - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', +template = string.Template(open('preamble.tex').read()) - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', +latex_contents = r""" +\frontcoverpage +\contentspage +""" + +backcover_latex_contents = r""" +\backcoverpage +""" + +latex_elements = { + 'papersize': 'letterpaper', + 'pointsize': '10pt', + 'fncychap': r'\usepackage[Bjornstrup]{fncychap}', + 'preamble': template.substitute(eventname=eventname, + project=project, + author=author, + frontcoverimage=front_cover_image, + backcoverimage=back_cover_image), + + 'tableofcontents': latex_contents, + 'printindex': backcover_latex_contents } # Grouping the document tree into LaTeX files. List of tuples @@ -199,10 +233,9 @@ def setup(app): # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, '%s.tex' % cleanname, u'%s Documentation' % classname, - u'F5 Networks, Inc.', 'manual'), + u'F5 Networks, Inc.', 'manual', True), ] - # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples diff --git a/docs/preamble.tex b/docs/preamble.tex new file mode 100644 index 0000000..9cd3d85 --- /dev/null +++ b/docs/preamble.tex @@ -0,0 +1,68 @@ +%% LaTeX preamble. + +\usepackage{type1cm} +\usepackage{helvet} +\usepackage{wallpaper} + +% Bypass unicode character not supported errors +\usepackage[utf8]{inputenc} + +\makeatletter +\def\UTFviii@defined#1{% + \ifx#1\relax + ?% + \else\expandafter + #1% + \fi +} +\makeatother + +\pagestyle{plain} +\pagenumbering{arabic} + +\renewcommand{\familydefault}{\sfdefault} + +\definecolor{f5red}{RGB}{235, 28, 35} + +\def\frontcoverpage{ + \begin{titlepage} + \ThisURCornerWallPaper{1.0}{${frontcoverimage}} + \vspace*{2.5cm} + \hspace{4.5cm} + {\color{f5red} \text{\Large ${eventname}}\par} + \vspace{.5cm} + \hspace{4.5cm} + {\color{white} \text{\huge ${project}}\par} + \vspace{0.5cm} + \hspace{4.5cm} + {\color{white} \text{\large ${author}}\par} + \vfill + \end{titlepage} + \newpage +} + +\def\backcoverpage{ + \newpage + \thispagestyle{empty} + \phantom{100} + \ThisURCornerWallPaper{1.0}{${backcoverimage}} +} + +\def\contentspage{ + \tableofcontents +} + +%% Disable standard title (but keep PDF info). +\renewcommand{\maketitle}{ + \begingroup + % These \defs are required to deal with multi-line authors; it + % changes \\ to ', ' (comma-space), making it pass muster for + % generating document info in the PDF file. + \def\\{, } + \def\and{and } + \pdfinfo{ + /Title (${project}) + /Author (${author}) + } + \endgroup +} diff --git a/scripts/convertdocx.sh b/scripts/convertdocx.sh old mode 100644 new mode 100755