Metadata-Version: 2.1
Name: foamfile
Version: 0.11
Summary: OpenFOAM config file parser
Home-page: https://github.com/napyk/foamfile
Author: Nikolas Pfister
Author-email: pfister.nikolas@gmail.com
License: MIT
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: pyparsing (==2.4.2)

File parser for OpenFOAM configuration files based on <https://cfd.direct/openfoam/user-guide/v6-basic-file-format/>

foamfile uses [pyparsing](https://github.com/pyparsing/pyparsing/) to extract the data from the files.

### example usage
```python
from foamfile import FoamFile

with FoamFile("path/to/file") as f:
    foam_content = f.read()
    print(f.header)
    print(foam_content)

with FoamFile("path/to/file", "w", foam_class="dictionary") as f:
    f.write(foam_content)
```

### TODO
* Macro expansion does not work at the moment
* Optimize parsing of directives
* Add codeStreams
* Add calculations
* Add support for comments

Tested with OpenFOAM v6.


