{"id":13617375,"url":"https://github.com/pixelb/crudini","last_synced_at":"2025-05-14T14:07:55.044Z","repository":{"id":45352808,"uuid":"7831367","full_name":"pixelb/crudini","owner":"pixelb","description":"A utility for manipulating ini files","archived":false,"fork":false,"pushed_at":"2024-11-15T14:41:00.000Z","size":379,"stargazers_count":451,"open_issues_count":19,"forks_count":61,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-11T20:44:12.881Z","etag":null,"topics":["cli","command","config","configuration-file","ini","ini-parser"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixelb.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"COPYING","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":"2013-01-26T00:39:08.000Z","updated_at":"2025-03-08T03:18:22.000Z","dependencies_parsed_at":"2024-01-26T10:34:29.868Z","dependency_job_id":"e331e840-9745-4e90-8437-00d45c2f2851","html_url":"https://github.com/pixelb/crudini","commit_stats":{"total_commits":123,"total_committers":14,"mean_commits":8.785714285714286,"dds":0.2682926829268293,"last_synced_commit":"0f56cb5ecaddfd22ce7634f400bbaa9e652e0aa8"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fcrudini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fcrudini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fcrudini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fcrudini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelb","download_url":"https://codeload.github.com/pixelb/crudini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159194,"owners_count":22024558,"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":["cli","command","config","configuration-file","ini","ini-parser"],"created_at":"2024-08-01T20:01:40.714Z","updated_at":"2025-05-14T14:07:55.035Z","avatar_url":"https://github.com/pixelb.png","language":"Python","readme":"# crudini - A utility for manipulating ini files\n\n## Usage:\n```\ncrudini --set [OPTION]...   config_file section   [param] [value]\ncrudini --get [OPTION]...   config_file [section] [param]\ncrudini --del [OPTION]...   config_file section   [param] [list value]\ncrudini --merge [OPTION]... config_file [section]\n\nSECTION can be empty (\"\") or \"DEFAULT\" in which case,\nparams not in a section, i.e. global parameters are operated on.\nIf 'DEFAULT' is used with --set, an explicit [DEFAULT] section is added.\n\nMultiple --set|--del|--get operations for a config_file can be specified.\n\n```\n## Options:\n```\n\n  --existing[=WHAT]  For --set, --del and --merge, fail if item is missing,\n                       where WHAT is 'file', 'section', or 'param',\n                       or if WHAT not specified; all specified items.\n  --format=FMT       For --get, select the output FMT.\n                       Formats are 'sh','ini','lines'\n  --ini-options=OPT  Set options for handling ini files.  Options are:\n                       'nospace': use format name=value not name = value\n                       'space': ensure name = value format\n                       'sectionspace': ensure one blank line between sections\n                       'ignoreindent': ignore leading whitespace\n  --inplace          Lock and write files in place.\n                       This is not atomic but has less restrictions\n                       than the default replacement method.\n  --list             For --set and --del, update a list (set) of values\n  --list-sep=STR     Delimit list values with \"STR\" instead of \" ,\".\n                       An empty STR means any whitespace is a delimiter.\n  --output=FILE      Write output to FILE instead. '-' means stdout\n  --verbose          Indicate on stderr if changes were made\n  --help             Write this help to stdout\n  --version          Write version to stdout\n\n```\n## Examples:\n```\n\n# Add/Update a var\n  crudini --set config_file section parameter value\n\n# Add/Update a var in the root or global area.\n# I.e. that's not under a [section].\n  crudini --set config_file \"\" parameter value\n\n# Update an existing var\n  crudini --set --existing config_file section parameter value\n\n# Add/Update/Delete multiple variables atomically\n  crudini --set config_file section parameter1 value \\\n          --set config_file section parameter2 value \\\n          --del config_file section parameter3\n\n# Get multiple items from stdin\n  env | crudini --get - '' USER --get - '' SHELL\n\n# Add/Append a value to a comma separated list\n# Note any whitespace around commas is ignored\n  crudini --set --list config_file section parameter a_value\n\n# Add/Append a value to a whitespace separated list\n# Note multiline lists are supported (as newline is whitespace)\n  crudini --set --list --list-sep= config_file section parameter a_value\n\n# Delete a var\n  crudini --del config_file section parameter\n\n# Delete a section\n  crudini --del config_file section\n\n# output a value\n  crudini --get config_file section parameter\n\n# output a global value not in a section\n  crudini --get config_file \"\" parameter\n\n# output a section\n  crudini --get config_file section\n\n# output a section, parseable by shell\n  eval \"$(crudini --get --format=sh config_file section)\"\n\n# update an ini file from shell variable(s)\n  echo name=\"$name\" | crudini --merge config_file section\n\n# merge an ini file from another ini\n  crudini --merge config_file \u003c another.ini\n\n# compare two ini files using standard UNIX text processing\n  diff \u003c(crudini --get --format=lines file1.ini|sort) \\\n       \u003c(crudini --get --format=lines file2.ini|sort)\n\n# Rewrite ini file to use name=value format rather than name = value\n  crudini --ini-options=nospace --set config_file \"\"\n\n# Add/Update a var, ensuring complete file in name=value format\n  crudini --ini-options=nospace --set config_file section parameter value\n\n# Rewrite ini file to ensure a single blank line between sections,\n# and no leading or trailing blank lines\n  crudini --ini-options=sectionspace --set config_file \"\"\n\n# Read indented ini file, like .gitconfig\n  crudini --ini-options=ignoreindent --format=lines --get ~/.gitconfig\n```\n## Installation\n\nOn windows ensure a python interpreter is installed.\nFor example installing from https://www.python.org/downloads/\nwill put the py launcher and pip in the PATH.\n\nThen ensure the iniparse module is installed by\nrunning the following from a \"cmd\" prompt:\n\n```\npip install iniparse\n```\n\nThen crudini can be invoked by downloading just the crudini.py\nfile and running like:\n\n```\npy crudini.py --help\n```\n\nOn Linux systems crudini is generally available from your standard\npackage manager, and installing will also ensure the iniparse\ndependency is appropriately installed on your system.\nYou can also download and run the single crudini.py file directly\nto use latest version.\n\nOn any system you should be able to pip install\nthe latest code from github like:\n\n```\npip install git+https://github.com/pixelb/crudini.git#egg=crudini\n```\n","funding_links":[],"categories":["Python","\u003ca name=\"data-management\"\u003e\u003c/a\u003eData management"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelb%2Fcrudini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelb%2Fcrudini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelb%2Fcrudini/lists"}