Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

maddenp/nlh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nlh

Build Status

A Ruby library and command-line tool for handling (querying & modifying) Fortran namelist files.

###Please use the nml tool instead, if possible.

Usage

nlh.rb file namelist key [value]

Notes

The file containing the namelist(s) must exist, though it may be empty. For command-line usage, omitting the optional 'value' argument performs a lookup; supplying it performs a modification. Missing namelists or keys are created as needed. For programmatic usage, see the unit-test script, unit, for examples.

I fully expect that some valid Fortran namelists will not be parsed correctly by this code. I'm planning to write a replacement using a PEG toolkit, which will hopefully be robust. But this tool covers much practical ground, and emits (I believe) namelists that are standard-conformant.

Please note that, when processing an existing namelist file, comments are removed and namelists are reformatted (in a hopefully useful way).

About

A Ruby library and command-line tool for handling (querying & modifying) Fortran namelist files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages