Skip to content

Commit c1c82aa

Browse files
committed
Update README
1 parent 0f5d0af commit c1c82aa

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,31 @@
88

99

1010
A small library to backport an [OpenStudio](https://github.com/NREL/OpenStudio) OSM model to an older version.
11-
I am only added backports as old as I need to.
11+
I am only adding backports as old as I need to.
1212

13-
A Jupyter Notebook [openstudio-backporter_Demonstration.ipynb](openstudio-backporter_Demonstration.ipynb) can serve as a small demonstration of the features.
13+
A CLI feature is provided, that you can invoke via `python -m openstudiobackporter`
14+
15+
See `python -m openstudiobackporter --help` for the list of command line parameters and how to use it.
16+
17+
Example:
18+
19+
```shell
20+
python -m openstudiobackporter --to-version 3.8.0 --save-intermediate --verbose /path/to/model3_10_0.osm
21+
```
22+
23+
You can also use it as a library:
24+
25+
```python
26+
from pathlib import Path
27+
from openstudiobackporter import Backporter
28+
29+
backporter = Backporter(to_version="3.9.0", save_intermediate=False)
30+
idf_file = backporter.backport_file(osm_path=Path("/path/to/model_3_10_0.osm"))
31+
32+
# or
33+
model = openstudio.model.exampleModel()
34+
backporter.backport(idf_file=model) # or model.toIdfFile()
35+
```
1436

1537

1638
* Documentation: <https://jmarrec.github.io/openstudio-backporter>

0 commit comments

Comments
 (0)