Skip to content

Commit 8576c6b

Browse files
committed
docs: beautify README.md in both English and zh-CN
Signed-off-by: jingfelix <jingfelix@outlook.com>
1 parent 508d65a commit 8576c6b

File tree

2 files changed

+79
-10
lines changed

2 files changed

+79
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
# Patche
2-
3-
Modern patch, written in Python.
4-
5-
## Usage
1+
<div align="center">
2+
<h1>Patche</h1>
3+
<h3>Modern patch, written in Python.</h3>
4+
<div>English | <a href="README.zh-CN.md">简体中文</a></div>
5+
<br>
6+
<a href="https://pypi.org/project/Patche/"><img src="https://img.shields.io/pypi/v/Patche" alt="PyPI"></a>
7+
<!-- <a href="https://pypi.org/project/Patche/"><img src="https://img.shields.io/pypi/pyversions/Patche" alt="PyPI - Python Version"></a> -->
8+
<a href="https://github.com/jingfelix/Patche/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/Patche" alt="PyPI - License"></a>
9+
<a href="https://pdm-project.org"><img src="https://img.shields.io/badge/pdm-managed-blueviolet" alt="pdm-managed"></a>
10+
</div>
11+
12+
## 🔨 Usage
613

714
The following commands are supported:
815

9-
### apply
16+
### ➡️ patche apply
1017

1118
Apply a patch to target files.
1219

@@ -18,31 +25,31 @@ Options:
1825
- `-R, --reverse`: Assume patches were created with old and new files swapped
1926
- `-F, --fuzz LINES`: Set the fuzz factor to LINES for inexact matching
2027

21-
### show
28+
### ↕️ patche show
2229

2330
Show details of a patch file.
2431

2532
```shell
2633
patche show <patch-file>
2734
```
2835

29-
### settings
36+
### ⚙️ patche settings
3037

3138
Display current configuration.
3239

3340
```shell
3441
patche settings
3542
```
3643

37-
## Config
44+
## 🧰 Config
3845

3946
`patche` loads the configuration from a file named `.patche.env` in `$HOME`.
4047

4148
```shell
4249
max_diff_lines = 3
4350
```
4451

45-
## Development
52+
## 💻 Development
4653

4754
`patche` uses `pdm` as package manager. To install the dependencies in your workspace, run:
4855

README.zh-CN.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<div align="center">
2+
<h1>Patche</h1>
3+
<h3>Python 编写的现代补丁工具</h3>
4+
<div><a href="README.md">English</a> | 简体中文</div>
5+
<br>
6+
<a href="https://pypi.org/project/Patche/"><img src="https://img.shields.io/pypi/v/Patche" alt="PyPI"></a>
7+
<a href="https://github.com/jingfelix/Patche/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/Patche" alt="PyPI - License"></a>
8+
<a href="https://pdm-project.org"><img src="https://img.shields.io/badge/pdm-managed-blueviolet" alt="pdm-managed"></a>
9+
</div>
10+
11+
## 🔨 使用方法
12+
13+
支持以下命令:
14+
15+
### ➡️ patche apply
16+
17+
将补丁应用到目标文件。
18+
19+
```shell
20+
patche apply <patch-file>
21+
```
22+
23+
选项:
24+
- `-R, --reverse`: 假设补丁文件在创建时新旧文件被交换
25+
- `-F, --fuzz LINES`: 为不精确匹配设置模糊行数 LINES
26+
27+
### ↕️ patche show
28+
29+
显示补丁文件的详细信息。
30+
31+
```shell
32+
patche show <patch-file>
33+
```
34+
35+
### ⚙️ patche settings
36+
37+
显示当前配置。
38+
39+
```shell
40+
patche settings
41+
```
42+
43+
## 🧰 配置
44+
45+
`patche``$HOME` 目录下的 `.patche.env` 文件加载配置。
46+
47+
```shell
48+
max_diff_lines = 3
49+
```
50+
51+
## 💻 开发
52+
53+
`patche` 使用 `pdm` 作为包管理器。要在工作空间中安装依赖项,请运行:
54+
55+
```bash
56+
pdm install --prod
57+
58+
# 如果你想追踪 patche 的执行过程
59+
pdm install
60+
```
61+
62+
参考:[PDM 文档](https://pdm-project.org/en/latest/usage/dependency/)

0 commit comments

Comments
 (0)