{"id":25456806,"url":"https://github.com/szaghi/finer","last_synced_at":"2025-11-02T10:30:32.468Z","repository":{"id":29346839,"uuid":"32880973","full_name":"szaghi/FiNeR","owner":"szaghi","description":"Fortran INI ParseR and generator","archived":false,"fork":false,"pushed_at":"2023-10-30T15:02:30.000Z","size":5317,"stargazers_count":36,"open_issues_count":10,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-07-30T18:27:51.217Z","etag":null,"topics":["configparser","configuration-file","fortran","ini-emitter","ini-parser","oop"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szaghi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.bsd-2.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-25T17:45:37.000Z","updated_at":"2023-07-09T20:22:15.000Z","dependencies_parsed_at":"2022-09-20T08:13:32.550Z","dependency_job_id":null,"html_url":"https://github.com/szaghi/FiNeR","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFiNeR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFiNeR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFiNeR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFiNeR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szaghi","download_url":"https://codeload.github.com/szaghi/FiNeR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239394685,"owners_count":19631122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configparser","configuration-file","fortran","ini-emitter","ini-parser","oop"],"created_at":"2025-02-18T01:51:21.657Z","updated_at":"2025-11-02T10:30:32.427Z","avatar_url":"https://github.com/szaghi.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"top\"\u003e\u003c/a\u003e\n\n# FiNeR [![GitHub tag](https://img.shields.io/github/tag/szaghi/FiNeR.svg)](https://github.com/szaghi/FiNeR/releases)\n\n[![License](https://img.shields.io/badge/license-GNU%20GeneraL%20Public%20License%20v3%20,%20GPLv3-blue.svg)]()\n[![License](https://img.shields.io/badge/license-BSD2-red.svg)]()\n[![License](https://img.shields.io/badge/license-BSD3-red.svg)]()\n[![License](https://img.shields.io/badge/license-MIT-red.svg)]()\n\n[![Status](https://img.shields.io/badge/status-stable-brightgreen.svg)]()\n[![CI Status](https://github.com/szaghi/FiNeR/actions/workflows/ci.yml/badge.svg)](https://github.com/szaghi/FiNeR/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/szaghi/FiNeR.svg)](https://app.codecov.io/gh/szaghi/FiNeR)\n\n### FiNeR, Fortran INI ParseR and generator for FoRtraners\n\n+ FiNeR is a pure Fortran (KISS) library for IO of INI (config) files for modern (2003+) Fortran projects;\n+ FiNeR is Fortran 2003+ standard compliant;\n- FiNeR is OOP designed;\n- FiNeR is TDD designed;\n+ FiNeR is a Free, Open Source Project.\n\n#### Issues\n[![GitHub issues](https://img.shields.io/github/issues/szaghi/FiNeR.svg)]()\n\n#### Compiler Support\n\n[![Compiler](https://img.shields.io/badge/GNU-v5.3.0+-orange.svg)]()\n[![Compiler](https://img.shields.io/badge/Intel-v16.x+-brightgreen.svg)]()\n[![Compiler](https://img.shields.io/badge/IBM%20XL-not%20tested-yellow.svg)]()\n[![Compiler](https://img.shields.io/badge/g95-not%20tested-yellow.svg)]()\n[![Compiler](https://img.shields.io/badge/NAG-not%20tested-yellow.svg)]()\n[![Compiler](https://img.shields.io/badge/PGI-not%20tested-yellow.svg)]()\n\n---\n\n[What is FiNeR?](#what-is-finer?) | [Main features](#main-features) | [Copyrights](#copyrights) | [Documentation](#documentation) | [A Taste of FiNeR](#a-taste-of-finer)\n\n---\n\n## What is FiNeR?\n\nModern Fortran standards (2003+) have introduced better support for strings manipulations. Exploiting such new Fortran capabilities, FiNeR provides an easy to use module library for input (parsing) and output (generating) [INI](http://en.wikipedia.org/wiki/INI_file) (config) files.\n\nGo to [Top](#top)\n\n## Main features\n\n* [X] User-friendly methods for IO INI files:\n    * [x] parsing files:\n        * [x] automatic parsing of all sections (whose number is auto-detected);\n        * [x] automatic parsing of all options of each section (whose number is auto-detected);\n        * [x] unlimited polymorphic option-values extraction;\n    * [x] generating files:\n        * [x] user-friendly add/remove sections/options;\n        * [x] unlimited polymorphic option-values setting;\n    * [x] introspection:\n        * [x] self-consistency checks;\n        * [x] pretty-printings;\n        * [x] loop over options;\n        * [x] inquiring the presence of sections/options by name;\n* [ ] errors trapping mechanism.\n\nAny feature request is welcome.\n\nGo to [Top](#top)\n\n## Copyrights\n\nFiNeR is an open source project, it is distributed under a multi-licensing system:\n\n+ for FOSS projects:\n  - [GPL v3](http://www.gnu.org/licenses/gpl-3.0.html);\n+ for closed source/commercial projects:\n  - [BSD 2-Clause](http://opensource.org/licenses/BSD-2-Clause);\n  - [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause);\n  - [MIT](http://opensource.org/licenses/MIT).\n\nAnyone is interest to use, to develop or to contribute to FiNeR is welcome, feel free to select the license that best matches your soul!\n\nMore details can be found on [wiki](https://github.com/szaghi/FiNeR/wiki/Copyrights).\n\nGo to [Top](#top)\n\n## Documentation\n\nBesides this README file the FiNeR documentation is contained into its own [wiki](https://github.com/szaghi/FiNeR/wiki). Detailed documentation of the API is contained into the [GitHub Pages](http://szaghi.github.io/FiNeR/index.html) that can also be created locally by means of [ford tool](https://github.com/cmacmackin/ford).\n\n### A Taste of FiNeR\nLet us assume our goal is to parse a config file. It is as simple as\n```fortran\nuse finer\n...\ntype(file_ini)                :: fini     !\u003c INI file handler.\ncharacter(len=:), allocatable :: source   ! Testing string.\nreal(R4P), allocatable        :: array(:) ! Array option.\ninteger(I4P)                  :: error    ! Error code.\n...\nsource='[section-1]'//new_line('A')//    \u0026\n       'option-1 = one'//new_line('A')// \u0026\n       'option-2 = 2.'//new_line('A')//  \u0026\n       '           3.'//new_line('A')//  \u0026\n       'option-3 = bar'//new_line('A')// \u0026\n       '[section-2]'//new_line('A')//    \u0026\n       'option-1 = foo'\ncall fini%load(source=source)\nallocate(array(1:fini%count_values(section='section-1',option='option-2')))\ncall fini%get(section='section-1',option='option-2',val=array,error=error)\nif (error==0) then\n  print*,array\nelse\n  ! errors occur...\nendif\n```\nAnd what about the generation of an INI file? It is simple as parsing an old one:\n```fortran\nuse finer\n...\ntype(file_ini) :: fini !\u003c INI file handler.\n...\ncall fini%add(section='sec-foo')\ncall fini%add(section='sec-foo',option='bar',val=-32.1_R8P)\ncall fini%add(section='sec-foo',option='baz',val=' hello FiNeR! ')\ncall fini%add(section='sec-foo',option='array',val=[1,2,3,4])\ncall fini%add(section='sec-bar')\ncall fini%add(section='sec-bar',option='bools',val=[.true.,.false.,.false.])\ncall fini%save(filename='foo.ini')\n```\nA file named *foo.ini* is created. It contains something like:\n```ini\n[sec-foo]\nbar = -0.321000000000000E+002\nbaz =  hello FiNeR!\narray = +1 +2 +3 +4\n[sec-bar]\nbools = T F F\n```\n\nGo to [Top](#top)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszaghi%2Ffiner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszaghi%2Ffiner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszaghi%2Ffiner/lists"}