Skip to content

Commit 19152a7

Browse files
committed
Remove old files; Merge f5-agility-lab-template changes; Fixes
1 parent cd23dcb commit 19152a7

14 files changed

+188
-15
lines changed

containthedocs-bash.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
COMMAND="/bin/bash"
6+
7+
. ./containthedocs-image
8+
9+
exec docker run --rm -it \
10+
-v "$PWD":"$PWD" --workdir "$PWD" \
11+
${DOCKER_RUN_ARGS} \
12+
-e "LOCAL_USER_ID=$(id -u)" \
13+
${DOC_IMG} ${COMMAND}

containthedocs-build.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
COMMAND="make -C docs html"
6+
7+
. ./containthedocs-image
8+
9+
exec docker run --rm -it \
10+
-v "$PWD":"$PWD" --workdir "$PWD" \
11+
${DOCKER_RUN_ARGS} \
12+
-e "LOCAL_USER_ID=$(id -u)" \
13+
${DOC_IMG} ${COMMAND}

containthedocs-clean.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
COMMAND="make -C docs clean"
6+
7+
. ./containthedocs-image
8+
9+
exec docker run --rm -it \
10+
-v "$PWD":"$PWD" --workdir "$PWD" \
11+
${DOCKER_RUN_ARGS} \
12+
-e "LOCAL_USER_ID=$(id -u)" \
13+
${DOC_IMG} ${COMMAND}

containthedocs-cleanbuild.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
COMMAND="make -C docs clean html"
6+
7+
. ./containthedocs-image
8+
9+
exec docker run --rm -it \
10+
-v "$PWD":"$PWD" --workdir "$PWD" \
11+
${DOCKER_RUN_ARGS} \
12+
-e "LOCAL_USER_ID=$(id -u)" \
13+
${DOC_IMG} ${COMMAND}

containthedocs-convert.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
if [ "$#" -ne 1 ]; then
6+
echo "Usage $0 <file.docx>"
7+
exit 1
8+
fi
9+
10+
COMMAND="scripts/convertdocx.sh $1"
11+
12+
. ./containthedocs-image
13+
14+
exec docker run --rm -it \
15+
-v "$PWD":"$PWD" --workdir "$PWD" \
16+
${DOCKER_RUN_ARGS} \
17+
-e "LOCAL_USER_ID=$(id -u)" \
18+
${DOC_IMG} ${COMMAND}

containthedocs-image

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
: ${DOC_IMG:=0xhiteshpatel/containthedocs:2.3}

containthedocs-pdf.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
5+
. ./containthedocs-image
6+
7+
exec docker run --rm -it \
8+
-v $PWD:$PWD --workdir $PWD \
9+
${DOCKER_RUN_ARGS} \
10+
-e "LOCAL_USER_ID=$(id -u)" \
11+
${DOC_IMG} make -C docs latexpdf
Binary file not shown.
-5.25 MB
Binary file not shown.

docs/_static/back_cover.png

1.24 MB
Loading

docs/_static/front_cover.png

5.87 MB
Loading

docs/class1/module4/lab3.rst

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ attrbutes are explained in the table below.
6262
6363
.. list-table::
6464
:header-rows: 1
65+
:widths: 20 80
6566
:stub-columns: 1
6667

6768
* - **Attribute**

docs/conf.py

+38-15
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#
1919
import os
2020
import sys
21+
import time
22+
import re
23+
import string
2124
sys.path.insert(0, os.path.abspath('.'))
2225
import f5_sphinx_theme
2326

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

92+
classname = project
93+
cleanname = re.sub('\W+','',project)
94+
year = time.strftime("%Y")
95+
eventname = "Agility %s Hands-on Lab Guide" % (year)
96+
8997
# The version info for the project you're documenting, acts as replacement for
9098
# |version| and |release|, also used in various other places throughout the
9199
# built documents.
@@ -299,30 +307,45 @@
299307

300308
# -- Options for LaTeX output ---------------------------------------------
301309

