Przeglądaj źródła

include example JSON

Eren Yilmaz 6 lat temu
rodzic
commit
d4186c325f

+ 3 - 1
doc/chapter/1introduction.tex

@@ -1 +1,3 @@
-\TODO{some text}
+\TODO{some cool first sentences}
+\TODO{relevance}
+\TODO{related work}

+ 47 - 3
doc/chapter/2architecture.tex

@@ -1,8 +1,52 @@
 \TODO{some text}
-Reference to~\ref{fig:iff}.
+\section{Input File Format}\label{sec:inputFileFormat}
+The input to \appname is a JSON file.
+The data structure is modeled as a higher order entity relationship model in figure~\ref{fig:iff}.
+An example is displayed in figure~\ref{fig:json-example}
 
 \begin{figure}[tp]
     \centering
-    \includegraphics{img/json.png}
-    \caption[Input file format]{Input file format illustrated as a HERM diagram}\label{fig:iff}
+    \includegraphics[width=0.9\textwidth]{img/json.png}
+    \caption[Input file format]{Input file format illustrated as a HERM diagram}
+    \label{fig:iff}
+\end{figure}
+
+\begin{figure}
+    %    \lstinputlisting[language=Python,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]{src/keras_example_conv.py}
+    \begin{lstlisting}[language=json,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]
+    {
+       "layers":[
+          [
+             {
+                "name":"n2",
+                "width":10,
+                "height":10,
+                "x":0,
+                "y":0
+             },
+             {
+                "name":"n2",
+                "width":10,
+                "height":10,
+                "x":20,
+                "y":0,
+                "layers":[
+                   [
+                      {
+                         "name":"n2",
+                         "width":10,
+                         "height":10,
+                         "x":0,
+                         "y":0
+                      }
+                   ]
+                ]
+             }
+          ]
+       ],
+       "name":"n0"
+    }
+    \end{lstlisting}
+    \caption[Example Input File]{Example Input file that is understood by \appname.}
+    \label{fig:json-example}
 \end{figure}

+ 1 - 1
doc/chapter/appendix.tex

@@ -1 +1 @@
-\TODO{some figures}
+\TODO{add class diagrams}

+ 21 - 0
doc/doc.tex

@@ -30,6 +30,7 @@
 \usepackage[english]{todonotes}
 \newcommand{\TODO}[1]{\todo[inline]{TODO: #1}}
 \newcommand{\Thema}{Placing Nodes Moderately Well While Showing What Is Happening}
+\newcommand{\appname}{\TODO{appname}}
 \usepackage[hyphens]{url} % ermögliche Links (URLs) und erlaube sie am zeilenende umzubrechen
 \usepackage[english,pdfauthor={Eren B. Yilmaz and Kolja S. Strohm}, pdftitle={\Thema}, breaklinks=true]{hyperref}
 \usepackage[final]{microtype} % mikrotypographische Optimierungen
@@ -69,6 +70,11 @@
 \usepackage{listings}
 \usepackage{color} % Farben
 
+\colorlet{punct}{red!60!black}
+\definecolor{background}{HTML}{EEEEEE}
+\definecolor{delim}{RGB}{20,105,176}
+\colorlet{numb}{magenta!60!black}
+
 % Default fixed font does not support bold face
 \DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{8} % for bold
 \DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{8}  % for normal
@@ -97,6 +103,21 @@ showstringspaces=false,
 emphstyle=\ttb,
 stringstyle=\color{deepgreen},
 frame=tb}
+
+\lstdefinelanguage{json}{
+    basicstyle=\normalfont\ttfamily,
+    numberstyle=\scriptsize,
+    stepnumber=1,
+    numbersep=8pt,
+    showstringspaces=false,
+    literate=
+     *{:}{{{\color{punct}{:}}}}{1}
+      {,}{{{\color{punct}{,}}}}{1}
+      {\{}{{{\color{delim}{\{}}}}{1}
+      {\}}{{{\color{delim}{\}}}}}{1}
+      {[}{{{\color{delim}{[}}}}{1}
+      {]}{{{\color{delim}{]}}}}{1},
+}
 % linksbündige Fußboten
 \deffootnote{1.5em}{1em}{\makebox[1.5em][l]{\thefootnotemark}}
 

BIN
doc/img/json.png