Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.4 KB

README.md

File metadata and controls

40 lines (34 loc) · 1.4 KB

Martini

Martini is a Rust based INI file parser. It was born during my recreational programming sessions.

About INI files

INI files are configuration files used for computer software configuration (typically Windows). Each file describes several named sections . These sections have key-value pairs inside of them.

The file format isn't too formally defined. There are some things that are standard and some things which vary. The goals section defines all specifications (to be) implemented in this project.

Goals

We'd like to achieve parsing for following features and properties. Some of these are implicitly guaranteed.

Basic features

  • Sections ([section])
  • Keys/Properties (key=value)
  • Case sensitivity
  • Comments (; is a comment)
  • Irrelevant ordering of sections

Varying features

  • Blank properties (There's no value. e.g. key=)
  • Global properties
  • Different delimiters for properties:
    • <space>
    • :
  • Hierarchy: Nesting the section
    • [section.subsection]
    • [.subsection] where nesting under section is inferred
  • Variants of comments:
    • #,
  • Duplicate properties with multiple parsing strategies:
    • Ignore: Ignore the latest conflicting duplicate.
    • Overwrite: Overwrite the original property with the new one.
    • Allow multiple: Allow multiple values to co-exist.