--- a/elog2labfolder/_build/latex/elog2labfolder.tex Mon Jun 04 13:54:51 2018 +0200
+++ b/elog2labfolder/_build/latex/elog2labfolder.tex Mon Jun 04 16:38:36 2018 +0200
@@ -55,7 +55,7 @@
\title{Labfolder at FHI Documentation}
-\date{Mar 27, 2018}
+\date{Jun 04, 2018}
\release{1.0}
\author{Stefan Weiher}
\newcommand{\sphinxlogo}{\vbox{}}
@@ -198,6 +198,218 @@
\end{sphinxVerbatim}
+\chapter{Groups, ownership and sharing in labfolder}
+\label{\detokenize{groups:groups-ownership-and-sharing-in-labfolder}}\label{\detokenize{groups::doc}}
+As labfolder user you can create groups (ultimately: group projects) and private projects. In \sphinxstyleemphasis{Manage \textgreater{} Projects} you see all projects that you own and that you are a member of.
+
+
+\section{Private projects}
+\label{\detokenize{groups:private-projects}}
+You alone are the owner of these projects in \sphinxstyleemphasis{My Private Projects}. Their ownership cannot be transfered from you to anyone else via the webinterface. Only via accepting the invitation to a group with the policy that private projects are not allowed the content of the former private project would be visible (and administrable) also to the group’s admin(s). By directly manipulating the database the ownership could be changed to an active user as well.
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{private_projects}.png}\hspace*{\fill}}
+
+\sphinxstylestrong{Private projects are possible through a back door} if a user creates their own group which doesn’t necessarily mean that they invite other users to this group. In their own group they could create as many (private) projects as they like.
+
+
+\section{Group projects}
+\label{\detokenize{groups:group-projects}}
+Any labfolder user can create groups and subgroups in \sphinxstyleemphasis{Manage \textgreater{} Groups \textgreater{} Button “+Add”}. But within an already existing group a member can only create subgroups if they are set as an administrator of this group. In the role of the admin you can do the following:
+\begin{itemize}
+\item {}
+Create (sub)groups
+
+\item {}
+Invite users to your (sub)group via e-mail
+
+\item {}
+Move users between subgroups
+
+\item {}
+Set and remove (sub)group members as admins
+
+\item {}
+Remove users from a (sub)group e.g. when they are leaving the institute (\sphinxstylestrong{In this case the ownership of this user’s projects within the (sub)group needs to be transfered first!})
+
+\item {}
+Delete (sub)groups (before deleting it you need to remove all group members)
+
+\end{itemize}
+
+
+\section{Group settings}
+\label{\detokenize{groups:group-settings}}
+Administrators of groups (but not the ones of the subgroups) can edit the general settings of groups.
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{group_settings}.png}\hspace*{\fill}}
+\begin{itemize}
+\item {}
+Through the option \sphinxstyleemphasis{Prevent group members from deleting content} all users (including the admin) are prevented from deleting projects or any other data from the labfolder database. Projects will merely be hidden if a user decides to \sphinxstyleemphasis{Remove} it from their list of projects.
+
+\item {}
+By checking the option \sphinxstyleemphasis{Prevent group members from having private projects}, group members will not be allowed to have private projects. All private projects of group members will be moved into the group projects, but will not be shared with any other group members.
+
+\item {}
+By switching on \sphinxstyleemphasis{Users can be members of several subgroups}, users which are already members of a group can be invited again to another subgroup within the group. If switched to off members cannot be invited to subgroups of their current group.
+
+\end{itemize}
+
+
+\chapter{Import and export of projects and entries}
+\label{\detokenize{import_export::doc}}\label{\detokenize{import_export:import-and-export-of-projects-and-entries}}
+
+\section{Import}
+\label{\detokenize{import_export:import}}
+The import of projects (from another labfolder instance or from another logbook software) is only possible via the labfolder API. An import of labfolder-own projects via webinterface is not possible to date. You can find the API documentation here:
+
+\begin{DUlineblock}{0em}
+\item[] Version 1: \sphinxurl{http://labfolder.rz-berlin.mpg.de:9091/api/v1}
+\item[] Version 2: \sphinxurl{https://labfolder.rz-berlin.mpg.de/api/v2/docs/development.html}
+\end{DUlineblock}
+
+Version 2 is still in the development phase.
+
+
+\section{Export}
+\label{\detokenize{import_export:export}}
+Exporting projects (or just single entries) is possible in three different formats: PDF, XHTML and JSON. The \sphinxstylestrong{export as PDF} can be done from within a project …
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{export_of_projects}.png}\hspace*{\fill}}
+
+… or from the project overview (\sphinxstyleemphasis{Manage \textgreater{} Projects}):
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{export_of_projects2}.png}\hspace*{\fill}}
+
+The \sphinxstylestrong{XHTML export} can be done via the settings:
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{export_xhtml}.png}\hspace*{\fill}}
+
+However, to use this type of export it has to be installed first in the \sphinxstyleemphasis{Manage \textgreater{} Apps} section. By means of the XHTML export all projects that one owns will be exported. A detailled selection of projects or entries to be exported is not possible. As soon as the export process is finished a download link appears in the settings in \sphinxstyleemphasis{Data exports}. The downloadable ZIP file contains all images and files along with an index.html file that contains information about all entries. You could open and view the index.html file in a browser similar to the view in labfolder.
+
+The \sphinxstylestrong{JSON export} is only useable via the API endpoint \sphinxcode{GET /entries}. However, at the moment the response only contains useful information such as dates and tags. The author name is hidden behind the author ID and the entry text content is completely missing.
+
+
+\chapter{Importing projects from e.g. the ELOGbook to Labfolder at the FHI}
+\label{\detokenize{importing_from_elog:importing-projects-from-e-g-the-elogbook-to-labfolder-at-the-fhi}}\label{\detokenize{importing_from_elog::doc}}
+This is how you generally do it:
+
+\fvset{hllines={, ,}}%
+\begin{sphinxVerbatim}[commandchars=\\\{\}]
+\PYG{l+m+mf}{1.} \PYG{n}{In} \PYG{n}{labfolder}\PYG{p}{,} \PYG{n}{create} \PYG{n}{a} \PYG{n}{new} \PYG{n}{group} \PYG{n}{project}\PYG{o}{.}
+\PYG{l+m+mf}{2.} \PYG{n}{Get} \PYG{n}{the} \PYG{n}{ELOG} \PYG{n}{logbook} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{operating}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o+ow}{and} \PYG{n}{export} \PYG{n}{it} \PYG{k}{as} \PYG{n}{RAW}\PYG{o}{.} \PYG{n}{Remember} \PYG{n}{where} \PYG{n}{you}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ve put the text file with the raw output and the directory with attachments files.}
+\PYG{l+m+mf}{3.} \PYG{n}{Only} \PYG{n}{once}\PYG{p}{:} \PYG{n}{Get} \PYG{n}{the} \PYG{n}{elog2labfolder} \PYG{n}{repository} \PYG{k+kn}{from} \PYG{n+nn}{github}\PYG{n+nn}{.}
+\PYG{l+m+mf}{4.} \PYG{n}{Adapt} \PYG{n}{elog2labfolder}\PYG{o}{.}\PYG{n}{py} \PYG{n}{to} \PYG{n}{your} \PYG{n}{needs}\PYG{o}{.} \PYG{n}{Specify} \PYG{n}{the} \PYG{n}{name} \PYG{n}{of} \PYG{n}{the} \PYG{n}{project} \PYG{n}{that} \PYG{n}{you} \PYG{n}{created} \PYG{n}{previously}\PYG{o}{.}
+\PYG{l+m+mf}{4.} \PYG{n}{Run} \PYG{n}{elog2labfolder}\PYG{o}{.}\PYG{n}{py}
+\end{sphinxVerbatim}
+
+These steps are explained in more detail in the following.
+
+
+\section{Creating a group project}
+\label{\detokenize{importing_from_elog:creating-a-group-project}}
+As the group admin (or one of the admins) in labfolder create a group project, for example, “operating” in a group named “FEL”. You are now the owner of this project. Make sure you don’t have several projects of the same name in one group.
+
+
+\section{Entries from ELOG}
+\label{\detokenize{importing_from_elog:entries-from-elog}}
+The ELOG entries of a certain project need to be exported as \sphinxstyleemphasis{Raw} which looks like this:
+
+\fvset{hllines={, ,}}%
+\begin{sphinxVerbatim}[commandchars=\\\{\}]
+\PYGZdl{}@MID@\PYGZdl{}: 12
+Date: Tue, 03 Dec 2013 12:15:14 +0100
+Author: Wieland SchÃ\P{}llkopf
+Author Email: mailto:wschoell@fhi\PYGZhy{}berlin.mpg.de
+Category: Shift summary
+Subject: 1st solid\PYGZhy{}state experiment with FHI FEL
+Severity: DOCU
+Keywords:
+Record date: 1386069171
+Attachment:
+Encoding: HTML
+========================================
+\PYGZlt{}p\PYGZgt{}Today Alex Paarmann and Marc Herzog are measuring in the wavelength range from 10 to 20 micron with a 0.5 mm thick GGG (Gadolinium Gallium Garnet, \PYGZlt{}a title=\PYGZdq{}Gadolinium\PYGZdq{} href=\PYGZdq{}http://en.wikipedia.org/wiki/Gadolinium\PYGZdq{}\PYGZgt{}Gd\PYGZlt{}/a\PYGZgt{}\PYGZlt{}sub\PYGZgt{}3\PYGZlt{}/sub\PYGZgt{}\PYGZlt{}a title=\PYGZdq{}Gallium\PYGZdq{} href=\PYGZdq{}http://en.wikipedia.org/wiki/Gallium\PYGZdq{}\PYGZgt{}Ga\PYGZlt{}/a\PYGZgt{}\PYGZlt{}sub\PYGZgt{}5\PYGZlt{}/sub\PYGZgt{}\PYGZlt{}a title=\PYGZdq{}Oxygen\PYGZdq{} href=\PYGZdq{}http://en.wikipedia.org/wiki/Oxygen\PYGZdq{}\PYGZgt{}O\PYGZlt{}/a\PYGZgt{}\PYGZlt{}sub\PYGZgt{}12\PYGZlt{}/sub\PYGZgt{}). Electron energy is set to 26 MeV.\PYGZlt{}/p\PYGZgt{}
+\end{sphinxVerbatim}
+
+The entry shown above looks like this in the ELOG webinterface:
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=1.000\linewidth]{{elog_entry}.png}\hspace*{\fill}}
+
+What is noticeable is that the ELOG export comes with an “Ã\P{}” instead of an “ö”. Interestingly, if only entries done by Wieland are exported the export file has UTF-8 encoding which can actually print German “Umlaute” (ö, ä, ü). If, however, all entries are exported the encoding changes to an encoding that cannot handle e.g. “ö”.
+
+After importing the above ELOG entry into labfolder this entry appears like that:
+
+\noindent{\hspace*{\fill}\sphinxincludegraphics[width=1.000\linewidth]{{entry_after_import}.png}\hspace*{\fill}}
+
+
+\section{Using python to import from ELOG to labfolder}
+\label{\detokenize{importing_from_elog:using-python-to-import-from-elog-to-labfolder}}
+There is a GitHub project containing a python program for importing a raw (see the export example above) ELOG project. Get the project files by typing:
+
+\fvset{hllines={, ,}}%
+\begin{sphinxVerbatim}[commandchars=\\\{\}]
+\PYGZdl{} git clone https://github.molgen.mpg.de/weiher/elog2labfolder.git
+\end{sphinxVerbatim}
+
+The script \sphinxstyleemphasis{elog2labfolder.py} is meant to be executed from remote, that is, not on the machine on which labfolder is running. A prerequisit is the python MySQLDB package because for a few methods the labfolder API cannot be used, instead, direct manipulation of the labfolder MySQL database is needed. The actual labfolder API is applied in the methodes collected in \sphinxstyleemphasis{myPythonAPIv1.py} and \sphinxstyleemphasis{myPythonAPIv2.py}. Mostly, API version 2 is used but adding text at the end of an entry can only be accomplished by using the version 1 API call. \sphinxstyleemphasis{getListOfAuthors.py} gives you a list of all authors that are mentioned in a raw ELOG export file.
+
+To finally import an ELOG logbook to a labfolder project you need to run \sphinxcode{\$ python elog2labfolder.py}. Prior to this you need to make some changes to the header of the file, that is, these lines:
+
+\fvset{hllines={, ,}}%
+\begin{sphinxVerbatim}[commandchars=\\\{\}]
+\PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} Set the hostname}
+\PYG{c+c1}{\PYGZsh{}hostname = \PYGZsq{}lftest\PYGZsq{}}
+\PYG{n}{hostname} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{labfolder}\PYG{l+s+s1}{\PYGZsq{}}
+
+\PYG{k}{if} \PYG{n}{hostname} \PYG{o}{==} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lftest}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:}
+ \PYG{n}{server} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{http://}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{+} \PYG{n}{hostname} \PYG{o}{+} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{.rz\PYGZhy{}berlin.mpg.de:9091}\PYG{l+s+s1}{\PYGZsq{}}
+\PYG{k}{elif} \PYG{n}{hostname} \PYG{o}{==} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{labfolder}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:}
+ \PYG{n}{server} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{https://}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{+} \PYG{n}{hostname} \PYG{o}{+} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{.rz\PYGZhy{}berlin.mpg.de:9091}\PYG{l+s+s1}{\PYGZsq{}}
+
+\PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} The entries will be created using the following labfolder account which specifies the author of the entry. During the creation process, however, the entry\PYGZsq{}s author ID will be changed to the real author\PYGZsq{}s ID if the real author is already contained in the user table of the labfolder DB.}
+\PYG{n}{email} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{weiher@fhi\PYGZhy{}berlin.mpg.de}\PYG{l+s+s1}{\PYGZsq{}}
+\PYG{n}{password} \PYG{o}{=} \PYG{n}{getpass}\PYG{o}{.}\PYG{n}{getpass}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Enter the labfolder password associated with }\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{+} \PYG{n}{emailAddress}\PYG{o}{+}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{: }\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}
+
+\PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} Specify the absolute path to the raw ELOG export file.}
+\PYG{n}{elogExportFile} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{/home/stefan/Dokumente/labfolder/OperatingLogbook\PYGZus{}exportRaw\PYGZus{}ORIGINAL.txt}\PYG{l+s+s1}{\PYGZsq{}}
+
+\PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} Full path to where the attachments of the logbook to be imported are stored:}
+\PYG{n}{attachmentsDirectory} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{/home/stefan/Dokumente/labfolder/Operating/}\PYG{l+s+s1}{\PYGZsq{}}
+
+\PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} Project name in labfolder}
+\PYG{n}{projectName} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{operating}\PYG{l+s+s1}{\PYGZsq{}}
+\end{sphinxVerbatim}
+
+
+\section{Alternatives to manipulating the labfolder DB on MySQL level}
+\label{\detokenize{importing_from_elog:alternatives-to-manipulating-the-labfolder-db-on-mysql-level}}
+As mentioned previously: a few methods in the python API use a direct manipulation of the labfolder DB via MySQL queries. These methods are:
+\begin{itemize}
+\item {}
+\sphinxstyleemphasis{createUserAccount(email, author, entryContent, verboseOutput, cursor, db)}: If an author of an ELOG logbook entry does not yet have a labolder account this account is created on the fly by setting a default (encrypted) password. This password is irrelevant because labfolder checks the entered password with the one from the LDAP server. Note: when setting a password in the DB labfolder’s LDAP authentication needs to be disabled (FEATURE\_LDAP\_AUTHENTICATION=false) beforehand and enabled again after the setting process is finished.
+
+\item {}
+\sphinxstyleemphasis{updateAuthor(userID, blockID, cursor, db)}: Update the author of an entry. With the script \sphinxstyleemphasis{elog2labfolder.py} an entry is created with the author that is the person whose labfolder credentials are used to get the login token. Via this method the true author can be set to the passed in \sphinxstyleemphasis{userID}.
+
+\item {}
+\sphinxstyleemphasis{updateDateAndTime(date, blockID, cursor, db)}: Similar to \sphinxstyleemphasis{updateAuthor()} this method sets the creation and modification date to the creation time and date of the entry to be imported. This is necessary because otherwise creation and modification date in labfolder are the time and date when the import took place.
+
+\end{itemize}
+
+The labfolder support suggested the following alternative involving using the labfolder API:
+\begin{itemize}
+\item {}
+User account: A user account can be created via the API 2 endpoint \sphinxcode{/auth/signup}. The password will be an encrypted dummy password. In order for this to work the LDAP authentication must be turned off when this endpoint is called. After the account creation LDAP authentication should be turned on again. Once the true user of this account logs in labfolder will ignore the dummy password and check the entered password against the password stored in LDAP.
+
+\item {}
+Author: To create a labfolder entry by using the original entry’s author needs a special work-around. \sphinxstylestrong{First, make sure to prevent labfolder users from accessing labfolder for the time of the import.} Then, manually change all user passwords in the DB to the same (encrypted) password. Switch off the LDAP authentication and restart labolder. Now, import entry by entry and get a new login token for each new entry. It is only possible to get login tokens for all users because they all have the same known password. If the author of the entry to be imported does not exist yet in the DB you need to create an account via the API 2 endpoint \sphinxcode{/auth/signup}. Now you reopen the access to the labfolder instance and switch on LDAP again restarting labfolder afterwards. The users can login using their FHI credentials no matter the “universal” password in the DB. If LDAP authentication is not turned on the users could do a password recovery on the login screen and re-set their password to their liking.
+
+\item {}
+Date and time: Since you cannot change creation and modification time stamp of an entry via the API you could instead create custom dates during the import of an entry. The original entry creation timestamp could be “Original entry creation” followed by the creation time and date of the import. All entries can be filtered and searched by the custom dates.
+
+\end{itemize}
+
+
\chapter{Printing via CUPS and attaching files to labfolder logbooks}
\label{\detokenize{installation_cups:printing-via-cups-and-attaching-files-to-labfolder-logbooks}}\label{\detokenize{installation_cups::doc}}
Follow this guide to set up CUPS virtual printers to be able to print webpages and pictures/files (PDF, PNG, JPG, PS) to one of labfolder’s logbooks, thus, creating a new entry with an attachment. If you are an admin of the labfolder VM read the section {\hyperref[\detokenize{installation_cups:section-cups-admin}]{\sphinxcrossref{\DUrole{std,std-ref}{Set up CUPS as labfolder admin}}}}. Users of labfolder read the section {\hyperref[\detokenize{installation_cups:section-cups-user}]{\sphinxcrossref{\DUrole{std,std-ref}{Printing to labfolder projects}}}}.
@@ -335,10 +547,12 @@
mysql\PYGZgt{} INSERT INTO user (email, password, firstname, lastname, signupTimestamp, maxStorage) VALUES (\PYGZsq{}printer@fhi\PYGZhy{}berlin.mpg.de\PYGZsq{}, \PYGZsq{}91a13f2aba4a35b00c35dfacadd1d75f4a5171dfa7a465fca9c40e6b007ce982\PYGZsq{}, \PYGZsq{}Printer\PYGZsq{}, \PYGZsq{}Print\PYGZsq{}, \PYGZsq{}2018\PYGZhy{}03\PYGZhy{}21 10:54:00\PYGZsq{}, \PYGZsq{}10000000\PYGZsq{});
\end{sphinxVerbatim}
+Das Passwort steht für “test1234”. Der entsprechende Hash-Wert im MySQL-Kommando wurde von Florian Hauer (labfolder) erstellt.
+
\section{Printing to labfolder projects}
\label{\detokenize{installation_cups:printing-to-labfolder-projects}}\label{\detokenize{installation_cups:section-cups-user}}
-The last thing you need to do is to set up a printer \sphinxstyleemphasis{operating} on your local machine. In Ubuntu Gnome hit Alt+F2 keys and enter \sphinxcode{system-config-printer}. In this printer config interface add a new printer \sphinxstyleemphasis{operating} as follows:
+The last thing you need to do is to set up a printer, for example, \sphinxstyleemphasis{operating} on your local machine. In Ubuntu Gnome hit Alt+F2 keys and enter \sphinxcode{system-config-printer}. In this printer config interface add a new printer \sphinxstyleemphasis{operating} as follows:
\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{create_local_printer01}.png}\hspace*{\fill}}
@@ -354,169 +568,7 @@
\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{create_local_printer07}.png}\hspace*{\fill}}
-
-\chapter{Groups, ownership and sharing in labfolder}
-\label{\detokenize{groups:groups-ownership-and-sharing-in-labfolder}}\label{\detokenize{groups::doc}}
-As labfolder user you can create groups (ultimately: group projects) and private projects. In \sphinxstyleemphasis{Manage \textgreater{} Projects} you see all projects that you own and that you are a member of.
-
-
-\section{Private projects}
-\label{\detokenize{groups:private-projects}}
-You alone are the owner of these projects in \sphinxstyleemphasis{My Private Projects}. Their ownership cannot be transfered from you to anyone else via the webinterface. Only via accepting the invitation to a group with the policy that private projects are not allowed the content of the former private project would be visible (and administrable) also to the group’s admin(s). By directly manipulating the database the ownership could be changed to an active user as well.
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{private_projects}.png}\hspace*{\fill}}
-
-\sphinxstylestrong{Private projects are possible through a back door} if a user creates their own group which doesn’t necessarily mean that they invite other users to this group. In their own group they could create as many (private) projects as they like.
-
-
-\section{Group projects}
-\label{\detokenize{groups:group-projects}}
-Any labfolder user can create groups and subgroups in \sphinxstyleemphasis{Manage \textgreater{} Groups \textgreater{} Button “+Add”}. But within an already existing group a member can only create subgroups if they are set as an administrator of this group. In the role of the admin you can do the following:
-\begin{itemize}
-\item {}
-Create (sub)groups
-
-\item {}
-Invite users to your (sub)group via e-mail
-
-\item {}
-Move users between subgroups
-
-\item {}
-Set and remove (sub)group members as admins
-
-\item {}
-Remove users from a (sub)group e.g. when they are leaving the institute (\sphinxstylestrong{In this case the ownership of this user’s projects within the (sub)group needs to be transfered first!})
-
-\item {}
-Delete (sub)groups (before deleting it you need to remove all group members)
-
-\end{itemize}
-
-
-\section{Group settings}
-\label{\detokenize{groups:group-settings}}
-Administrators of groups (but not the ones of the subgroups) can edit the general settings of groups.
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{group_settings}.png}\hspace*{\fill}}
-\begin{itemize}
-\item {}
-Through the option \sphinxstyleemphasis{Prevent group members from deleting content} all users (including the admin) are prevented from deleting projects or any other data from the labfolder database. Projects will merely be hidden if a user decides to \sphinxstyleemphasis{Remove} it from their list of projects.
-
-\item {}
-By checking the option \sphinxstyleemphasis{Prevent group members from having private projects}, group members will not be allowed to have private projects. All private projects of group members will be moved into the group projects, but will not be shared with any other group members.
-
-\item {}
-By switching on \sphinxstyleemphasis{Users can be members of several subgroups}, users which are already members of a group can be invited again to another subgroup within the group. If switched to off members cannot be invited to subgroups of their current group.
-
-\end{itemize}
-
-
-\chapter{Import and export of projects and entries}
-\label{\detokenize{import_export::doc}}\label{\detokenize{import_export:import-and-export-of-projects-and-entries}}
-
-\section{Import}
-\label{\detokenize{import_export:import}}
-The import of projects (from another labfolder instance or from another logbook software) is only possible via the labfolder API. An import of labfolder-own projects via webinterface is not possible to date. You can find the API documentation here:
-
-\begin{DUlineblock}{0em}
-\item[] Version 1: \sphinxurl{http://labfolder.rz-berlin.mpg.de:9091/api/v1}
-\item[] Version 2: \sphinxurl{https://labfolder.rz-berlin.mpg.de/api/v2/docs/development.html}
-\end{DUlineblock}
-
-Version 2 is still in the development phase.
-
-
-\section{Export}
-\label{\detokenize{import_export:export}}
-Exporting projects (or just single entries) is possible in three different formats: PDF, XHTML and JSON. The \sphinxstylestrong{export as PDF} can be done from within a project …
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{export_of_projects}.png}\hspace*{\fill}}
-
-… or from the project overview (\sphinxstyleemphasis{Manage \textgreater{} Projects}):
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{export_of_projects2}.png}\hspace*{\fill}}
-
-The \sphinxstylestrong{XHTML export} can be done via the settings:
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=0.700\linewidth]{{export_xhtml}.png}\hspace*{\fill}}
-
-However, to use this type of export it has to be installed first in the \sphinxstyleemphasis{Manage \textgreater{} Apps} section. By means of the XHTML export all projects that one owns will be exported. A detailled selection of projects or entries to be exported is not possible. As soon as the export process is finished a download link appears in the settings in \sphinxstyleemphasis{Data exports}. The downloadable ZIP file contains all images and files along with an index.html file that contains information about all entries. You could open and view the index.html file in a browser similar to the view in labfolder.
-
-The \sphinxstylestrong{JSON export} is only useable via the API endpoint \sphinxcode{GET /entries}. However, at the moment the response only contains useful information such as dates and tags. The author name is hidden behind the author ID and the entry text content is completely missing.
-
-
-\chapter{Importing projects from e.g. the ELOGbook to Labfolder at the FHI}
-\label{\detokenize{importing_from_elog:importing-projects-from-e-g-the-elogbook-to-labfolder-at-the-fhi}}\label{\detokenize{importing_from_elog::doc}}
-The ELOG entries of a certain project need to be exported as \sphinxstyleemphasis{Raw} which looks like this:
-
-\fvset{hllines={, ,}}%
-\begin{sphinxVerbatim}[commandchars=\\\{\}]
-\PYGZdl{}@MID@\PYGZdl{}: 12
-Date: Tue, 03 Dec 2013 12:15:14 +0100
-Author: Wieland SchÃ\P{}llkopf
-Author Email: mailto:wschoell@fhi\PYGZhy{}berlin.mpg.de
-Category: Shift summary
-Subject: 1st solid\PYGZhy{}state experiment with FHI FEL
-Severity: DOCU
-Keywords:
-Record date: 1386069171
-Attachment:
-Encoding: HTML
-========================================
-\PYGZlt{}p\PYGZgt{}Today Alex Paarmann and Marc Herzog are measuring in the wavelength range from 10 to 20 micron with a 0.5 mm thick GGG (Gadolinium Gallium Garnet, \PYGZlt{}a title=\PYGZdq{}Gadolinium\PYGZdq{} href=\PYGZdq{}http://en.wikipedia.org/wiki/Gadolinium\PYGZdq{}\PYGZgt{}Gd\PYGZlt{}/a\PYGZgt{}\PYGZlt{}sub\PYGZgt{}3\PYGZlt{}/sub\PYGZgt{}\PYGZlt{}a title=\PYGZdq{}Gallium\PYGZdq{} href=\PYGZdq{}http://en.wikipedia.org/wiki/Gallium\PYGZdq{}\PYGZgt{}Ga\PYGZlt{}/a\PYGZgt{}\PYGZlt{}sub\PYGZgt{}5\PYGZlt{}/sub\PYGZgt{}\PYGZlt{}a title=\PYGZdq{}Oxygen\PYGZdq{} href=\PYGZdq{}http://en.wikipedia.org/wiki/Oxygen\PYGZdq{}\PYGZgt{}O\PYGZlt{}/a\PYGZgt{}\PYGZlt{}sub\PYGZgt{}12\PYGZlt{}/sub\PYGZgt{}). Electron energy is set to 26 MeV.\PYGZlt{}/p\PYGZgt{}
-\end{sphinxVerbatim}
-
-The entry shown above looks like this in the ELOG webinterface:
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=1.000\linewidth]{{elog_entry}.png}\hspace*{\fill}}
-
-What is noticeable is that the ELOG export comes with an “Ã\P{}” instead of an “ö”. Interestingly, if only entries done by Wieland are exported the export file has UTF-8 encoding which can actually print German “Umlaute” (ö, ä, ü). If, however, all entries are exported the encoding changes to an encoding that cannot handle e.g. “ö”.
-
-After importing the above ELOG entry into labfolder this entry appears like that:
-
-\noindent{\hspace*{\fill}\sphinxincludegraphics[width=1.000\linewidth]{{entry_after_import}.png}\hspace*{\fill}}
-
-
-\section{Using python to import from ELOG to labfolder}
-\label{\detokenize{importing_from_elog:using-python-to-import-from-elog-to-labfolder}}
-There is a GitHub project containing a python program for importing a raw (see the export example above) ELOG project. Get the project files by typing:
-
-\fvset{hllines={, ,}}%
-\begin{sphinxVerbatim}[commandchars=\\\{\}]
-\PYGZdl{} git clone https://github.molgen.mpg.de/weiher/elog2labfolder.git
-\end{sphinxVerbatim}
-
-The script \sphinxstyleemphasis{elog2labfolder.py} is meant to be executed from remote, that is, not on the machine on which labfolder is running. A prerequisit is the python MySQLDB package because for a few methods the labfolder API cannot be used, instead, direct manipulation of the labfolder MySQL database is needed. The actual labfolder API is applied in the methodes collected in \sphinxstyleemphasis{myPythonAPIv1.py} and \sphinxstyleemphasis{myPythonAPIv2.py}. Mostly, API version 2 is used but adding text at the end of an entry can only be accomplished by using the version 1 API call. \sphinxstyleemphasis{getListOfAuthors.py} gives you a list of all authors that are mentioned in a raw ELOG export file.
-
-
-\section{Alternatives to manipulating the labfolder DB on MySQL level}
-\label{\detokenize{importing_from_elog:alternatives-to-manipulating-the-labfolder-db-on-mysql-level}}
-As mentioned previously: a few methods in the python API use a direct manipulation of the labfolder DB via MySQL queries. These methods are:
-\begin{itemize}
-\item {}
-\sphinxstyleemphasis{createUserAccount(email, author, entryContent, verboseOutput, cursor, db)}: If an author of an ELOG logbook entry does not yet have a labolder account this account is created on the fly by setting a default (encrypted) password. This password is irrelevant because labfolder checks the entered password with the one from the LDAP server. Note: when setting a password in the DB labfolder’s LDAP authentication needs to be disabled (FEATURE\_LDAP\_AUTHENTICATION=false) beforehand and enabled again after the setting process is finished.
-
-\item {}
-\sphinxstyleemphasis{updateAuthor(userID, blockID, cursor, db)}: Update the author of an entry. With the script \sphinxstyleemphasis{elog2labfolder.py} an entry is created with the author that is the person whose labfolder credentials are used to get the login token. Via this method the true author can be set to the passed in \sphinxstyleemphasis{userID}.
-
-\item {}
-\sphinxstyleemphasis{updateDateAndTime(date, blockID, cursor, db)}: Similar to \sphinxstyleemphasis{updateAuthor()} this method sets the creation and modification date to the creation time and date of the entry to be imported. This is necessary because otherwise creation and modification date in labfolder are the time and date when the import took place.
-
-\end{itemize}
-
-The labfolder support suggested the following alternative involving using the labfolder API:
-\begin{itemize}
-\item {}
-User account: A user account can be created via the API 2 endpoint \sphinxcode{/auth/signup}. The password will be an encrypted dummy password. In order for this to work the LDAP authentication must be turned off when this endpoint is called. After the account creation LDAP authentication should be turned on again. Once the true user of this account logs in labfolder will ignore the dummy password and check the entered password against the password stored in LDAP.
-
-\item {}
-Author: To create a labfolder entry by using the original entry’s author needs a special work-around. \sphinxstylestrong{First, make sure to prevent labfolder users from accessing labfolder for the time of the import.} Then, manually change all user passwords in the DB to the same (encrypted) password. Switch off the LDAP authentication and restart labolder. Now, import entry by entry and get a new login token for each new entry. It is only possible to get login tokens for all users because they all have the same known password. If the author of the entry to be imported does not exist yet in the DB you need to create an account via the API 2 endpoint \sphinxcode{/auth/signup}. Now you reopen the access to the labfolder instance and switch on LDAP again restarting labfolder afterwards. The users can login using their FHI credentials no matter the “universal” password in the DB. If LDAP authentication is not turned on the users could do a password recovery on the login screen and re-set their password to their liking.
-
-\item {}
-Date and time: Since you cannot change creation and modification time stamp of an entry via the API you could instead create custom dates during the import of an entry. The original entry creation timestamp could be “Original entry creation” followed by the creation time and date of the import. All entries can be filtered and searched by the custom dates.
-
-\end{itemize}
+Now, just select this printer when printing a webpage or a picture to a labfolder project.