From f17befaaf04baa04b0abebefba877b89c1746d25 Mon Sep 17 00:00:00 2001 From: Alexander Schlemmer <alexander.schlemmer@ds.mpg.de> Date: Thu, 22 Sep 2022 13:53:41 +0200 Subject: [PATCH] DOC: more enhancements --- src/doc/index.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/doc/index.rst b/src/doc/index.rst index d834178f..ca6faa20 100644 --- a/src/doc/index.rst +++ b/src/doc/index.rst @@ -267,3 +267,39 @@ to the variables like: type: DictTextElement match_value: (?P<description>.*) match_name: description + + +Scopes +======== + +Example: + +.. code-block:: yaml + DicomFile: + type: SimpleDicomFile + match: (?P<filename>.*)\.dicom + records: + DicomRecord: + name: $filename + subtree: # header of dicom file + PatientID: + type: DicomHeaderElement + match_name: PatientName + match_value: (?P<patient>.*) + records: + Patient: + name: $patient + dicom_name: $filename # $filename is in same scope! + ExperimentFile: + type: MarkdownFile + match: ^readme.md$ + records: + Experiment: + dicom_name: $filename # does NOT work, because $filename is out of scope! + + +# can variables be used within regexp? + + +File Objects +============ -- GitLab