{"id":28047227,"url":"https://github.com/solkin/minion-android","last_synced_at":"2025-05-11T20:47:24.996Z","repository":{"id":144137249,"uuid":"98341551","full_name":"solkin/minion-android","owner":"solkin","description":"🔥 Minion is a handy group-key-value data storage library, powered by INI format","archived":false,"fork":false,"pushed_at":"2023-03-28T19:25:41.000Z","size":572,"stargazers_count":23,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-11T20:47:21.287Z","etag":null,"topics":["ini","ini-parser","iniparser","key-value","nosql","storage-library"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solkin.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,"zenodo":null}},"created_at":"2017-07-25T19:16:57.000Z","updated_at":"2024-07-10T21:57:16.000Z","dependencies_parsed_at":"2023-05-28T07:00:17.068Z","dependency_job_id":null,"html_url":"https://github.com/solkin/minion-android","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fminion-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fminion-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fminion-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fminion-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solkin","download_url":"https://codeload.github.com/solkin/minion-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253632912,"owners_count":21939383,"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":["ini","ini-parser","iniparser","key-value","nosql","storage-library"],"created_at":"2025-05-11T20:47:19.958Z","updated_at":"2025-05-11T20:47:24.960Z","avatar_url":"https://github.com/solkin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minion for Android\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Minion-green.svg?style=flat)](https://android-arsenal.com/details/1/6214) [![](https://jitpack.io/v/solkin/minion-android.svg)](https://jitpack.io/#solkin/minion-android)\n\nMinion is a handy group-key-value data storage library, powered by INI format. Let you parse and store INI format. Designed with modern fluent interface.\n\n![Minion icon](/minion_icon.png)\n\n### Add dependency\n**Step 1.** Add the JitPack repository to your build file\n```groovy\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\n**Step 2.** Add the dependency\n```groovy\nimplementation 'com.github.solkin:minion-android:1.3'\n```\n\n### Create async Minion for file\n```java\nFileStorage storage = FileStorage.create(file);\nMinion minion = Minion.lets()\n        .load(storage)\n        .and()\n        .store(storage)\n        .async(new ResultCallback() {\n\n            void onReady(Minion minion) {\n            \t// Data successfully loaded.\n            }\n\n            void onFailure(Exception ex) {\n            \t// Something went wrong.\n            }\n        });\n```\n\n### Save\nSave data to specified storage.\n\n```java\nminion.store();\n```\n\nAlso, if you created Minion `async`, you may listen for operation result with callback.\n\n```java\nminion.store(new ResultCallback() {\n\n    void onReady(Minion minion) {\n    \t// Data successfully saved.\n    }\n\n    void onFailure(Exception ex) {\n    \t// Something went wrong.\n    }\n});\n```\n\n### Parse INI from string\nParses INI from specified string synchronously.\n\n```java\nReadable storage = StringStorage.create(\"[group]\\nkey=value\\nkey2=value2\");\nMinion minion = Minion.lets()\n        .load(storage)\n        .sync();\n```\n\n### Set values for specified group and key\nIf no such group or key exist, they will be created.\n\n```java\nminion.setValue(\"user\", \"name\", \"Michael\");\n```\n\nIt's also extremely easy to set an array of values.\n\n```java\nminion.setValue(\"music\", \"genres\", \"Classical\", \"Lounge\", \"Dance\", \"Pop\");\n```\n\n### Get values for specified group and key\nIf no such group exist, it will be created.\n\n```java\nString name = minion.getValue(\"user\", \"name\");\n```\n\nOr you can obtain array of values.\n\n```java\nString[] genres = minion.getValues(\"music\", \"genres\");\n```\n\n### Get all groups\nReturns all group names.\n\n```java\nSet\u003cString\u003e names = minion.getGroupNames();\n```\n\nReturns all groups with records.\n\n```java\nList\u003cIniGroup\u003e groups = minion.getGroups();\n```\n\n### Remove record\nOf course, you may just simply remove key and value. Function `removeRecord` will return removed record. If it doesn't exist, method will return `null`.\n\n```java\nIniRecord record = minion.removeRecord(\"user\", \"name\");\n```\n\n### Remove group\nMinion allows to remove whole group of records too. Function `removeGroup` will return removed group with removed records. If it doesn't exist, method will return `null`.\n\n```java\nIniGroup group = minion.removeGroup(\"music\");\n```\n\n### Clear all\nIf you need to remove all groups (and, also, all records), you can call method `clear`:\n\n```java\nminion.clear();\n```\n\n### How it works\nMinion based on stupidly simple plain-text INI format, it parses, compiles and deliver access blazingly fast. \nLibrary is extra-lightweight (~25Kb) and contain no any dependencies.\nYou can use Minion to store some prefs or form-specific data. Simply than ever.\n\n\n### License\n    Copyright 2021 Igor Solkin\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolkin%2Fminion-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolkin%2Fminion-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolkin%2Fminion-android/lists"}