Skip to content
Snippets Groups Projects
Commit fbd62d8b authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

DOC: added a section about the converters to the documentation

parent 91c181ee
No related branches found
No related tags found
2 merge requests!53Release 0.1,!42F doc
...@@ -72,17 +72,12 @@ converter-name: ...@@ -72,17 +72,12 @@ converter-name:
- Experiment - Experiment
- Blablabla - Blablabla
date: $DATUM date: $DATUM
<...> (...)
Experiment2: Experiment2:
parents: parents:
- Experiment - Experiment
valuegenerators:
datepattern:
<...>
childrengenerators:
create_children_from_directory:
sort-by-date: true
subtree: subtree:
(...)
records: records:
...@@ -134,6 +129,94 @@ valuegenerators shall be defined, the keyword may be omitted. ...@@ -134,6 +129,94 @@ valuegenerators shall be defined, the keyword may be omitted.
Relevant sources in: Relevant sources in:
src/converters.py src/converters.py
Standard Converters
+++++++++++++++++++
Directory Converter
====================
Simple File Converter
====================
Markdown File Converter
====================
Dict Converter
====================
Typical Subtree converters
---------------
DictBooleanElementConverter
DictFloatElementConverter
DictTextElementConverter
DictIntegerElementConverter
DictListElementConverter
DictDictElementConverter
YAMLFileConverter
=================
A specialized Dict Converter for yaml files: Yaml files are opened and the contents are
converted into dictionaries that can be further converted using the typical subtree converters
of dict converter.
**WARNING**: Currently unfinished implementation.
JSONFileConverter
=================
TextElementConverter
TableConverter
=================
A generic converter (abstract) for files containing tables.
Currently, there are two specialized implementations for xlsx-files and csv-files.
All table converters generate a subtree that can be converted with DictDictElementConverters:
For each row in the table a DictDictElement (structure element) is generated. The key of the
element is the row number. The value of the element is a dict containing the mapping of
column names to values of the respective cell.
Example:
.. code-block:: yaml
subtree:
TABLE:
type: CSVTableConverter
match: ^test_table.csv$
records:
(...) # Records edited for the whole table file
subtree:
ROW:
type: DictDictElement
match_name: .*
match_value: .*
records:
(...) # Records edited for each row
subtree:
COLUMN:
type: DictFloatElement
match_name: measurement # Name of the column in the table file
match_value: (?P<column_value).*)
records:
(...) # Records edited for each cell
XLSXTableConverter
=================
CSVTableConverter
=================
Custom Converters
+++++++++++++++++
Identifiables Identifiables
+++++++++++++ +++++++++++++
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment