GithubHelp home page GithubHelp logo

aferranc / python-confmerge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aisbergg/python-confmerge

0.0 0.0 0.0 26 KB

:snake: Python configuration file merge utility

License: GNU Lesser General Public License v3.0

Python 100.00%

python-confmerge's Introduction

ConfMerge - Python3 configuration file merge utility

ConfMerge lets you merge multiple configuration files into one file. Currently supported file formats are INI, YAML and JSON.

Installation

To install ConfMerge directly from Github:

pip install git+https://github.com/aferranc/[email protected]

RPM build

To build RPM package:

python3 setup.py bdist_rpm --binary-only --requires python3-pyyaml

Usage

usage: confmerge [-d] [-f] [-h] [-m MODE] [-t FILE_TYPE] [--debug] [--version]
                 src [src ...] dest

Merge multiple configuration files into one file

positional arguments:
  src                   The source files
  dest                  The destination file

optional arguments:
  -d, --dry-run         Print the merged content on stdout instead of writing
                        it to the destination file
  -f, --force           Force overwriting of any existing destination file
  -h, --help            Show this help message and exit
  -m MODE, --mode MODE  File mode for newly created files
  -t FILE_TYPE, --type FILE_TYPE
                        Type of file can be one of 'ini', 'json' or 'yaml'. If
                        not specified the type will be guessed from the file
                        extension
  --debug               Print debug trace on error
  --version             Print the program version and exit

Examples

Merge multiple INI files and write result into res.ini

confmerge -f 1.ini 2.ini 3.ini res.ini

Merge different types of configuration files:

confmerge -f 1.yml 2.json 3.ini res.yml

Perform a dry run (don't write output file but print result on stdout):

confmerge --dry-run 1.yml 2.yml not-touched.yml

python-confmerge's People

Contributors

aferranc avatar aisbergg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.