{"id":16086659,"url":"https://github.com/astares/pharo-inifile","last_synced_at":"2025-03-18T06:30:41.780Z","repository":{"id":78113793,"uuid":"202134170","full_name":"astares/Pharo-INIFile","owner":"astares","description":"Parser for .INI files (as often used on Windows)","archived":false,"fork":false,"pushed_at":"2024-07-10T13:56:07.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-28T07:49:29.177Z","etag":null,"topics":["pharo"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astares.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-13T11:56:58.000Z","updated_at":"2024-07-10T13:54:27.000Z","dependencies_parsed_at":"2024-07-10T16:11:23.055Z","dependency_job_id":"e958d1df-a513-4830-83c6-5028ea755ecd","html_url":"https://github.com/astares/Pharo-INIFile","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astares%2FPharo-INIFile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astares%2FPharo-INIFile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astares%2FPharo-INIFile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astares%2FPharo-INIFile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astares","download_url":"https://codeload.github.com/astares/Pharo-INIFile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243906346,"owners_count":20367015,"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":["pharo"],"created_at":"2024-10-09T13:24:49.467Z","updated_at":"2025-03-18T06:30:41.403Z","avatar_url":"https://github.com/astares.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pharo-INIFile\nParser for .INI files (as often used on Windows) for [Pharo](https://www.pharo.org)\n\n[![Pharo](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Pharo\u0026color=3297d4\u0026logo=Harbor\u0026logoColor=FFFFFF\u0026label=)](https://www.pharo.org) \n\n[![Unit Tests](https://github.com/astares/Pharo-INIFile/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/astares/Pharo-INIFile/actions/workflows/unit-tests.yml)\n[![Coverage Status](https://codecov.io/github/astares/Pharo-INIFile/coverage.svg?branch=main)](https://codecov.io/gh/astares/Pharo-INIFile/branch/main)\n\n\n[![Pharo 9](https://img.shields.io/badge/Pharo-9.0-%23aac9ff.svg)](https://pharo.org/download)\n[![Pharo 10](https://img.shields.io/badge/Pharo-10-%23aac9ff.svg)](https://pharo.org/download)\n[![Pharo 11](https://img.shields.io/badge/Pharo-11-%23aac9ff.svg)](https://pharo.org/download)\n[![Pharo 12](https://img.shields.io/badge/Pharo-12-%23aac9ff.svg)](https://pharo.org/download)\n\n\n# Quick Start\n\n## Installation via Script\n\n```Smalltalk\nMetacello new \n\trepository: 'github://astares/Pharo-INIFile:main/src';\n\tbaseline: 'INIFile';\n\tload\n```\n\n# Usage\nThe project includes a class **INIFile** that represent an INI file. An INI file is typically stored\nas a file with an *.ini extension and holds initialization values for an application in the following format:\n\n# Examples\n\n## Writing to an INI file\n```Smalltalk\n|file section stream|\nfile := INIFile new.\nsection := file section: 'First section'.\nsection at: 'key1' put: 'val1'.\nsection at: 'key2' put: 'val2'.\n\nstream := 'test.ini' asFileReference writeStream.\n[file writeOn: stream ] \n    ensure: [ stream close ]\n```\n\nThe resulting ini file will be:\n\n```\n[First section]\nkey1=val1\nkey2=val2\n```\n\n## Reading from an INI File\n```Smalltalk\n|file section stream|\nstream := 'test.ini' asFileReference readStream.\n\nfile := INIFile readFrom: stream.\nsection := file section: 'First section'.\n\n(section at: 'key1') inspect.\n\nstream close.\n\nfile sections inspect\"\n```\n## Reading from an INI File using specific encoding\nIf you need a specific encoding use one of the encoding schemes:\n\n```Smalltalk\n|file section stream|\nstream := 'aspnet_perf.ini' asFileReference readStreamEncoded: 'utf16le'.\nfile := INIFile readFrom: stream.\nstream close.\nfile sections inspect \n```\n\n## Video\n[![Watch the video](https://img.youtube.com/vi/Ifqb_vslzTE/hqdefault.jpg)](https://youtu.be/Ifqb_vslzTE)\n\n# History\n- moved here from old SmalltalkHub repo: [http://smalltalkhub.com/#!/~TorstenBergmann/INIFile](http://smalltalkhub.com/#!/~TorstenBergmann/INIFile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastares%2Fpharo-inifile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastares%2Fpharo-inifile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastares%2Fpharo-inifile/lists"}