/json-processor

console python utility to edit json files.

Primary LanguagePython

json-processor

console python utility to edit json files.
(Simple utility i wrote to edit level files in my game)

Commands

Common form: `command [argument1]  [argumentn]  
`exit`         or `e`         - exit program, back to terminal
`open file` or `o` - opens json files, throws error if it's not json or it doesn't exist
`showk` or `sk` - shows keys with 10 elements on 1 line by default
`change_ssn n` or `cn` - change the number of printed keys on 1 line
`save file``` or `s` - write down created/changed json file
`init` or `i` - creates empty json file, replacing opened/created file
`addk key` or `ak` - adds new key
`showv key` or `sv` - shows value of the key
`change_val key val` or `cv` - change value of key

Modes

  1. Interactive run json_processor.py and use commands above.

  2. CLI pass the sequence of commands and they will be executed one by one. Every command must be finished with ; Example: json_processor.py o file.json; sk; addk new_key; cv new_key some_val;