Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
docs: clarify composite readme (#4)
Browse files Browse the repository at this point in the history
* docs: swap python readme with action

* docs: add contributing to composite readme

* docs: update action name

* docs: clarify python readme
  • Loading branch information
validcube authored Nov 20, 2023
1 parent 300e7fa commit 9ec74c5
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 18 deletions.
49 changes: 31 additions & 18 deletions README.md
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 |
Expand All @@ -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`

Expand Down
36 changes: 36 additions & 0 deletions README_PYTHON.md
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.

0 comments on commit 9ec74c5

Please sign in to comment.