Skip to content

IamRaviTejaG/json-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON-Merge

MIT Licence

JSON-merge is a CLI utility to merge JSON files.

Getting Started

  • Start by cloning the repository using: git clone https://github.com/IamRaviTejaG/json-merge.git followed by cd 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 run python merge.py with suitable arguments.
  • Run jsonmerge [OPTIONS] from your terminal to use the application.
  • Use jsonmerge --help to get help about the arguments.

Working

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.

Arguments

  • --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.

About

Take home assignment by FreshWorks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages