Skip to content

Commit 5fe8df4

Browse files
[翻译] 翻译文档 version 1.2 (#10)
* [翻译] 翻译文档 version 1.2 * [翻译] 同步文档更改 Co-authored-by: DuckDuckStudio <[email protected]> Co-authored-by: 鸭鸭「カモ」 <[email protected]> * 🎁应用建议 Co-authored-by: 鸭鸭「カモ」 <[email protected]> * 转移文件位置 * 补充索引 --------- Co-authored-by: 鸭鸭「カモ」 <[email protected]>
1 parent 3e181ab commit 5fe8df4

File tree

2 files changed

+119
-3
lines changed

2 files changed

+119
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
<img alt="Banner" src="https://svg-banners.vercel.app/api?type=rainbow&text1=GitHub%20Labels%20Manager&width=800&height=400" style="text-align: center;">
66

7+
[中文](https://github.com/DuckDuckStudio/GitHub-Labels-Manager/blob/main/README.md) | [English](https://github.com/DuckDuckStudio/GitHub-Labels-Manager/blob/main/other-languages/en_US/README.md)
8+
79
## 项目简介
810
GLM提供了以下几种功能:
911
- [x] 获取某个仓库的所有标签,并存在指定目录的`labels.json`
1012
- [x] 清空某个仓库的标签 *(需要有repo权限的token)*
11-
- [x] 依据指定的**json**文件设置某个仓库的标签 *(先清空指定仓库后再设置,需要有repo权限的token)*
12-
- [x] 复制某个仓库的标签到另一个仓库 *(先清空指定仓库后再设置,需要有repo权限的token)*
13+
- [x] 依据指定的 **json** 文件设置某个仓库的标签 *(先清空指定仓库的标签后再设置,需要有repo权限的token)*
14+
- [x] 复制某个仓库的标签到另一个仓库 *(先清空指定仓库的标签后再设置,需要有repo权限的token)*
1315

1416
### 关于图标
1517
目前的图标仅作临时使用,后续如有正式设计将会替换。
@@ -84,7 +86,8 @@ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
8486
*请注意,在此之后你将无法再次获取这个Token,请妥善保管Token,不要上传到公共仓库中。*
8587

8688
8. 将Token填入配置文件:
87-
将你的Token填入`config.json`中的`token`中。
89+
将你的Token填入`config.json`中的`token`中。
90+
或者运行`glm config --token <YOUR-TOKEN>`
8891

8992
## 如何获取
9093
[前往Releases页获取](https://github.com/DuckDuckStudio/GitHub-Labels-Manager/releases)

other-languages/en_US/README.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# GitHub Labels Manager (GLM)
2+
3+
*Enjoy your day and let automation do it for you. :)*
4+
5+
<img alt="Banner" src="https://svg-banners.vercel.app/api?type=rainbow&text1=GitHub%20Labels%20Manager&width=800&height=400" style="text-align: center;">
6+
7+
[中文](https://github.com/DuckDuckStudio/GitHub-Labels-Manager/blob/main/README.md) | [English](https://github.com/DuckDuckStudio/GitHub-Labels-Manager/blob/main/other-languages/en_US/README.md)
8+
9+
## Project profile
10+
GLM provides the following functions:
11+
- [x] Gets all the labels for a repository, stored in `labels.json` of the specified directory
12+
- [x] Empty the label of a repository *(token with repo permission required)*
13+
- [x] Set the label of a repository according to the specified **json** file *(empty the specified repository's labels before setting, requires a token with repo permission)*
14+
- [x] Copy the label of one repository to another repository *(empty the specified repository's labels before setting, requires a token with repo permission)*
15+
16+
### About icon
17+
The current icon is for temporary use only and will be replaced if there is a formal design.
18+
19+
> [!TIP]
20+
> If you would like to design a new icon, you can send your design to <[email protected]>. Thank you for supporting this project!
21+
22+
## Before use
23+
### Python
24+
Make sure you have the Python environment on your device.
25+
Run the following command to check the Python version:
26+
27+
```bash
28+
python --version
29+
```
30+
31+
You might see output like this:
32+
33+
```
34+
C:\Users\user_name>python --version
35+
Python 3.12.0
36+
```
37+
38+
#### Install Required Libraries
39+
After cd into the project directory, run the following command:
40+
```powershell
41+
# Create a virtual environment
42+
python -m venv .venv
43+
# Activate the virtual environment
44+
.venv\Scripts\Activate.ps1
45+
# Install required libraries
46+
pip install -r requirements.txt
47+
```
48+
49+
> [!TIP]
50+
> Programs obtained using winget do not need to set this.
51+
52+
### Token
53+
You need a GitHub Token to run some of the features.
54+
55+
> [!TIP]
56+
> Official document → [Managing your personal access tokens - GitHub Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#%E5%88%9B%E5%BB%BA-personal-access-token-classic)
57+
58+
Follow these steps to get a GitHub Token:
59+
60+
1. Sign in to GitHub:
61+
Open GitHub and sign in to your account.
62+
63+
2. Navigate to Settings:
64+
Click on your profile icon in the top right corner, then select "**Settings**".
65+
66+
3. Go to Token settings:
67+
In the left sidebar, click on "**Developer settings**".
68+
Then in the left sidebar again, locate and expand "**Personal access tokens**".
69+
Select "**Tokens (classic)**" under "**Personal access tokens**".
70+
71+
4. Generate a new Token:
72+
Click on "**Generate new token**" in the upper right corner.
73+
Choose "**Generate new token (classic)**".
74+
75+
5. Fill in Token details:
76+
Fill in the form as follows:
77+
Note → Name your token.
78+
Expiration → Choose "No expiration" if you want the token to never expire.
79+
Select scopes → Select **repo** for the token's scope.
80+
81+
6. Generate the Token:
82+
Click the green button at the bottom ("Generate token").
83+
84+
7. Copy the generated Token:
85+
*Note: You won't be able to see this Token again, so make sure to store it securely and do not upload it to public repositories.*
86+
87+
8. Insert the Token into your configuration file:
88+
Paste your Token into the `token` field in the `config.json`.
89+
Or run `glm config --token <YOUR-TOKEN>`
90+
91+
## How to get the program
92+
Please [go to the Releases page](https://github.com/DuckDuckStudio/GitHub-Labels-Manager/releases).
93+
94+
### Using winget
95+
Run the following command:
96+
```powershell
97+
winget install DuckStudio.GitHubLabelsManager
98+
```
99+
100+
> [!TIP]
101+
> If the supported version number is *n*, $1.1 \leqslant n \leqslant 1.2$
102+
103+
## How to use
104+
Run the following command for help:
105+
```powershell
106+
glm --help # winget or packaged program
107+
python glm.py --help # source code
108+
```
109+
Get help for subcommands:
110+
```powershell
111+
glm <command> --help # winget or packaged program
112+
python glm.py <command> --help # source code
113+
```

0 commit comments

Comments
 (0)