%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
\ifdefined\pdfpxdimen
   \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=.75bp\relax
\ifdefined\pdfimageresolution
    \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax
\fi
%% let collapsible pdf bookmarks panel have high depth per default
\PassOptionsToPackage{bookmarksdepth=5}{hyperref}

\PassOptionsToPackage{booktabs}{sphinx}
\PassOptionsToPackage{colorrows}{sphinx}

\PassOptionsToPackage{warn}{textcomp}
\usepackage[utf8]{inputenc}
\ifdefined\DeclareUnicodeCharacter
% support both utf8 and utf8x syntaxes
  \ifdefined\DeclareUnicodeCharacterAsOptional
    \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
  \else
    \let\sphinxDUC\DeclareUnicodeCharacter
  \fi
  \sphinxDUC{00A0}{\nobreakspace}
  \sphinxDUC{2500}{\sphinxunichar{2500}}
  \sphinxDUC{2502}{\sphinxunichar{2502}}
  \sphinxDUC{2514}{\sphinxunichar{2514}}
  \sphinxDUC{251C}{\sphinxunichar{251C}}
  \sphinxDUC{2572}{\textbackslash}
\fi
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amstext}
\usepackage{babel}



\usepackage{tgtermes}
\usepackage{tgheros}
\renewcommand{\ttdefault}{txtt}



\usepackage[Bjarne]{fncychap}
\usepackage{sphinx}

\fvset{fontsize=auto}
\usepackage{geometry}


% Include hyperref last.
\usepackage{hyperref}
% Fix anchor placement for figures with captions.
\usepackage{hypcap}% it must be loaded after hyperref.
% Set up styles of URL: it should be placed after hyperref.
\urlstyle{same}


\usepackage{sphinxmessages}
\setcounter{tocdepth}{1}



\title{TreeTime User Manual}
\date{Apr 16, 2025}
\release{2025.1}
\author{Jacob Kanev}
\newcommand{\sphinxlogo}{\vbox{}}
\renewcommand{\releasename}{Release}
\makeindex
\begin{document}

