comparison docs/Instructions/Instructions.tex @ 2264:556b79c72eee

Change folder name 'scripts' to 'python'
author Brecht De Man <b.deman@qmul.ac.uk>
date Wed, 20 Apr 2016 16:33:22 +0200
parents b74f14c955d7
children ad2e070c92e5
comparison
equal deleted inserted replaced
2262:5bf0555905de 2264:556b79c72eee
100 \item \texttt{keygen.php}: generates a unique file name for saved results 100 \item \texttt{keygen.php}: generates a unique file name for saved results
101 \item \texttt{pseudo.php}: allows for pseudo-random selection from a range of configuration XML files 101 \item \texttt{pseudo.php}: allows for pseudo-random selection from a range of configuration XML files
102 \item \texttt{save.php}: PHP script to store result XML files to web server 102 \item \texttt{save.php}: PHP script to store result XML files to web server
103 \item PHP analysis scripts % ELABORATE 103 \item PHP analysis scripts % ELABORATE
104 \end{itemize} 104 \end{itemize}
105 \textbf{Python scripts (\texttt{./python/})}
106 \begin{itemize}
107 \item Helpful Python and PHP scripts for extraction and visualisation of data.\\
108 \end{itemize}
105 \textbf{Output files (\texttt{./saves/})} 109 \textbf{Output files (\texttt{./saves/})}
106 \begin{itemize} 110 \begin{itemize}
107 \item The output XML files of tests will be stored here by default by the \texttt{pythonServer.py} script.\\ 111 \item The output XML files of tests will be stored here by default by the \texttt{pythonServer.py} script.\\
108 \end{itemize}
109 \textbf{Auxiliary scripts (\texttt{./scripts/})}
110 \begin{itemize}
111 \item Helpful Python and PHP scripts for extraction and visualisation of data.\\
112 \end{itemize} 112 \end{itemize}
113 \textbf{Test creation tool (\texttt{./test\_create/})} 113 \textbf{Test creation tool (\texttt{./test\_create/})}
114 \begin{itemize} 114 \begin{itemize}
115 \item Webpage for easily setting up your own test without having to delve into the XML.\\ 115 \item Webpage for easily setting up your own test without having to delve into the XML.\\
116 \end{itemize} 116 \end{itemize}
147 \item Download the tool (see Section~\ref{sec:installation}) 147 \item Download the tool (see Section~\ref{sec:installation})
148 \item Copy the tool to a PHP-enabled web server if you have access to one. 148 \item Copy the tool to a PHP-enabled web server if you have access to one.
149 \item Go to \path{test_create.html} and configure your test. 149 \item Go to \path{test_create.html} and configure your test.
150 \item Save your test file in the folder \path{.\tests\}. 150 \item Save your test file in the folder \path{.\tests\}.
151 \item Your test will be live at \path{[web server address]/index.html?url=tests/[testname].xml}. If you are not using a web server, you can simulate one locally by running 151 \item Your test will be live at \path{[web server address]/index.html?url=tests/[testname].xml}. If you are not using a web server, you can simulate one locally by running
152 \path{scripts/pythonServer.py} (requires Python), after which you can access the test at \\ % hack 152 \path{python/pythonServer.py} (requires Python), after which you can access the test at \\ % hack
153 \path{http://localhost:8000/index.html?url=tests/[testname].xml} 153 \path{http://localhost:8000/index.html?url=tests/[testname].xml}
154 \end{itemize} 154 \end{itemize}
155 155
156 \clearpage 156 \clearpage
157 157
192 192
193 \texttt{cd /Users/John/Documents/WebAudioEvaluationToolbox/} 193 \texttt{cd /Users/John/Documents/WebAudioEvaluationToolbox/}
194 194
195 Then hit enter and run the Python script by typing 195 Then hit enter and run the Python script by typing
196 196
197 \texttt{python scripts/pythonServer.py} 197 \texttt{python python/pythonServer.py}
198 198
199 and hit enter again. See also Figure \ref{fig:terminal}. 199 and hit enter again. See also Figure \ref{fig:terminal}.
200 200
201 \begin{figure}[htbp] 201 \begin{figure}[htbp]
202 \begin{center} 202 \begin{center}
726 \section{Analysis and diagnostics} 726 \section{Analysis and diagnostics}
727 \subsection{In the browser} 727 \subsection{In the browser}
728 See `analysis.html' in the main folder: immediate visualisation of (by default) all results in the `saves/' folder. 728 See `analysis.html' in the main folder: immediate visualisation of (by default) all results in the `saves/' folder.
729 729
730 \subsection{Python scripts} 730 \subsection{Python scripts}
731 The package includes Python (2.7) scripts (in `scripts/') to extract ratings and comments, generate visualisations of ratings and timelines, and produce a fully fledged report. 731 The package includes Python (2.7) scripts (in `python/') to extract ratings and comments, generate visualisations of ratings and timelines, and produce a fully fledged report.
732 732
733 Visualisation requires the free matplotlib toolbox (http://matplotlib.org), numpy and scipy. 733 Visualisation requires the free matplotlib toolbox (http://matplotlib.org), numpy and scipy.
734 By default, the scripts can be run from the `scripts' folder, with the result files in the `saves' folder (the default location where result XMLs are stored). Each script takes the XML file folder as an argument, along with other arguments in some cases. 734 By default, the scripts can be run from the `python' folder, with the result files in the `saves' folder (the default location where result XMLs are stored). Each script takes the XML file folder as an argument, along with other arguments in some cases.
735 Note: to avoid all kinds of problems, please avoid using spaces in file and folder names (this may work on some systems, but others don't like it). 735 Note: to avoid all kinds of problems, please avoid using spaces in file and folder names (this may work on some systems, but others don't like it).
736 736
737 \subsubsection{comment\_parser.py} 737 \subsubsection{comment\_parser.py}
738 Extracts comments from the output XML files corresponding with the different subjects found in `saves/'. It creates a folder per `audioholder'/page it finds, and stores a CSV file with comments for every `audioelement'/fragment within these respective `audioholders'/pages. In this CSV file, every line corresponds with a subject/output XML file. Depending on the settings, the first column containing the name of the corresponding XML file can be omitted (for anonymisation). 738 Extracts comments from the output XML files corresponding with the different subjects found in `saves/'. It creates a folder per `audioholder'/page it finds, and stores a CSV file with comments for every `audioelement'/fragment within these respective `audioholders'/pages. In this CSV file, every line corresponds with a subject/output XML file. Depending on the settings, the first column containing the name of the corresponding XML file can be omitted (for anonymisation).
739 Beware of Excel: sometimes the UTF-8 is not properly imported, leading to problems with special characters in the comments (particularly cumbersome for foreign languages). 739 Beware of Excel: sometimes the UTF-8 is not properly imported, leading to problems with special characters in the comments (particularly cumbersome for foreign languages).