Skip to content

Commit

Permalink
feat(lems): manually add Include
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed May 2, 2023
1 parent e8e2f5e commit 3b03e60
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/lems/xml2md.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import xmltodict
from datetime import date
import asttemplates
from collections import OrderedDict


# pages to which different sections should belong
Expand Down Expand Up @@ -43,6 +44,22 @@
parsed_data[et['@section']] = []
parsed_data[et['@section']].append(et)

# add Include
parsed_data['root'].append(
OrderedDict(
{
'@name': 'Include',
'Info': 'Include LEMS files in other LEMS files. Files are included where the Include declaration occurs. The enclosing Lems block is stripped off and the rest of the content included as is',
'Property': OrderedDict(
{
'@name': 'file',
'@type': 'String',
'#text': 'the name or relative path of a file to be included'
}
)
}
)
)

print(parsed_data)

Expand Down
17 changes: 17 additions & 0 deletions source/Userdocs/LEMS_elements/Modelstructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,23 @@ Please file any issues or questions at the [issue tracker here](https://github.c
**value**$ String$ The value of a constant must be a plain number (no units) giving the SI magnitude of the quantity or an expression involving only plain numbers or other constants.
**dimension**$ String$
```
````
`````
(lemsschema:include_)=
## Include

<i>Include LEMS files in other LEMS files. Files are included where the Include declaration occurs. The enclosing Lems block is stripped off and the rest of the content included as is</i>

`````{tab-set}
````{tab-item} Properties
```{csv-table}
:widths: 1, 2, 7
:width: 100%
:delim: $
**file**$ String$ the name or relative path of a file to be included
```
````
`````

0 comments on commit 3b03e60

Please sign in to comment.