302-
latex_elements = {
303-
# The paper size ('letterpaper' or 'a4paper').
304-
#
305-
# 'papersize': 'letterpaper',
310+
front_cover_image = 'front_cover'
311+
back_cover_image = 'back_cover'
312+
313+
front_cover_image_path = os.path.join('_static', front_cover_image + '.png')
314+
back_cover_image_path = os.path.join('_static', back_cover_image + '.png')
306315

307-
# The font size ('10pt', '11pt' or '12pt').
308-
#
309-
# 'pointsize': '10pt',
316+
latex_additional_files = [front_cover_image_path, back_cover_image_path]
310317

311-
# Additional stuff for the LaTeX preamble.
312-
#
313-
# 'preamble': '',
318+
template = string.Template(open('preamble.tex').read())
314319

315-
# Latex figure (float) alignment
316-
#
317-
# 'figure_align': 'htbp',
320+
latex_contents = r"""
321+
\frontcoverpage
322+
\contentspage
323+
"""
324+
325+
backcover_latex_contents = r"""
326+
\backcoverpage
327+
"""
328+
329+
latex_elements = {
330+
'papersize': 'letterpaper',
331+
'pointsize': '10pt',
332+
'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
333+
'preamble': template.substitute(eventname=eventname,
334+
project=project,
335+
author=author,
336+
frontcoverimage=front_cover_image,
337+
backcoverimage=back_cover_image),
338+
339+
'tableofcontents': latex_contents,
340+
'printindex': backcover_latex_contents
318341
}
319342

320343
# Grouping the document tree into LaTeX files. List of tuples
321344
# (source start file, target name, title,
322345
# author, documentclass [howto, manual, or own class]).
323346
latex_documents = [
324-
(master_doc, 'F5ProgrammabilityTraining.tex', u'F5 Programmability Training',
325-
u'https://github.com/f5devcentral/f5-automation-labs/graphs/contributors', 'manual'),
347+
(master_doc, '%s.tex' % cleanname, u'%s Documentation' % classname,
348+
u'F5 Networks, Inc.', 'manual', True),
326349
]
327350

328351
# The name of an image file (relative to this directory) to place at the top of

docs/preamble.tex

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
%% LaTeX preamble.
2+
3+
\usepackage{type1cm}
4+
\usepackage{helvet}
5+
\usepackage{wallpaper}
6+
\usepackage[utf8]{inputenc}
7+
8+
\makeatletter
9+
\def\UTFviii@defined#1{%
10+
\ifx#1\relax
11+
?%
12+
\else\expandafter
13+
#1%
14+
\fi
15+
}
16+
17+
\makeatother
18+
19+
\pagestyle{plain}
20+
\pagenumbering{arabic}
21+
22+
\renewcommand{\familydefault}{\sfdefault}
23+
24+
\definecolor{f5red}{RGB}{235, 28, 35}
25+
26+
\def\frontcoverpage{
27+
\begin{titlepage}
28+
\ThisURCornerWallPaper{1.0}{${frontcoverimage}}
29+
\vspace*{2.5cm}
30+
\hspace{4.5cm}
31+
{\color{f5red} \text{\Large ${eventname}}\par}
32+
\vspace{.5cm}
33+
\hspace{4.5cm}
34+
{\color{white} \text{\huge ${project}}\par}
35+
\vspace{0.5cm}
36+
\hspace{4.5cm}
37+
{\color{white} \text{\large ${author}}\par}
38+
\vfill
39+
\end{titlepage}
40+
\newpage
41+
}
42+
43+
\def\backcoverpage{
44+
\newpage
45+
\thispagestyle{empty}
46+
\phantom{100}
47+
\ThisURCornerWallPaper{1.0}{${backcoverimage}}
48+
}
49+
50+
\def\contentspage{
51+
\tableofcontents
52+
}
53+
54+
%% Disable standard title (but keep PDF info).
55+
\renewcommand{\maketitle}{
56+
\begingroup
57+
% These \defs are required to deal with multi-line authors; it
58+
% changes \\ to ', ' (comma-space), making it pass muster for
59+
% generating document info in the PDF file.
60+
\def\\{, }
61+
\def\and{and }
62+
\pdfinfo{
63+
/Title (${project})
64+
/Author (${author})
65+
}
66+
\endgroup
67+
}

0 commit comments

Comments
 (0)