From 2a6428feec4127e0997124aedbc185d9e6f63f4d Mon Sep 17 00:00:00 2001 From: jon-lee Date: Wed, 11 Jun 2025 22:33:15 +0800 Subject: [PATCH 1/3] docs: README --- README.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1492053..1bb4bf1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ -# JOJ3-config-generator +# JOJ3-forge [![Codacy Badge](https://app.codacy.com/project/badge/Grade/a98f9aa020874a93bc791a7616fccf21)](https://app.codacy.com/gh/joint-online-judge/JOJ3-config-generator/dashboard) [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/a98f9aa020874a93bc791a7616fccf21)](https://app.codacy.com/gh/joint-online-judge/JOJ3-config-generator/dashboard) +## Introduction + +`JOJ3-forge` is a CLI tool that generates configuration files for ![JOJ3](https://github.com/joint-online-judge/JOJ3). + ## Getting Started ### For users @@ -10,7 +14,7 @@ 1. Install [Python>=3.9](https://www.python.org/) and [pip](https://pip.pypa.io/) 2. (Optional) Create a virtual environment, check [here](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/). 3. Install/Upgrade the project by `pip install --force-reinstall --upgrade git+ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-config-generator.git` -4. Run it by `joj3-config-generator --help` +4. Run it by `joj3-forge --help` ### For developers @@ -23,22 +27,57 @@ ## How to use? -- `joj3-config-generator convert` function is now supported, currently support one argument as input, it indicates the **convert root** - - default value on the server can be given as `/home/tt/.config/joj` +Run `joj3-forge --help` to get basic CLI usage information. + +### `convert` + +- `joj3-forge convert` function is now supported, currently support one argument as input, it indicates the **convert root* + - default value on the server should be given as `/home/tt/.config/joj` - **NOTE:** the user should ensure that the ideal `repo.toml` file is in the sub-directory of the **convert root** - the intended immutable files should be placed at a sub-directory named `immutable_files` at same position as the `repo.toml` file + - a sample directory tree as follows ```shell $ tree . . -|- immutable_files -| |-- push.yaml -| |-- release.yaml -|-- repo.toml +├── hidden +│   ├── repo.toml +│   ├── immutable_files +│   │   ├── push.yaml +│   │   └── release.yaml +│   ├── ex1 +│   │   ├── caseX.in +│   │   ├── caseX.out +│   │   ├── conf.json +│   │   └── conf.toml +│   └── p1 +│   ├── caseX.in +│   ├── caseX.out +│   ├── conf.json +│   └── conf.toml +├── students +│   ├── repo.toml +│   ├── immutable_files +│   │   ├── push.yaml +│   │   └── release.yaml +│   ├── ex1 +│   │   ├── caseX.in +│   │   ├── caseX.out +│   │   ├── conf.json +│   │   └── conf.toml +│   └── p1 +│   ├── caseX.in +│   ├── caseX.out +│   ├── conf.json +│   └── conf.toml +├── students.csv +└── tools + ├── .clang-tidy + └── compile ``` - sample command on the server ```shell -joj3-config-generator convert /home/tt/.config/joj +joj3-forge convert /home/tt/.config/joj ``` -- 2.30.2 From 8ebc432999d22ffb9f37d47badde8fd64246a977 Mon Sep 17 00:00:00 2001 From: jon-lee Date: Wed, 11 Jun 2025 23:01:21 +0800 Subject: [PATCH 2/3] docs: remove non-ascii --- README.md | 77 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 1bb4bf1..19aef2c 100644 --- a/README.md +++ b/README.md @@ -38,42 +38,47 @@ Run `joj3-forge --help` to get basic CLI usage information. - a sample directory tree as follows ```shell -$ tree . -. -├── hidden -│   ├── repo.toml -│   ├── immutable_files -│   │   ├── push.yaml -│   │   └── release.yaml -│   ├── ex1 -│   │   ├── caseX.in -│   │   ├── caseX.out -│   │   ├── conf.json -│   │   └── conf.toml -│   └── p1 -│   ├── caseX.in -│   ├── caseX.out -│   ├── conf.json -│   └── conf.toml -├── students -│   ├── repo.toml -│   ├── immutable_files -│   │   ├── push.yaml -│   │   └── release.yaml -│   ├── ex1 -│   │   ├── caseX.in -│   │   ├── caseX.out -│   │   ├── conf.json -│   │   └── conf.toml -│   └── p1 -│   ├── caseX.in -│   ├── caseX.out -│   ├── conf.json -│   └── conf.toml -├── students.csv -└── tools - ├── .clang-tidy - └── compile +$ tree -a +home +`-- tt + |-- .cache + `-- .config + `-- joj + |-- hidden + | |-- ex1 + | | |-- case1.in + | | |-- case1.out + | | |-- conf.json + | | `-- conf.toml + | |-- immutable_files + | | |-- push.yaml + | | `-- release.yaml + | |-- p1 + | | |-- case1.in + | | |-- case1.out + | | |-- conf.json + | | `-- conf.toml + | `-- repo.toml + |-- students + | |-- ex1 + | | |-- case1.in + | | |-- case1.out + | | |-- conf.json + | | `-- conf.toml + | |-- immutable_files + | | |-- push.yaml + | | `-- release.yaml + | |-- p1 + | | |-- case1.in + | | |-- case1.out + | | |-- conf.json + | | `-- conf.toml + | `-- repo.toml + |-- students.csv + `-- tools + |-- .clang-tidy + |-- compile + `-- helper.sh ``` - sample command on the server -- 2.30.2 From 139eafa6447e77fb936454b771c2d665fbd51170 Mon Sep 17 00:00:00 2001 From: jon-lee Date: Wed, 11 Jun 2025 23:03:36 +0800 Subject: [PATCH 3/3] docs: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19aef2c..6c31a71 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Introduction -`JOJ3-forge` is a CLI tool that generates configuration files for ![JOJ3](https://github.com/joint-online-judge/JOJ3). +JOJ3-forge is a CLI tool that generates configuration files for [JOJ3](https://github.com/joint-online-judge/JOJ3). ## Getting Started -- 2.30.2