Skip to content

Commit

Permalink
Remove old files; Merge f5-agility-lab-template changes; Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHiteshPatel committed Jul 8, 2017
1 parent cd23dcb commit 19152a7
Show file tree
Hide file tree
Showing 14 changed files with 188 additions and 15 deletions.
13 changes: 13 additions & 0 deletions containthedocs-bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -x

COMMAND="/bin/bash"

. ./containthedocs-image

exec docker run --rm -it \
-v "$PWD":"$PWD" --workdir "$PWD" \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} ${COMMAND}
13 changes: 13 additions & 0 deletions containthedocs-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -x

COMMAND="make -C docs html"

. ./containthedocs-image

exec docker run --rm -it \
-v "$PWD":"$PWD" --workdir "$PWD" \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} ${COMMAND}
13 changes: 13 additions & 0 deletions containthedocs-clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -x

COMMAND="make -C docs clean"

. ./containthedocs-image

exec docker run --rm -it \
-v "$PWD":"$PWD" --workdir "$PWD" \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} ${COMMAND}
13 changes: 13 additions & 0 deletions containthedocs-cleanbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -x

COMMAND="make -C docs clean html"

. ./containthedocs-image

exec docker run --rm -it \
-v "$PWD":"$PWD" --workdir "$PWD" \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} ${COMMAND}
18 changes: 18 additions & 0 deletions containthedocs-convert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -x

if [ "$#" -ne 1 ]; then
echo "Usage $0 <file.docx>"
exit 1
fi

COMMAND="scripts/convertdocx.sh $1"

. ./containthedocs-image

exec docker run --rm -it \
-v "$PWD":"$PWD" --workdir "$PWD" \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} ${COMMAND}
1 change: 1 addition & 0 deletions containthedocs-image
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
: ${DOC_IMG:=0xhiteshpatel/containthedocs:2.3}
11 changes: 11 additions & 0 deletions containthedocs-pdf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -x

. ./containthedocs-image

exec docker run --rm -it \
-v $PWD:$PWD --workdir $PWD \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} make -C docs latexpdf
Binary file not shown.
Binary file removed deprecated/Intro Automation and Orchestration.pdf
Binary file not shown.
Binary file added docs/_static/back_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/front_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/class1/module4/lab3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ attrbutes are explained in the table below.
.. list-table::
:header-rows: 1
:widths: 20 80
:stub-columns: 1

* - **Attribute**
Expand Down
53 changes: 38 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
#
import os
import sys
import time
import re
import string
sys.path.insert(0, os.path.abspath('.'))
import f5_sphinx_theme

Expand Down Expand Up @@ -86,6 +89,11 @@
copyright = u'2017, F5 Networks, Inc.'
author = u'https://github.com/f5devcentral/f5-automation-labs/graphs/contributors'

classname = project
cleanname = re.sub('\W+','',project)
year = time.strftime("%Y")
eventname = "Agility %s Hands-on Lab Guide" % (year)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand Down Expand Up @@ -299,30 +307,45 @@

# -- 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
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'F5ProgrammabilityTraining.tex', u'F5 Programmability Training',
u'https://github.com/f5devcentral/f5-automation-labs/graphs/contributors', 'manual'),
(master_doc, '%s.tex' % cleanname, u'%s Documentation' % classname,
u'F5 Networks, Inc.', 'manual', True),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
67 changes: 67 additions & 0 deletions docs/preamble.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
%% LaTeX preamble.

\usepackage{type1cm}
\usepackage{helvet}
\usepackage{wallpaper}
\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
}

0 comments on commit 19152a7

Please sign in to comment.