Parsing .ini-like files used in Freedesktop systems
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
inilike:derived - A minimal D application.
Inilike is D library for parsing .ini-like files used in Freedesktop systems in various places (.desktop files, icon themes, mimeapps.list, mimeinfo.cache, trashcan files on freedesktop, etc.)
Note: the original purpose of this library is to serve as dependency for my other projects, e.g. desktopfile and icontheme. It may be not suitable to save configuration files using this library. You have been warned.
dub build --build=docs
dub build --build=ddox
Freedesktop specifications use the format which I call ini-like because it's very similiar to INI used in MS Windows with small differences:
- Comments start with '#', not ';'.
- Each comment is always placed on its own line. Key-value can't be mixed with a comment on the same line.
- Only the characters A-Za-z0-9- may be used in key names.
Localized values lookup.
The localized value is the value associated with the localized key. Localized keys look like this:
where locale is the POSIX locale with the charset part dropped.
Inilike library has support for lookup of localized values, using the algorithm described in Desktop Entry Specification.
IniLikeFile is the base class for file of ini-like format. To change its functionality it's needed to be subclassed. See example showing which functions can be overridden.
- Registered by Roman Chistokhodov
- 0.6.0 released 6 years ago
- Copyright © 2015-2016, Roman Chistokhodov
- Sub packages:
1.2.1 2021-Sep-27 1.2.0 2020-Sep-17 1.1.0 2017-Oct-23 1.0.3 2017-Oct-21 1.0.2 2017-Oct-21
- Download Stats:
2 downloads today
20 downloads this week
66 downloads this month
2839 downloads total
- Short URL: