JSON-merge is a CLI utility to merge JSON files.
- Start by cloning the repository using:
git clone https://github.com/IamRaviTejaG/json-merge.git
followed bycd json-merge
. - Run
python setup.py install
to install the utility. - You can alternatively install the requirements by
pip install -r requirements.txt
and then runpython merge.py
with suitable arguments. - Run
jsonmerge [OPTIONS]
from your terminal to use the application. - Use
jsonmerge --help
to get help about the arguments.
The utility opens all the files with matching base name sequentially and the writes the data into a dictionary. Further, it dumps the data into multiple files depending upon the maximum file size as input by the user.
--folder / -f
- (Optional) - The path to the folder where all JSON files are stored.--inputbasename / -i
- (Required) - The common prefix that all input files share.--outputbasename / -o
- (Required) - The prefix for the merged files generated by the utility.--maxfilesize / -m
- (Required) - The maximum file size (in bytes) that each merged file is allowed to be.
© 2019 Ravi Teja Gannavarapu.