Simply remove JSON keys via CLI command.
Project description
> remove-json-keys
Simply remove JSON keys via CLI command.
Installation
pip install remove-json-keys
Usage
Run the CLI:
remove-json-keys [options] # or remove-json
If no options are passed, the CLI will:
- Prompt for keys to delete
- Auto-discover closest child
json_dir - Delete keys from found JSON files
Note: Key/values can span multiple lines and have any amount of whitespace between symbols.
Options
Options can be set by using command-line arguments:
| Option | Description | Example |
|---|---|---|
-d, --json-dir |
Name of the folder containing JSON files (default: _locales) |
--json-dir=data |
-k, --keys |
Comma-separated list of keys to remove | --keys=appDesc,err_notFound |
-W, --no-wizard |
Skip interactive prompts during start-up | |
-h, --help |
Show help screen |
Examples
Remove author key from JSON files found in default _locales dir:
remove-json-keys --keys=author -W
Remove appDesc + err_notFound keys from JSON files found in data dir:
remove-json -k appDesc,err_notFound -d data -W
MIT License
Copyright © 2023–2026 Adam Lui.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remove_json_keys-1.1.0.tar.gz.
File metadata
- Download URL: remove_json_keys-1.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
656d4caf19b531da5c256b0d30015392292e05c571f6a27e4d3659ee8cc5e554
|
|
| MD5 |
811b5abd986d280c05b15ef5fe2bedb4
|
|
| BLAKE2b-256 |
4013a44a71d91036c02f9ecbaac18dc3be08832bcacb576873a77072ca73a085
|
File details
Details for the file remove_json_keys-1.1.0-py3-none-any.whl.
File metadata
- Download URL: remove_json_keys-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8958a967216bb4f6f93d3142d2b46c417ef771709cf9f0cb25b94ba96cfdaf32
|
|
| MD5 |
622202c64d91906882f749ed853869f5
|
|
| BLAKE2b-256 |
43d1444cee2df9a9eff993b0e6cde92893c1e5f50a2e05a679a427d705c142b9
|