This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: swap python readme with action * docs: add contributing to composite readme * docs: update action name * docs: clarify python readme
- Loading branch information
Showing
2 changed files
with
67 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
# `> Nested JSON Postprocessor` | ||
# GitHub Action `> Nested JSON Postprocessor` | ||
|
||
Remove null or empty keys, list and array from JSON files. | ||
|
||
## `> Postprocessor // Usage` | ||
|
||
Before you start, make sure that you have setup the supported version of Python in your workflow: | ||
|
||
| Python version | Support status | | ||
| -------------- | ---------------- | | ||
| Upcoming | ⚙️ Best effort | | ||
|
@@ -13,23 +17,32 @@ Remove null or empty keys, list and array from JSON files. | |
| 3.7 | ⚙️ Best effort | | ||
| =<3.6 | ❌ Not Supported | | ||
|
||
## `> Postprocessor // Usage` | ||
|
||
> [!IMPORTANT] | ||
> This guide assume that you already installed Python 3.10 or higher | ||
### `> Postprocessor // Preparing the files` | ||
|
||
1. Clone the repository: `[email protected]:validcube/crowdin-nested-json-postprocessor.git` | ||
2. Create two new folder called: `input` and `output` | ||
3. Copy the JSON files that you want to process into the `input` folder | ||
|
||
### `> Postprocessor // Running the script` | ||
|
||
Running the script: | ||
|
||
1. Install the required dependencies: `pip3 install -r requirements.txt` | ||
2. Run the script: `python3 main.py` | ||
```yml | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
``` | ||
| Input | Required | Description | | ||
| ---------------------- | ----------------------------------- | ------------------ | | ||
| `source_dir` | ✅ Yes | Input directory | | ||
| `destination_dir` | ❌ No (default to `source_dir`) | Output directory | | ||
| `signing_key` | ❌ No | Signing key | | ||
| `commit_message` | ❌ No (default to `JSON Cleanup`) | Commit message | | ||
| `secrets.GITHUB_TOKEN` | ❌ No (default to GitHub's default) | GitHub's PAT token | | ||
|
||
```yml | ||
- name: Nested JSON Postprocessor | ||
uses: validcube/[email protected] | ||
with: | ||
source_dir: 'path/to/your/source/directory' # required, your input directory | ||
destination_dir: 'path/to/your/destination/directory' # optional, default to source_dir | ||
signing_key: 'your-signing-key' # optional, will skip signing if not provided | ||
commit_message: 'your-custom-commit-message' # optional, default to "JSON Cleanup" | ||
secrets: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional, default to GitHub's default | ||
``` | ||
|
||
## `> Postprocessor // Contributing` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Python `> Nested JSON Postprocessor` | ||
|
||
Remove null or empty keys, list and array from JSON files. | ||
|
||
| Python version | Support status | | ||
| -------------- | ---------------- | | ||
| Upcoming | ⚙️ Best effort | | ||
| 3.12 | ✅ Supported | | ||
| 3.11 | ✅ Supported | | ||
| 3.10 | ✅ Supported | | ||
| 3.9 | ✅ Supported | | ||
| 3.8 | ⚙️ Best effort | | ||
| 3.7 | ⚙️ Best effort | | ||
| =<3.6 | ❌ Not Supported | | ||
|
||
## `> Postprocessor // Usage` | ||
|
||
> [!IMPORTANT] | ||
> This guide assume that you already installed Python 3.10 or higher | ||
### `> Postprocessor // Preparing the files` | ||
|
||
1. Clone the repository: `[email protected]:validcube/crowdin-nested-json-postprocessor.git` | ||
2. Create two new folder called: `input` and `output` | ||
3. Copy the JSON files that you want to process into the `input` folder | ||
|
||
### `> Postprocessor // Running the script` | ||
|
||
Running the script: | ||
|
||
1. Install the required dependencies: `pip3 install -r requirements.txt` | ||
2. Run the script: `python3 main.py` | ||
|
||
## `> Postprocessor // Contributing` | ||
|
||
Consider checking out the [CONTRIBUTING.md](CONTRIBUTING.md) page. |