Skip to content

Commit 0f3d38a

Browse files
committed
ci: update release.yaml and README.md
1 parent 7511a34 commit 0f3d38a

File tree

4 files changed

+127
-22
lines changed

4 files changed

+127
-22
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
echo "message=$(git tag -l --format='%(contents:subject)' ${{ steps.get_version.outputs.version }})" >> $GITHUB_OUTPUT
2525
2626
- name: Change version
27-
run: sed -i -e "s/0\.1\.0/${{ steps.get_version.outputs.version-without-v }}/" src/info.json
27+
run: |
28+
OLD_VERSION=$(grep '"version":' src/info.json | awk -F\" '{print $4}')
29+
sed -i "s/$OLD_VERSION/${{ steps.get_version.outputs.version-without-v }}/" src/info.json
2830
2931
- name: Package plugin
3032
run: mkdir release && zip -j -r release/openai-polisher-${{ steps.get_version.outputs.version-without-v }}.bobplugin ./src/*
@@ -33,14 +35,13 @@ jobs:
3335

3436
- name: Update appcast.json
3537
run: |
36-
python3 scripts/update_appcast.py ${{ steps.get_version.outputs.version-without-v }} '${{ steps.tag.outputs.message }}'
38+
python3 scripts/update_release.py ${{ steps.get_version.outputs.version-without-v }} '${{ steps.tag.outputs.message }}'
3739
3840
- name: Commit files
3941
run: |
40-
git config --global user.name 'yetone'
41-
git config --global user.email '[email protected]'
42-
git add .
43-
git commit -am 'update appcast.json'
42+
git config --global user.name 'Bryan Lee'
43+
git config --global user.email '[email protected]'
44+
git commit -am 'chore: update appcast.json and info.json'
4445
4546
- name: Push changes
4647
uses: ad-m/github-push-action@master

README.md

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,62 @@
1-
OpenAI Polisher Bob Plugin
2-
----------------------------
3-
4-
# 简介
1+
<h4 align="right">
2+
<strong>简体中文</strong> | <a href="https://github.com/openai-translator/bob-plugin-openai-polisher/blob/main/docs/README_EN.md">English</a>
3+
</h4>
4+
5+
<div>
6+
<h1 align="center">OpenAI Polisher Bob Plugin</h1>
7+
<p align="center">
8+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases" target="_blank">
9+
<img src="https://github.com/openai-translator/bob-plugin-openai-polisher/actions/workflows/release.yaml/badge.svg" alt="release">
10+
</a>
11+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases">
12+
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/openai-translator/bob-plugin-openai-polisher?style=flat">
13+
</a>
14+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases">
15+
<img alt="GitHub Repo stars" src="https://img.shields.io/badge/OpenAI-Bob-brightgreen?style=flat">
16+
</a>
17+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases">
18+
<img alt="GitHub Repo stars" src="https://img.shields.io/badge/Langurage-JavaScript-brightgreen?style=flat&color=blue">
19+
</a>
20+
</p>
21+
</div>
22+
23+
24+
> **Note**
25+
>
26+
> 重要更新:非 macOS 用户可以使用我开发的基于 ChatGPT API 的划词翻译浏览器插件(支持语法润色) [openai-translator](https://github.com/yetone/openai-translator) 以解燃眉之急。
27+
28+
## 演示
29+
30+
![demo](https://user-images.githubusercontent.com/1206493/222710761-bbd5ce10-2b12-42c0-abfa-5a3152157cb2.gif)
31+
32+
## 简介
533

634
ChatGPT 向我们展示了 GPT 模型的伟大之处,所以我使用 ChatGPT 的 API 实现了这个用来给语言润色和语法纠错的 Bob 插件,效果拔群!完美替代 Grammarly!
735

8-
# 使用截图
36+
## 使用方法
937

10-
![](https://user-images.githubusercontent.com/1206493/222710761-bbd5ce10-2b12-42c0-abfa-5a3152157cb2.gif)
38+
1. 安装 [Bob](https://bobtranslate.com/guide/#%E5%AE%89%E8%A3%85) (版本 >= 0.50),一款 macOS 平台的翻译和 OCR 软件
1139

12-
# 使用方法
40+
2. 下载此插件: [openai-polisher.bobplugin](https://github.com/openai-translator/bob-plugin-openai-polisher/releases/latest)
1341

14-
1. 安装 [Bob](https://bobtranslate.com/guide/#%E5%AE%89%E8%A3%85) (版本 >= 0.50)
15-
2. 下载此插件: [openai-polisher.bobplugin](https://github.com/yetone/bob-plugin-openai-polisher/releases)
1642
3. 安装此插件:
17-
18-
![](https://user-images.githubusercontent.com/1206493/222712959-4a4b27e2-b129-408a-a8af-24a3a89df2dd.gif)
43+
![安装步骤](https://user-images.githubusercontent.com/1206493/222712959-4a4b27e2-b129-408a-a8af-24a3a89df2dd.gif)
1944

2045
4.[OpenAI](https://platform.openai.com/account/api-keys) 获取你的 API KEY
21-
5. 把 API KEY 填入 Bob 此插件配置界面的 API KEY
22-
输入框中
2346

24-
![](https://user-images.githubusercontent.com/1206493/222712982-5c5598b0-8560-422f-837f-3ffd08a39f81.gif)
47+
5. 把 API KEY 填入 Bob 偏好设置 > 服务 > 此插件配置界面的 API KEY 的输入框中
48+
![设置步骤](https://user-images.githubusercontent.com/1206493/222712982-5c5598b0-8560-422f-837f-3ffd08a39f81.gif)
49+
50+
6. 安装 [PopClip](https://bobtranslate.com/guide/integration/popclip.html) 实现划词后鼠标附近出现悬浮图标
51+
![PopClip](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
52+
53+
## 感谢
54+
55+
我这只是个小小的 Bob 插件,强大的是 Bob 本身,向它的开发者 [ripperhe](https://github.com/ripperhe) 致敬!
2556

26-
6. 安装 [PopClip](https://bobtranslate.com/guide/integration/popclip.html) 实现划词后鼠标附近出现小图标
57+
### 请作者喝一杯咖啡
2758

28-
![](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
59+
<div align="center">
60+
<img height="360" src="https://user-images.githubusercontent.com/1206493/220753437-90e4039c-d95f-4b6a-9a08-b3d6de13211f.png" />
61+
<img height="360" src="https://user-images.githubusercontent.com/1206493/220756036-d9ac4512-0375-4a32-8c2e-8697021058a2.png" />
62+
</div>

docs/README_EN.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<h4 align="right">
2+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/blob/main/README.md">简体中文</a> | <strong>English</strong>
3+
</h4>
4+
5+
<div>
6+
<h1 align="center">OpenAI Polisher Bob Plugin</h1>
7+
<p align="center">
8+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases" target="_blank">
9+
<img src="https://github.com/openai-translator/bob-plugin-openai-polisher/actions/workflows/release.yaml/badge.svg" alt="release">
10+
</a>
11+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases">
12+
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/openai-translator/bob-plugin-openai-polisher?style=flat">
13+
</a>
14+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases">
15+
<img alt="GitHub Repo stars" src="https://img.shields.io/badge/OpenAI-Bob-brightgreen?style=flat">
16+
</a>
17+
<a href="https://github.com/openai-translator/bob-plugin-openai-polisher/releases">
18+
<img alt="GitHub Repo stars" src="https://img.shields.io/badge/Langurage-JavaScript-brightgreen?style=flat&color=blue">
19+
</a>
20+
</p>
21+
</div>
22+
23+
> **Note**
24+
>
25+
> Important update: Non-macOS users can use my browser extension based on ChatGPT API for language polishing [openai-translator](https://github.com/openai-translator/openai-translator) to solve urgent needs.
26+
27+
28+
## Demonstration
29+
30+
![demo](https://user-images.githubusercontent.com/1206493/222710761-bbd5ce10-2b12-42c0-abfa-5a3152157cb2.gif)
31+
32+
## Introduction
33+
34+
ChatGPT has shown us the greatness of the GPT model, so I used ChatGPT's API to create this Bob plugin for language refinement and grammar correction. The effect is outstanding! It's a perfect replacement for Grammarly!
35+
36+
## Usage
37+
38+
1. Install [Bob](https://bobtranslate.com/guide/#%E5%AE%89%E8%A3%85) (version >= 0.50), a macOS translation and OCR software
39+
40+
2. Download this plugin: [openai-polisher.bobplugin](https://github.com/openai-translator/bob-plugin-openai-polisher/releases/latest)
41+
42+
3. Install this plugin:
43+
![Installation Steps](https://user-images.githubusercontent.com/1206493/222712959-4a4b27e2-b129-408a-a8af-24a3a89df2dd.gif)
44+
45+
4. Get your API KEY from [OpenAI](https://platform.openai.com/account/api-keys)
46+
47+
5. Enter the API KEY in Bob Preferences > Services > This plugin configuration interface's API KEY input box:
48+
![Settings Steps](https://user-images.githubusercontent.com/1206493/222712982-5c5598b0-8560-422f-837f-3ffd08a39f81.gif)
49+
50+
6. Install [PopClip](https://bobtranslate.com/guide/integration/popclip.html) for highlighted text mouse proximity floating icon:
51+
![PopClip](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
52+
53+
## Thanks
54+
55+
I'm just a small Bob plugin, and the powerful part is Bob itself. I pay tribute to its developer [ripperhe](https://github.com/ripperhe)!
56+
57+
### Buy me a coffee
58+
59+
<div align="center">
60+
<img height="360" src="https://user-images.githubusercontent.com/1206493/220753437-90e4039c-d95f-4b6a-9a08-b3d6de13211f.png" />
61+
<img height="360" src="https://user-images.githubusercontent.com/1206493/220756036-d9ac4512-0375-4a32-8c2e-8697021058a2.png" />
62+
</div>

scripts/update_appcast.py renamed to scripts/update_release.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@ def update_appcast(version, desc):
2727
with open(appcast_file, 'w') as f:
2828
json.dump(appcast, f, ensure_ascii=False, indent=2)
2929

30+
def update_info_json(version):
31+
info_file = Path('src/info.json')
32+
with open(info_file, 'r') as f:
33+
info = json.load(f)
34+
info['version'] = version
35+
with open(info_file, 'w') as f:
36+
json.dump(info, f, ensure_ascii=False, indent=2)
3037

3138
if __name__ == '__main__':
3239
version = sys.argv[1]
3340
desc = sys.argv[2]
3441
update_appcast(version, desc)
42+
update_info_json(version)

0 commit comments

Comments
 (0)