File tree Expand file tree Collapse file tree 2 files changed +79
-10
lines changed Expand file tree Collapse file tree 2 files changed +79
-10
lines changed Original file line number Diff line number Diff line change 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
6
13
7
14
The following commands are supported:
8
15
9
- ### apply
16
+ ### ➡️ patche apply
10
17
11
18
Apply a patch to target files.
12
19
@@ -18,31 +25,31 @@ Options:
18
25
- ` -R, --reverse ` : Assume patches were created with old and new files swapped
19
26
- ` -F, --fuzz LINES ` : Set the fuzz factor to LINES for inexact matching
20
27
21
- ### show
28
+ ### ↕️ patche show
22
29
23
30
Show details of a patch file.
24
31
25
32
``` shell
26
33
patche show < patch-file>
27
34
```
28
35
29
- ### settings
36
+ ### ⚙️ patche settings
30
37
31
38
Display current configuration.
32
39
33
40
``` shell
34
41
patche settings
35
42
```
36
43
37
- ## Config
44
+ ## 🧰 Config
38
45
39
46
` patche ` loads the configuration from a file named ` .patche.env ` in ` $HOME ` .
40
47
41
48
``` shell
42
49
max_diff_lines = 3
43
50
```
44
51
45
- ## Development
52
+ ## 💻 Development
46
53
47
54
` patche ` uses ` pdm ` as package manager. To install the dependencies in your workspace, run:
48
55
Original file line number Diff line number Diff line change
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/ )
You can’t perform that action at this time.
0 commit comments