dig-ini-editor


Namedig-ini-editor JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/DIG-/python-git-ignore
SummaryCommand line INI editor
upload_time2023-10-25 03:21:50
maintainer
docs_urlNone
authorGustavo de Oliveira Silva (DIG)
requires_python>=3.7
licenseCC BY-ND 4.0
keywords ini ini-editor inieditor initool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DIG ini-editor
[![Build Status](https://img.shields.io/appveyor/build/DIG-/python-ini-editor/master?logo=appveyor&logoColor=dddddd)](https://ci.appveyor.com/project/DIG-/python-ini-editor/branch/master)
[![Build tests](https://img.shields.io/appveyor/tests/DIG-/python-ini-editor/master?logo=appveyor&logoColor=dddddd)](https://ci.appveyor.com/project/DIG-/python-ini-editor/branch/master)
[![PyPI - License](https://img.shields.io/pypi/l/dig-ini-editor?color=blue)](https://creativecommons.org/licenses/by-nd/4.0/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dig-ini-editor)](https://pypi.org/project/dig-ini-editor/)
[![PyPI - Version](https://img.shields.io/pypi/v/dig-ini-editor)](https://pypi.org/project/dig-ini-editor/)

[![Windows - Supported](https://img.shields.io/badge/windows-supported-success?logo=windows&logoColor=dddddd)](#)
[![Linux - Supported](https://img.shields.io/badge/linux-supported-success?logo=linux&logoColor=dddddd)](#)
[![MacOS - Supported](https://img.shields.io/badge/macos-supported-success?logo=apple&logoColor=dddddd)](#)

Simple command line INI editor.
- Get list of sections
- Get list of keys from section
- Get value of key from section
- Add/Edit value of key from section
- Delete key from section
- Delete entire section
- Check if section exists
- Check if section and key exists

By default, all output will be written into stdout. It can be changed with option `--output FILENAME` or `--in-place` wich will use the input file as output.

The input filename `"-"` is reserved to read from stdin (`cat file.ini | ini-editor ACTION - …`)

## Usage
```sh
python -m dig_ini_editor ACTION
```
or
```sh
ini-editor ACTION
```

`ACTION` must be one of:

### • `get`
```sh
ini-editor get filename [section [key]]
```
- If `section` is not set, will return a list of sections.
- If `key` is not set, will return a list of keys from `section`.
- Otherwise will return the value of `key` from `section`.

### • `set`
```sh
ini-editor set filename section key value
```
Will add or replace, with `value`, the value of `key` from `section`.

### • `delete`
```sh
ini-editor delete filename section [key]
```
- If `key` is not set, will remove entire `section`.
- Otherwise will remove only the `key` from `section`.

### • `exists`
```sh
ini-editor exists filename section [key]
```
Will return `"true"` and exit code `0` if the condition is satisfied, otherwise return `"false"` and exit code non-zero.
- If `key` is not set, will only check if `section` exists.

## Installation
### From PyPI (preferred):
``` sh
python -m pip install dig-ini-editor
```
### From github release:
``` sh
python -m pip install "https://github.com/DIG-/python-ini-editor/releases/download/1.0.1/dig_ini_editor-1.0.1-py3-none-any.whl"
```
or
``` sh
python -m pip install "https://github.com/DIG-/python-ini-editor/releases/download/1.0.1/dig_ini_editor.tar.gz"
```

### From github main branch:
``` sh
python -m pip install "git+https://github.com/DIG-/python-ini-editor.git@master#egg=dig_git_ignore"
```

## License
[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0/)

- You can use and redist freely.
- You can also modify, but only for yourself.
- You can use it as a part of your project, but without modifications in this project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DIG-/python-git-ignore",
    "name": "dig-ini-editor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "ini ini-editor inieditor initool",
    "author": "Gustavo de Oliveira Silva (DIG)",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a2/ca/cbf67adb4c58b7f598e3e3f5c1c12a2872eea43a9da0c2f52a78307a6a12/dig-ini-editor-1.0.1.tar.gz",
    "platform": null,
    "description": "# DIG ini-editor\r\n[![Build Status](https://img.shields.io/appveyor/build/DIG-/python-ini-editor/master?logo=appveyor&logoColor=dddddd)](https://ci.appveyor.com/project/DIG-/python-ini-editor/branch/master)\r\n[![Build tests](https://img.shields.io/appveyor/tests/DIG-/python-ini-editor/master?logo=appveyor&logoColor=dddddd)](https://ci.appveyor.com/project/DIG-/python-ini-editor/branch/master)\r\n[![PyPI - License](https://img.shields.io/pypi/l/dig-ini-editor?color=blue)](https://creativecommons.org/licenses/by-nd/4.0/)\r\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dig-ini-editor)](https://pypi.org/project/dig-ini-editor/)\r\n[![PyPI - Version](https://img.shields.io/pypi/v/dig-ini-editor)](https://pypi.org/project/dig-ini-editor/)\r\n\r\n[![Windows - Supported](https://img.shields.io/badge/windows-supported-success?logo=windows&logoColor=dddddd)](#)\r\n[![Linux - Supported](https://img.shields.io/badge/linux-supported-success?logo=linux&logoColor=dddddd)](#)\r\n[![MacOS - Supported](https://img.shields.io/badge/macos-supported-success?logo=apple&logoColor=dddddd)](#)\r\n\r\nSimple command line INI editor.\r\n- Get list of sections\r\n- Get list of keys from section\r\n- Get value of key from section\r\n- Add/Edit value of key from section\r\n- Delete key from section\r\n- Delete entire section\r\n- Check if section exists\r\n- Check if section and key exists\r\n\r\nBy default, all output will be written into stdout. It can be changed with option `--output FILENAME` or `--in-place` wich will use the input file as output.\r\n\r\nThe input filename `\"-\"` is reserved to read from stdin (`cat file.ini | ini-editor ACTION - \u2026`)\r\n\r\n## Usage\r\n```sh\r\npython -m dig_ini_editor ACTION\r\n```\r\nor\r\n```sh\r\nini-editor ACTION\r\n```\r\n\r\n`ACTION` must be one of:\r\n\r\n### \u2022 `get`\r\n```sh\r\nini-editor get filename [section [key]]\r\n```\r\n- If `section` is not set, will return a list of sections.\r\n- If `key` is not set, will return a list of keys from `section`.\r\n- Otherwise will return the value of `key` from `section`.\r\n\r\n### \u2022 `set`\r\n```sh\r\nini-editor set filename section key value\r\n```\r\nWill add or replace, with `value`, the value of `key` from `section`.\r\n\r\n### \u2022 `delete`\r\n```sh\r\nini-editor delete filename section [key]\r\n```\r\n- If `key` is not set, will remove entire `section`.\r\n- Otherwise will remove only the `key` from `section`.\r\n\r\n### \u2022 `exists`\r\n```sh\r\nini-editor exists filename section [key]\r\n```\r\nWill return `\"true\"` and exit code `0` if the condition is satisfied, otherwise return `\"false\"` and exit code non-zero.\r\n- If `key` is not set, will only check if `section` exists.\r\n\r\n## Installation\r\n### From PyPI (preferred):\r\n``` sh\r\npython -m pip install dig-ini-editor\r\n```\r\n### From github release:\r\n``` sh\r\npython -m pip install \"https://github.com/DIG-/python-ini-editor/releases/download/1.0.1/dig_ini_editor-1.0.1-py3-none-any.whl\"\r\n```\r\nor\r\n``` sh\r\npython -m pip install \"https://github.com/DIG-/python-ini-editor/releases/download/1.0.1/dig_ini_editor.tar.gz\"\r\n```\r\n\r\n### From github main branch:\r\n``` sh\r\npython -m pip install \"git+https://github.com/DIG-/python-ini-editor.git@master#egg=dig_git_ignore\"\r\n```\r\n\r\n## License\r\n[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0/)\r\n\r\n- You can use and redist freely.\r\n- You can also modify, but only for yourself.\r\n- You can use it as a part of your project, but without modifications in this project.\r\n",
    "bugtrack_url": null,
    "license": "CC BY-ND 4.0",
    "summary": "Command line INI editor",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/DIG-/python-git-ignore/issues",
        "Homepage": "https://github.com/DIG-/python-git-ignore"
    },
    "split_keywords": [
        "ini",
        "ini-editor",
        "inieditor",
        "initool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25df8d2710844c1af9747e660f1979ba87d67d9cf8f0a98dcc74d086d0afeb31",
                "md5": "9da64c79ce7d83b8ecb5b81d6cdc453f",
                "sha256": "67f08caf94e694600dd0e10c29718533a347edbfe91ae4d90dc1e916457a3d23"
            },
            "downloads": -1,
            "filename": "dig_ini_editor-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9da64c79ce7d83b8ecb5b81d6cdc453f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6306,
            "upload_time": "2023-10-25T03:21:49",
            "upload_time_iso_8601": "2023-10-25T03:21:49.231194Z",
            "url": "https://files.pythonhosted.org/packages/25/df/8d2710844c1af9747e660f1979ba87d67d9cf8f0a98dcc74d086d0afeb31/dig_ini_editor-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a2cacbf67adb4c58b7f598e3e3f5c1c12a2872eea43a9da0c2f52a78307a6a12",
                "md5": "1be5bb1fdb021c063cf26cbe133384c9",
                "sha256": "4140c1ae157c74400261986176a259a55552444ca8fce763bc9f8d7bece6b3c9"
            },
            "downloads": -1,
            "filename": "dig-ini-editor-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1be5bb1fdb021c063cf26cbe133384c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7441,
            "upload_time": "2023-10-25T03:21:50",
            "upload_time_iso_8601": "2023-10-25T03:21:50.395876Z",
            "url": "https://files.pythonhosted.org/packages/a2/ca/cbf67adb4c58b7f598e3e3f5c1c12a2872eea43a9da0c2f52a78307a6a12/dig-ini-editor-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 03:21:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DIG-",
    "github_project": "python-git-ignore",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "tox": true,
    "lcname": "dig-ini-editor"
}
        
Elapsed time: 0.13167s