\ifdefined\shorthandoff
  \ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
  \ifnum\catcode`\"=\active\shorthandoff{"}\fi
\fi

\pagestyle{empty}
\sphinxmaketitle
\pagestyle{plain}
\sphinxtableofcontents
\pagestyle{normal}
\phantomsection\label{\detokenize{index::doc}}
\noindent{\sphinxincludegraphics[scale=0.5]{{treetime-logo}.png}\hspace*{\fill}}

\sphinxAtStartPar
\sphinxstyleemphasis{TreeTime} is a general data organisation, management and analysis tool using linked trees instead of flat lists of tables.
A tree is a hierarchical structure that arranges your data into units and sub\sphinxhyphen{}units.
Mathematical functions (sum, difference, mean, ratio) can be calculated recursively.
Linked trees are distinct trees that share data between them.
In \sphinxstyleemphasis{TreeTime}, a data object is part of several trees at the same time.
\sphinxstyleemphasis{TreeTime} is a time planner, a to\sphinxhyphen{}do list manager, a test report tool, a project planner, a family ancestry editor, a mind\sphinxhyphen{}mapping tool, and similar.



\sphinxstepscope


\chapter{Introduction}
\label{\detokenize{introduction:introduction}}\label{\detokenize{introduction::doc}}

\section{Concept}
\label{\detokenize{introduction:concept}}

\subsection{What is a Tree?}
\label{\detokenize{introduction:what-is-a-tree}}
\sphinxAtStartPar
A “tree” is a data structure, much like a table or a list.
A tree sorts information hierarchically into boxes and sub\sphinxhyphen{}boxes and sub\sphinxhyphen{}sub\sphinxhyphen{}boxes.

\sphinxAtStartPar
If you want to organise your work tasks you could sort them into work packages, that are part of projects, that are part of products.
If you plan a larger project, you can sort all tasks by responsible persons, who are part of teams, that are part of departments, that are part of branches.
You can also make a time plan, where a year consists of quarters, that consist of weeks, that contain a number of tasks.
You can have an address book where you have a hierarchy of friends / colleagues / aquaintances, or you can sort knowledge about animals into kingdom / class / family / species.

\sphinxAtStartPar
The nice thing about trees is that you can define mathematical functions on them.
Planned hours can be summed up per work package and project, or per person and team, or per week and month.
A mean priority can be shown per work package and project.

\sphinxAtStartPar
The concept of hierarchical categorisation can be applied to all sorts of data and will feel a lot more natural and easier to use than organising the same data in spread sheets.


\subsection{What are linked Trees?}
\label{\detokenize{introduction:what-are-linked-trees}}
\sphinxAtStartPar
The core concept of \sphinxstyleemphasis{TreeTime} are linked trees.
Linked trees are separate trees that share the same data.
One piece of information (a \sphinxstyleemphasis{node}) can be in several trees at the same time, but in different place of the tree.
As a single tree is a way of sorting information, different linked trees sort the same data in different ways.

\noindent{\hspace*{\fill}\sphinxincludegraphics{{linked-trees1}.png}\hspace*{\fill}}

\sphinxAtStartPar
In \sphinxstyleemphasis{Tree 1}, Node \sphinxstyleemphasis{E} is right at the bottom, as a child of \sphinxstyleemphasis{B} and a grandchild of \sphinxstyleemphasis{A}. In \sphinxstyleemphasis{Tree 2} it is a child of \sphinxstyleemphasis{D}.

\sphinxAtStartPar
In \sphinxstyleemphasis{TreeTime}, a \sphinxstyleemphasis{node} or \sphinxstyleemphasis{item} can hold different information like text, numbers, dates, internet links.
These are saved in the \sphinxstyleemphasis{item’s} \sphinxstyleemphasis{fields}.

\sphinxAtStartPar
Here we have a field we call “value”. Each node in all trees has a value field that can hold a number (like a cell in a spread sheet).
The node A has the value=1, B=2, etc.
In addition we have a field we call “Sum”.
Its content is calculated automatically, summing up the item’s own value plus the values of all children.
In \sphinxstyleemphasis{TreeTime}, looking at item \sphinxstyleemphasis{E} and \sphinxstyleemphasis{Tree 1} this looks like this:

\noindent{\hspace*{\fill}\sphinxincludegraphics{{abcde011}.png}\hspace*{\fill}}

\sphinxAtStartPar
Clicking on the other tab shows the second tree while the same items stays selected:

\noindent{\hspace*{\fill}\sphinxincludegraphics{{abcde021}.png}\hspace*{\fill}}

\sphinxAtStartPar
Note how the values are summed up the branches.
Apart from sums, \sphinxstyleemphasis{TreeTime} also offers means, ratios, or differences, using different combinations of parent, child, or sibling fields.

\sphinxAtStartPar
Linked trees are a natural and powerful way to structure data.
If you, for instance, organise information about animals, you might want to see the animal’s taxonomy (kingdom/class/family/species), but also their habitat (continent/country/area), and switch between both views.
If you organise tasks, you could switch between a year/quarter/week/day breakdown, a company/department/team/person tree, and a product/project/package/task overview.

\sphinxAtStartPar
In \sphinxstyleemphasis{TreeTime}, the structure of your data (whether you store priority, hours, and a description for a task, or expected life span, habitat and number of legs for an animal), the trees themselves, and the calculated values within the trees are completely user defined. Data is stored in text files, changes are saved on the fly, and when opening \sphinxstyleemphasis{TreeTime}, the software is automatically connected to the last used file.


\section{Basic Use}
\label{\detokenize{introduction:basic-use}}
\sphinxAtStartPar
Start the software (see ‘Execute’ from the section {[}Installation{]}(\#id\sphinxhyphen{}installation)). In the main dialog, go to “File” / “New from Template”, select “Simple\sphinxhyphen{}Task\sphinxhyphen{}List.trt” and in the next dialog give a file name for the new file. An example file with a simple project task list structure will open.

\sphinxAtStartPar
The GUI consists of three parts:
\sphinxhyphen{} A button box on the left. Execute tree structure operations from here.
\sphinxhyphen{} An editing grid in the middle, showing the contents of the selected data item. Edit single data items here.
\sphinxhyphen{} A tab view with tress spanning the center\sphinxhyphen{}right. View and analyse your data here.

\noindent{\hspace*{\fill}\sphinxincludegraphics{{screenshot011}.png}\hspace*{\fill}}

\sphinxAtStartPar
Access each single tree by clicking a tab on the main tree\sphinxhyphen{}view widget (the picture above shows the tree \sphinxstyleemphasis{Time Plan}, the picture below the tree \sphinxstyleemphasis{Projects}).

\noindent{\hspace*{\fill}\sphinxincludegraphics{{screenshot021}.png}\hspace*{\fill}}

\sphinxAtStartPar
Branches and children can be sorted, branches can be folded and unfolded. Data content is shown via analytic fields that are defined per tree. In the example project you will see a sum, a percentage, and text display.

\sphinxAtStartPar
Add, move and remove single nodes and complete branches by using the buttons on the left. Change the name of a node by selecting the node and editing the name in the top of the edit grid in the middle. Change all other values (numbers or text) by clicking into the field and start typing.

\sphinxAtStartPar
The parents of an item are listed underneath the item name. Each tree has a separate line. Change the position of a node within a tree by clicking on any of the parent buttons.

\noindent{\hspace*{\fill}\sphinxincludegraphics{{screenshot031}.png}\hspace*{\fill}}

\sphinxAtStartPar
In this example a new node in the tree \sphinxstyleemphasis{Time Plan} has just been created, and is now added to the tree \sphinxstyleemphasis{Projects}.

\sphinxAtStartPar
\sphinxstyleemphasis{TreeTime} lets you select different themes and will try to use the default colours that are defined with your operating system.

\noindent{\hspace*{\fill}\sphinxincludegraphics{{screenshot041}.png}\hspace*{\fill}}


\section{Data Files}
\label{\detokenize{introduction:data-files}}
\sphinxAtStartPar
The data in TreeTime is stored in a plain text file, marked with a ‘trt’ file ending (‘trt’ for ‘TreeTime’).

\sphinxAtStartPar
The button ‘Load File’ will open an existing ‘trt’ file. After this, all changes are written to that file. There is no ‘Save’ button, changes are written to the file immediately.

\sphinxAtStartPar
The button ‘New From Template’ opens an existing data file, creates a copy, and saves this copy. A data file can be created by copying the currently open file. All write operations will be performed on that copy. This is to create a new file from a basically empty ‘trt’ file that has a pre\sphinxhyphen{}defined data structure.

\sphinxAtStartPar
A data file can be created by saving the currently open file to a copy. The button ‘Save As’ saves the current state. All write operations will be on the new file.


\section{Installation}
\label{\detokenize{introduction:installation}}

\subsection{Using pre\sphinxhyphen{}compiled Binaries}
\label{\detokenize{introduction:using-pre-compiled-binaries}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Windows, Linux: Go to {[}github.com/jkanev/treetime/releases/tag/2025.1{]}(\sphinxurl{https://github.com/jkanev/treetime/releases/tag/2025.1}) and download a zipped package for Windows 10, 64 bit, or for Linux 64 bit from there. Unzip it into your program directory and run \sphinxstyleemphasis{TreeTime} or \sphinxstyleemphasis{TreeTime.exe} from the new folder. Unzip the data package too. Add the program folder to your path.

\sphinxAtStartPar
Executable bundles have been created with pyinstaller ({[}www.pyinstaller.org{]}(\sphinxurl{http://www.pyinstaller.org})).

\item {} 
\sphinxAtStartPar
Mac: Mac users please use the Python code (see below). There is no executable for Mac.
(If anybody can help building an executable for other platforms I’d be delighted.)

\end{itemize}


\subsection{Using a PyPi package in Python}
\label{\detokenize{introduction:using-a-pypi-package-in-python}}\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
If you don’t have it yet, install python3

\item {} \begin{description}
\sphinxlineitem{Install PyQt6 \textendash{} on an elevated command prompt (Windows), or on the standard command line (Mac, Linux), type:}
\sphinxAtStartPar
\sphinxtitleref{pip install PyQt6}

\end{description}

\item {} \begin{description}
\sphinxlineitem{Install \sphinxstyleemphasis{TreeTime} \textendash{} on an elevated command prompt (Windows), or on the standard command line (Mac, Linux), type:}
\sphinxAtStartPar
\sphinxtitleref{pip install treetime}

\end{description}

\end{enumerate}


\subsection{Using script code with Python}
\label{\detokenize{introduction:using-script-code-with-python}}\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
If you don’t have it yet, install python3

\item {} 
\sphinxAtStartPar
Install PyQt6 \textendash{} on an elevated command prompt (Windows), or on the standard command line (Mac, Linux), type: \sphinxtitleref{pip install PyQt6}

\item {} 
\sphinxAtStartPar
Download this project from GitHub as a zip file (\sphinxurl{https://github.com/jkanev/treetime/archive/master.zip}) and unzip

\item {} \begin{description}
\sphinxlineitem{Install \sphinxstyleemphasis{TreeTime}: in the command line, cd into the main directory, then type:}\begin{itemize}
\item {} \begin{description}
\sphinxlineitem{Linux:}\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxtitleref{python3 setup.py build}

\item {} 
\sphinxAtStartPar
\sphinxtitleref{sudo python3 setup.py install}

\end{itemize}

\end{description}

\item {} \begin{description}
\sphinxlineitem{Windows:}\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxtitleref{py setup.py build}

\item {} 
\sphinxAtStartPar
\sphinxtitleref{py setup.py install}

\end{itemize}

\end{description}

\end{itemize}

\end{description}

\end{enumerate}


\subsection{Execute}
\label{\detokenize{introduction:execute}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Windows: Hit the Windows key and type “TreeTime”, then click the “run command treetime” that comes up.

\item {} 
\sphinxAtStartPar
Linux, Mac: On the command line, type “TreeTime”. You can also start this any other way your operating system supports. Plus, there’s a .desktop file (for KDE and Gnome) in the data directory to create desktop or menu link.

\end{itemize}

\sphinxstepscope


\chapter{Data Format}
\label{\detokenize{data-format:data-format}}\label{\detokenize{data-format::doc}}

\section{Global Structure}
\label{\detokenize{data-format:global-structure}}
\sphinxAtStartPar
TreeTime data files are plain text (Unicode/UTF8) and can be edited with any text editor. The global structure consists of three parts: The tree definition, the item definition, and the item pool.
\begin{itemize}
\item {} 
\sphinxAtStartPar
The tree definition is preceded with the marker \sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}trees\sphinxhyphen{}\sphinxhyphen{}}} followed by a newline. This defines the number and data structure of the trees in the file.

\item {} 
\sphinxAtStartPar
The data item definition is preceded by the marker \sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}item\sphinxhyphen{}types\sphinxhyphen{}\sphinxhyphen{}}} followed by a newline. This defines the data fields of each data item.

\item {} 
\sphinxAtStartPar
The item pool is preceded by the marker \sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}item\sphinxhyphen{}pool\sphinxhyphen{}\sphinxhyphen{}}} followed by a newline. This section contains the actual data.

\end{itemize}

\sphinxAtStartPar
The file content of the simple example file in the Introduction chapter looks like this:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{trees}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}

\PYG{n}{tree} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Tree 1}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Value}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Sum}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}

\PYG{n}{tree} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Tree 2}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Value}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Sum}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}

\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{item}\PYG{o}{\PYGZhy{}}\PYG{n}{types}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}

\PYG{n}{item} \PYG{n}{Node}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{]}

\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{item}\PYG{o}{\PYGZhy{}}\PYG{n}{pool}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}

\PYG{n}{item} \PYG{n}{A}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{]}

\PYG{n}{item} \PYG{n}{B}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{]}

\PYG{n}{item} \PYG{n}{C}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]}

\PYG{n}{item} \PYG{n}{D}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{]}

\PYG{n}{item} \PYG{n}{E}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]}
\end{sphinxVerbatim}


\section{Tree Definition}
\label{\detokenize{data-format:tree-definition}}
\sphinxAtStartPar
A single tree is defined by the name of the tree and a list of tree fields. A node’s tree field values are calculated from data fields or tree fields of the node itself, its siblings, parent and children. Each of these are mentioned in the field definition. There are various different field types, some use values in the current tree, some use values from other trees. You can for example display the name of a node’s parent in a different tree. Trees are numbered starting with 0. Look at the first tree in the example:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{tree} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Tree 1}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Value}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Sum}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
The tree itself is called “Tree 1”. It has two tree fields, “Value” and “Sum”. The tree field “Value” is of type “sum”, and it displays anything that is found in the data item field “value”. The tree field “Sum” is also of type “Sum” and for each node it adds everything in the node’s item field “value”, plus all values in the tree field “Sum” of its children.

\sphinxAtStartPar
More about how to define tree fields in the next chapter.


\section{Data Item Definition}
\label{\detokenize{data-format:data-item-definition}}
\sphinxAtStartPar
Each node in a tree is stored as a “data item”. In the data file a “data item” is stored like this:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{item} \PYG{n}{A}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
After four spaces indent, there’s the keyword “item” and the name (in this case “A”). This is the name that’s displayed in the heading of the data item pane in the GUI, and as the node name in the tree pane of the GUI.
The next line, after an indent of 8 spaces, has the keyword “fields” followed by a json dictionary:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field name 1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field name 2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}
\end{sphinxVerbatim}

\sphinxAtStartPar
In this dictionary, each data field has a sub\sphinxhyphen{}dictionary listing its default content, the field type, and possibly some other values (timers have a running/stopped flag and a last\sphinxhyphen{}started flag). When a new item/node is created, this default content will be in all data fields. In the example above, a new node will contain one single field called “value” with the content “1”.

\sphinxAtStartPar
For a description of all possible data field types, see the Data Fields chapter.

\sphinxAtStartPar
The last line, “trees …”, must contain an array of \sphinxstyleemphasis{N} empty arrays, where \sphinxstyleemphasis{N} is the number of trees in your file. If you have four trees in your tree fiel, that line must read:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
This makes your field definition available in all trees (and creates an error otherwise).


\section{The Data Pool}
\label{\detokenize{data-format:the-data-pool}}
\sphinxAtStartPar
The Data Pool is the last of the three sections of the tree file, and in most cases the largest. This is where the actual data is stored.
It consists of a list of items in the tree, with a syntax like in the data item definition section:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{item} \PYG{n}{D}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{]}

\PYG{n}{item} \PYG{n}{E}
    \PYG{n}{fields} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{value}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{\PYGZcb{}}
    \PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
The content here is the actual content in the field. The tree structure is stored in the last line:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{trees} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
This is an array of arrays, each of which is a path in the tree. In the example above the node can be found following the path 0\sphinxhyphen{}0\sphinxhyphen{}1 in the first tree starting at the root node, and 0\sphinxhyphen{}1 in the second tree. Children are numbered using fixed indexes, starting at 0. A path of 0\sphinxhyphen{}0\sphinxhyphen{}1 means: My node is the second child (\sphinxhyphen{}1) of the first child (\sphinxhyphen{}0\sphinxhyphen{}1) of the first child (0\sphinxhyphen{}0\sphinxhyphen{}1) of the root node in the (first) tree. And in the second tree, the path 0\sphinxhyphen{}1 says the node is the second child of the first child of the root.

\sphinxstepscope


\chapter{Data Fields}
\label{\detokenize{data-fields:data-fields}}\label{\detokenize{data-fields::doc}}
\sphinxAtStartPar
Data fields are defined by a dictionary \sphinxcode{\sphinxupquote{\{...\}}} where the field names are the dictionary keys \sphinxcode{\sphinxupquote{\{"name1": ..., "name2": ..., "name3": ...\}}}, and their type as well as their default value are the dictionary valuues \sphinxcode{\sphinxupquote{\{"name1": \{"content": "", "type": "longtext"\}, "name2": \{"content": "", "type": "url"\}, "name3": ...\}}}.
The possible types are “string”, “text”, “longtext”, “url”, “integer”, and “timer”.


\section{string}
\label{\detokenize{data-fields:string}}
\sphinxAtStartPar
One line of text.:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Maria Sibylla Merian}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{string}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxAtStartPar
The field contains strings (small texts). In the GUI, the field will span one line. Text can be entered.


\section{text}
\label{\detokenize{data-fields:text}}
\sphinxAtStartPar
Longer text.:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{details}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Please do the following: }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{text}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxAtStartPar
The field can contain longer text. In the GUI, there are 10 lines and there’s a scrollbar for entering longer texts.


\section{longtext}
\label{\detokenize{data-fields:longtext}}
\sphinxAtStartPar
Quite long text.:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{details}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{We discussed the following...}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{longtext}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxAtStartPar
Identical to the text field, but in the GUI there are 25 lines and a scrollbar.


\section{url}
\label{\detokenize{data-fields:url}}
\sphinxAtStartPar
A URl of any type (file, http, …).:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{external link}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{https://tree\PYGZhy{}time.info}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{url}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxAtStartPar
In the GUI there’s a text field and a button saying “Open”. Clicking the button will use the the content of the text field and call the open method defined in the operating system (e.g. a content of “\sphinxurl{https://tree-time.info}” or “\sphinxurl{file:///home/myself/downloads/pass-word.info.html}” would be opened with your default web browser).


\section{integer}
\label{\detokenize{data-fields:integer}}
\sphinxAtStartPar
A number.:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{hours planned}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{integer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxAtStartPar
A simple number, can be a floating point number such as \sphinxhyphen{}1.23456.


\section{timer}
\label{\detokenize{data-fields:timer}}
\sphinxAtStartPar
A stop watch counting hours/minutes/seconds.:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{hours spent}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{content}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{running\PYGZus{}since}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{n}{false}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{timer}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxAtStartPar
In the GUI there will be a “Start” button and the field will contain a number.

\sphinxAtStartPar
Hitting the “Start” button will change the text in the field to “stop watch running”, and the text on the button changes to “Stop”. The stored item in the fiel changes to: \sphinxcode{\sphinxupquote{"hours spent": \{"content": 1.2000021166666666, "running\_since": "2024\sphinxhyphen{}04\sphinxhyphen{}17 10:25:03", "type": "timer"\}}}. The actual tree field values will get updated once a second, including all branches and parents, updating all values like ratios and sums. It makes sense to use tree fields like \sphinxstyleemphasis{ratio\sphinxhyphen{}time} and \sphinxstyleemphasis{sum\sphinxhyphen{}time} to see the value in hh:mm:ss format instead of floating point numbers. The stop watch keeps running even when the file is closed or the computer is shut down.

\sphinxAtStartPar
Hitting the “Stop” button will display the currently summed up value in the field, and the text on the button changes to “Start” again. In the file, the “running” flag is removed: \sphinxcode{\sphinxupquote{"hours spent": \{"content": 1.3, "running\_since": false, "type": "timer"\}}}

\sphinxAtStartPar
Subsequent start/stops on the button will add to the total value.

\sphinxstepscope


\chapter{Tree Fields}
\label{\detokenize{tree-fields:tree-fields}}\label{\detokenize{tree-fields::doc}}

\section{General Syntax}
\label{\detokenize{tree-fields:general-syntax}}
\sphinxAtStartPar
Each tree field is a function with a list of input fields. These fields can be either tree fields or data fields. To avoid ambiguities it is good practice to name tree fields starting with a capital letter and data fields with a lower case letter. A tree field is always defined as part of a tree (see previous chapter). The definition states the name, the field type, and the input parameters:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{type}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
The field is started by the line \sphinxcode{\sphinxupquote{field "Name"}} where “Name” is the name of the field. This will appear as the column heading in the tree list.
After this, indented with four spaces, is the field type: \sphinxcode{\sphinxupquote{field\sphinxhyphen{}type "type"}}, where “type” is the type (see next for an overview).
After this, the lines \sphinxcode{\sphinxupquote{own\sphinxhyphen{}fields {[}...{]}}}, \sphinxcode{\sphinxupquote{child\sphinxhyphen{}fields {[}...{]}}}, \sphinxcode{\sphinxupquote{sibling\sphinxhyphen{}fields {[}...{]}}}, and \sphinxcode{\sphinxupquote{parent\sphinxhyphen{}fields {[}...{]}}} each define a list of field names. These are the input parameters for the function. They are evaluated in the order they are mentioned. A real\sphinxhyphen{}world example:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Progress}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ratio\PYGZhy{}percent}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Spent Hours}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Planned Hours}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
The tree field “Progress” is a ratio, defined as parameter1 / (parameter2 + parameter3 + …). In the tree view it will be displayed as a percentage. It shows the ratio of the tree fields “Spent Hours” / “Planned Hours”.


\section{string}
\label{\detokenize{tree-fields:string}}
\sphinxAtStartPar
The simple display of the content of one or multiple data fields or tree fields.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{string}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
Result: The values or strings found in the fields \sphinxstyleemphasis{field1, field2, field3, …}, put together, in the order they are mentioned.


\section{url}
\label{\detokenize{tree-fields:url}}
\sphinxAtStartPar
Same as “string”, but in an html export the field is formated as url link (clickable).


\section{text}
\label{\detokenize{tree-fields:text}}
\sphinxAtStartPar
Same as “string”, but the exported field has a larger width and can span several lines.


\section{sum}
\label{\detokenize{tree-fields:sum}}
\sphinxAtStartPar
The sum of all input fields.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sum}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were “field1”, “field2”, “field3”, …, are the names of data or tree fields. Fields must be integer fields, the result for string fields is not defined.

\sphinxAtStartPar
Result: The value \sphinxstyleemphasis{field1 + field2 + field3 + …}.


\section{set}
\label{\detokenize{tree-fields:set}}
\sphinxAtStartPar
A list of unique occurrences of values of all input fields.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{set}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were “field1”, “field2”, “field3”, …, are the names of data or tree fields.

\sphinxAtStartPar
Result: A list like \sphinxstyleemphasis{value1, value2, value3, value4}, where each value is the value of at least on input field and each value is listed only once, sorted alphabetically.


\section{sum\sphinxhyphen{}time}
\label{\detokenize{tree-fields:sum-time}}
\sphinxAtStartPar
Same as “sum”, but will show the result as hour format, e.g. the value \sphinxstyleemphasis{1.5} will be displayed and exported as \sphinxstyleemphasis{1:30:00}.


\section{difference}
\label{\detokenize{tree-fields:difference}}
\sphinxAtStartPar
Difference of numbers.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{difference}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were “field1”, “field2”, “field3”, …, are the names of data or tree fields.

\sphinxAtStartPar
Result: The value \sphinxstyleemphasis{field1 \sphinxhyphen{} (field2 + field3 + …)}, in the order they are mentioned.


\section{difference\sphinxhyphen{}time}
\label{\detokenize{tree-fields:difference-time}}
\sphinxAtStartPar
Same as “difference”, but will show the result as hour format, e.g. the value \sphinxstyleemphasis{1.5} will be displayed and exported as \sphinxstyleemphasis{1:30:00}.


\section{mean}
\label{\detokenize{tree-fields:mean}}
\sphinxAtStartPar
The statistical mean of all input fields.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were “field1”, “field2”, “field3”, …, are the names of data or tree fields.

\sphinxAtStartPar
Result: The value \sphinxstyleemphasis{(field1 + field2 + field3 + …) / N}, where \sphinxstyleemphasis{N} is the number of fields.


\section{mean\sphinxhyphen{}percent}
\label{\detokenize{tree-fields:mean-percent}}
\sphinxAtStartPar
Same as “mean”, but will show the result as a percentage, e.g. the value \sphinxstyleemphasis{0.75} will show as \sphinxstyleemphasis{75 \%}.


\section{min}
\label{\detokenize{tree-fields:min}}
\sphinxAtStartPar
The minimum.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{min}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were “field1”, “field2”, “field3”, …, are the names of data or tree fields.

\sphinxAtStartPar
Result: The minimum value \sphinxstyleemphasis{min(field1, field2, field3, …)}. This can only be for numbers. If you want to find the minimum of texts, use \sphinxstyleemphasis{min\sphinxhyphen{}string}.


\section{max}
\label{\detokenize{tree-fields:max}}
\sphinxAtStartPar
The Maximum.
Same as \sphinxstyleemphasis{min}, but displays the maximum.


\section{min\sphinxhyphen{}string}
\label{\detokenize{tree-fields:min-string}}
\sphinxAtStartPar
The smallest of a list of strings.
Same as min, but can be used for text, e.g., names of branches collected by a \sphinxstyleemphasis{node\sphinxhyphen{}name} field (see below). Comparison is alphabetically, “aaaab” is smaller than “bc”.


\section{max\sphinxhyphen{}string}
\label{\detokenize{tree-fields:max-string}}
\sphinxAtStartPar
The largest of a list of strings.
Same as \sphinxstyleemphasis{min\sphinxhyphen{}string}, but shows the maximum.


\section{ratio}
\label{\detokenize{tree-fields:ratio}}
\sphinxAtStartPar
The ratio between the first and the sum of all following input fields.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ratio}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were “field1”, “field2”, “field3”, …, are the names of data or tree fields.

\sphinxAtStartPar
Result: The value \sphinxstyleemphasis{field1 / (field2 + field3 + …)}, where \sphinxstyleemphasis{N} is the number of fields.


\section{ratio\sphinxhyphen{}percent}
\label{\detokenize{tree-fields:ratio-percent}}
\sphinxAtStartPar
Same as “ratio”, but displayed as percentage (e.g., 0.75 is displayed as 75 \%).


\section{node\sphinxhyphen{}name}
\label{\detokenize{tree-fields:node-name}}
\sphinxAtStartPar
The name of the node’s parent in another tree.
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{node\PYGZhy{}name}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
    \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{n}{N}\PYG{p}{]}
\end{sphinxVerbatim}

\sphinxAtStartPar
were \sphinxstyleemphasis{N} is an integer number.

\sphinxAtStartPar
Result: Displays the name of the node’s parent in tree \sphinxstyleemphasis{N}. Trees are counted starting with 0.

\sphinxAtStartPar
Example: This field is called “Project” and is defined in a tree “Time”, which is the first tree (i.e. Tree 0). There is another tree called “Projects”, which is the third tree (i.e. Tree 2):

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{tree} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Time}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{n}{field} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Project}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{field}\PYG{o}{\PYGZhy{}}\PYG{n+nb}{type} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{node\PYGZhy{}name}\PYG{l+s+s2}{\PYGZdq{}}
        \PYG{n}{own}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{child}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{sibling}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{p}{]}
        \PYG{n}{parent}\PYG{o}{\PYGZhy{}}\PYG{n}{fields} \PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}

\PYG{n}{tree} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Tasks}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}

\PYG{n}{tree} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Projects}\PYG{l+s+s2}{\PYGZdq{}}
    \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}
\end{sphinxVerbatim}

\sphinxAtStartPar
This would create the column “Project” in the tree view of the “Time” tree. The line \sphinxcode{\sphinxupquote{parent\sphinxhyphen{}fields{[}2{]}}} means each entry shows the respective node’s parent in the “Project” tree (e.g. “TreeTime”).


\section{node\sphinxhyphen{}path}
\label{\detokenize{tree-fields:node-path}}
\sphinxAtStartPar
Same as “node\sphinxhyphen{}name”, but instead of the paren’t name, the entire path is shown, using “|” as delimiter (e.g. “Coding | Open Source | TreeTime”).

\sphinxstepscope


\chapter{History and Road Map}
\label{\detokenize{releases:history-and-road-map}}\label{\detokenize{releases::doc}}

\section{Past}
\label{\detokenize{releases:past}}

\subsection{2015}
\label{\detokenize{releases:id1}}\begin{itemize}
\item {} 
\sphinxAtStartPar
November: First implementation, simple data types, simple GUI

\end{itemize}


\subsection{2016}
\label{\detokenize{releases:id2}}\begin{itemize}
\item {} 
\sphinxAtStartPar
February: Implemented selection (the same item gets selected in all trees, changing a tab shows the same item)

\item {} 
\sphinxAtStartPar
March: Implemented remaining local functionality (Copy Branch as Sibling, Copy Children to Siblings, Remove from this Tree, Delete Item)

\item {} 
\sphinxAtStartPar
August: Created installable python package

\end{itemize}


\subsection{2017}
\label{\detokenize{releases:id3}}\begin{itemize}
\item {} 
\sphinxAtStartPar
May: Implemented new field type \sphinxstyleemphasis{text}

\item {} 
\sphinxAtStartPar
June: Create deployable packages for Linux and Windows

\item {} 
\sphinxAtStartPar
June: Made \sphinxstylestrong{pre\sphinxhyphen{}release v0.0} available

\item {} 
\sphinxAtStartPar
October: Implemented new field type \sphinxstyleemphasis{node\sphinxhyphen{}path}, re\sphinxhyphen{}wrote the way nodes move to new parents

\item {} 
\sphinxAtStartPar
November: Uploaded package to pypi.python.org, \sphinxstyleemphasis{TreeTime} can now be installed using pip

\end{itemize}


\subsection{2018}
\label{\detokenize{releases:id4}}\begin{itemize}
\item {} 
\sphinxAtStartPar
October: Re\sphinxhyphen{}implemented the parent selection mechanism. The old cascaded menus have been replaced with single drop down lists.

\item {} 
\sphinxAtStartPar
October: Re\sphinxhyphen{}furbished the GUI and removed a couple of bugs. Slighty changed the data file format. Implemented theme selection. Tested pyqtdeploy for deployment instead of pyinstaller. Updated the description.

\item {} 
\sphinxAtStartPar
November: Released \sphinxstylestrong{version 2018\sphinxhyphen{}10}

\end{itemize}


\subsection{2019}
\label{\detokenize{releases:id5}}\begin{itemize}
\item {} 
\sphinxAtStartPar
January: Implemented new field type “URL”

\end{itemize}


\subsection{2020}
\label{\detokenize{releases:id6}}\begin{itemize}
\item {} 
\sphinxAtStartPar
June: Fixed problem with protected cells (typing into a cell without data could cause a crash), and fixed file selection dialog (now only offers .trt files).

\item {} 
\sphinxAtStartPar
July: Implemented text export \sphinxhyphen{} single branches or complete trees can now be exported to txt files.

\item {} 
\sphinxAtStartPar
August: Implemented time counters \sphinxhyphen{} nodes can record the time using a special field of type “timer” (experimental). GUI buttons can start and stop the stopwatch function.

\item {} 
\sphinxAtStartPar
September: Added move\sphinxhyphen{}to\sphinxhyphen{}top\sphinxhyphen{}level option for first level nodes

\item {} 
\sphinxAtStartPar
October: Added a dark and a light palette for GUI colours, selectable in addition to the theme selection.

\item {} 
\sphinxAtStartPar
November: Fixed too slow editing in text fields when tree files are big (\textgreater{}1.5 MB).

\end{itemize}


\subsection{2021}
\label{\detokenize{releases:id7}}\begin{itemize}
\item {} 
\sphinxAtStartPar
January: Released \sphinxstylestrong{version 2021.01}.

\item {} 
\sphinxAtStartPar
January: Bugfixing (timer crash)

\item {} 
\sphinxAtStartPar
February: Released \sphinxstylestrong{version 2021.2}.

\item {} 
\sphinxAtStartPar
March: New functions “Delete node” and “Remove node from tree” now move descendants one level up.
“Remove branch” removes the respective branch in all trees, “Delete branch” deletes a
branch, all child branches and inter\sphinxhyphen{}connections in all trees.

\item {} 
\sphinxAtStartPar
March: If a file with running timers is saved, those timers will be running when the file is loaded.

\item {} 
\sphinxAtStartPar
March: Added tooltips for main buttons

\item {} 
\sphinxAtStartPar
March: Implemented HTML export of branches and complete trees

\item {} 
\sphinxAtStartPar
March: Added auto\sphinxhyphen{}delete for orphans

\item {} 
\sphinxAtStartPar
March: Released \sphinxstylestrong{version 2021.3}

\item {} 
\sphinxAtStartPar
April: Added file option

\item {} 
\sphinxAtStartPar
April: Implemented four\sphinxhyphen{}column layout and rainbow colours for html export

\item {} 
\sphinxAtStartPar
April: Released \sphinxstylestrong{version 2021.4}

\item {} 
\sphinxAtStartPar
May: Improvement to html and txt export (changed colours, headings have no different sizes)

\item {} 
\sphinxAtStartPar
May: On export of both html and txt, user can now decide how many tree levels (depth) should be exported.

\item {} 
\sphinxAtStartPar
May: Released \sphinxstylestrong{version 2021.5}

\item {} 
\sphinxAtStartPar
July: Fixed broken application logo

\item {} 
\sphinxAtStartPar
July: Implemented CSV export

\item {} 
\sphinxAtStartPar
August: Released \sphinxstylestrong{version 2021.8}

\item {} 
\sphinxAtStartPar
September: Added new export option “Text to Clipboard”

\item {} 
\sphinxAtStartPar
November: Added new export option “Html (List) to File”

\item {} 
\sphinxAtStartPar
December: Added two primitive template files (a text\sphinxhyphen{}only single tree and dual tree mindmap)

\item {} 
\sphinxAtStartPar
December: Released \sphinxstylestrong{version 2021.9}

\end{itemize}


\subsection{2022}
\label{\detokenize{releases:id8}}\begin{itemize}
\item {} 
\sphinxAtStartPar
March: Fixed crash bug on non\sphinxhyphen{}export

\item {} 
\sphinxAtStartPar
March 2022: Improved sorting and grouping in html export, changed to five columns

\item {} 
\sphinxAtStartPar
June 2022: Added a tutorial file

\item {} 
\sphinxAtStartPar
June 2022: Added first\sphinxhyphen{}use dialog when no file is loaded, instead of the file\sphinxhyphen{}open dialog

\item {} 
\sphinxAtStartPar
June 2022: Released \sphinxstylestrong{version 2022.1}

\end{itemize}


\subsection{2023}
\label{\detokenize{releases:id9}}\begin{itemize}
\item {} 
\sphinxAtStartPar
February 2023: Added new tree field types “concatenation” and “set”.

\item {} 
\sphinxAtStartPar
February 2023: Implemented adjustable width for the data item and the tree table main view.

\item {} 
\sphinxAtStartPar
February 2023: Release \sphinxstylestrong{version 2023.1}

\item {} 
\sphinxAtStartPar
April 2023: Removed deprecated tree field (“concatenation”), fixed missing logo.

\item {} 
\sphinxAtStartPar
May 2023: Ported to PyQt 6.0

\item {} 
\sphinxAtStartPar
May 2023: Implemented auto\sphinxhyphen{}adjusting name column

\item {} 
\sphinxAtStartPar
June 2023: Created new default theme “Organic”, a mix between Fusion and Breeze

\item {} 
\sphinxAtStartPar
June 2023: Implemented display of tree field definitions and of data field definitions

\item {} 
\sphinxAtStartPar
July 2023: Release \sphinxstylestrong{version 2023.2}

\item {} 
\sphinxAtStartPar
October 2023: Fixed crash when exporting text to clipboard.

\end{itemize}


\subsection{2024}
\label{\detokenize{releases:id10}}\begin{itemize}
\item {} 
\sphinxAtStartPar
January 2024: Changed node symbol to small circle in text eport (after asking users on social media).

\item {} 
\sphinxAtStartPar
February 2024: Implemented min, max, min\sphinxhyphen{}string, max\sphinxhyphen{}string fields.

\item {} 
\sphinxAtStartPar
March 2024: Implemented longtext data field.

\item {} 
\sphinxAtStartPar
April 2024: Extended documentation on readthedocs.io. Release \sphinxstylestrong{version 2024.1}

\item {} 
\sphinxAtStartPar
April 2024: Restructured export area, added name\sphinxhyphen{}only export. Made all export options (full tree / branch / node with contect) (all fields / names only) available for all file formats and for both file and clipboard export.

\item {} 
\sphinxAtStartPar
April 2024: Release \sphinxstylestrong{version 2024.2}

\item {} 
\sphinxAtStartPar
Done March 2024: Implemented changeable font size (zoom) of data display

\item {} 
\sphinxAtStartPar
Done May 2024:  Implemented continuous text and html export

\item {} 
\sphinxAtStartPar
July 2024: Release \sphinxstylestrong{version 2024.3}

\item {} 
\sphinxAtStartPar
October 2024: Fixed crash bug and improved html output

\item {} 
\sphinxAtStartPar
November 2024: Improved colours in html output, implemented continuous change to export for textfields even if the focus stays in, fixed broken layout of html export

\item {} 
\sphinxAtStartPar
December 2024: Changed colours in html output (again?), increased font size

\item {} 
\sphinxAtStartPar
December 2024: Release \sphinxstylestrong{version 2024.4}

\end{itemize}


\subsection{2025}
\label{\detokenize{releases:id11}}\begin{itemize}
\item {} 
\sphinxAtStartPar
January 2025: Changed colours on html export to a seven\sphinxhyphen{}colour rainbow palette.

\item {} 
\sphinxAtStartPar
February 2025: Implemented PNG export

\item {} 
\sphinxAtStartPar
March 2025: Implemented SVG export

\item {} 
\sphinxAtStartPar
March 2025: Implemented HTML/Document export

\item {} 
\sphinxAtStartPar
April 2025: Improvements to image export.

\item {} 
\sphinxAtStartPar
April 2025: Release \sphinxstylestrong{version 2025.1}

\end{itemize}


\section{Present}
\label{\detokenize{releases:present}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Bugfixing

\item {} 
\sphinxAtStartPar
Extend documentation on readthedocs.io

\item {} 
\sphinxAtStartPar
Add more fields

\item {} 
\sphinxAtStartPar
Add more examples and more template data files

\item {} 
\sphinxAtStartPar
Structure editing/viewing in extra tab (editing the structure, number and definitions and trees and tree fields and data fields)

\end{itemize}


\section{Future}
\label{\detokenize{releases:future}}

\subsection{Near Future}
\label{\detokenize{releases:near-future}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Implement search function

\end{itemize}


\subsection{Mid Future}
\label{\detokenize{releases:mid-future}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Implement global functions (Linearise Tree, Level\sphinxhyphen{}Swap, Merge identical Siblings, Merge Identical Parents/Children)

\end{itemize}


\subsection{Far Future}
\label{\detokenize{releases:far-future}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Implement safe usage by multiple simultaneous users

\item {} 
\sphinxAtStartPar
Implement a database backend instead of text file storage

\item {} 
\sphinxAtStartPar
A whole lot of other fancy things that will probably never get done

\end{itemize}
\begin{itemize}
\item {} 
\sphinxAtStartPar
\DUrole{xref}{\DUrole{std}{\DUrole{std-ref}{genindex}}}

\item {} 
\sphinxAtStartPar
\DUrole{xref}{\DUrole{std}{\DUrole{std-ref}{modindex}}}

\item {} 
\sphinxAtStartPar
\DUrole{xref}{\DUrole{std}{\DUrole{std-ref}{search}}}

\end{itemize}



\renewcommand{\indexname}{Index}
\printindex
\end{document}