Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ytsteven committed Mar 28, 2023
1 parent aac2b68 commit 7a51d52
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 146 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: sed -i -e "s/0\.1\.0/${{ steps.get_version.outputs.version-without-v }}/" src/info.json

- name: Package plugin
run: mkdir release && zip -j -r release/openai-translator-${{ steps.get_version.outputs.version-without-v }}.bobplugin ./src/*
run: mkdir release && zip -j -r release/openai-translator-${{ steps.get_version.outputs.version-without-v }}.aiplugin ./src/*

- run: git checkout -- src/

Expand All @@ -37,8 +37,8 @@ jobs:
- name: Commit files
run: |
git config --global user.name 'yetone'
git config --global user.email 'yetoneful@gmail.com'
git config --global user.name 'ytsteven'
git config --global user.email 'yt1647605516@gmail.com'
git add .
git commit -am 'update appcast.json'
Expand All @@ -52,8 +52,8 @@ jobs:
with:
release_name: ${{ steps.get_version.outputs.version }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/openai-translator-${{ steps.get_version.outputs.version-without-v }}.bobplugin
asset_name: openai-translator-${{ steps.get_version.outputs.version-without-v }}.bobplugin
file: release/openai-translator-${{ steps.get_version.outputs.version-without-v }}.aiplugin
asset_name: openai-translator-${{ steps.get_version.outputs.version-without-v }}.aiplugin
tag: ${{ github.ref }}
overwrite: true
body: ${{ steps.tag.outputs.message }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.bobplugin
release
*.aiplugin
136 changes: 5 additions & 131 deletions appcast.json
Original file line number Diff line number Diff line change
@@ -1,138 +1,12 @@
{
"identifier": "yetone.openai.translator",
"identifier": "ytsteven.openai.translator",
"versions": [
{
"version": "0.2.6",
"desc": "Fix incorrect polishing result",
"sha256": "3cfbcd66d47ef41a9842d3d4e8bf156e9879842b8134f5d075aaa1cb8cc45b87",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.6/openai-translator-0.2.6.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.2.5",
"desc": "Improve the prompt to avoid many failed translation cases.",
"sha256": "dd846ab0e9ec23fb23fc0829174d0bb8006da60dbc2742cd09da73b3f0d54d38",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.5/openai-translator-0.2.5.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.2.4",
"desc": "Support specify the OpenAI domain",
"sha256": "0b46246db77c3f714b9fed703204e4d558d275805e61d6a369b94ac3a0b3461f",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.4/openai-translator-0.2.4.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.2.3",
"desc": "optimize: save token count",
"sha256": "31823ea32290783939ad5f69ea48137816479c127278664d741bfbc352ab2182",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.3/openai-translator-0.2.3.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.2.2",
"desc": "Remove Chinese quotation marks prefix and suffix.",
"sha256": "eecf1248874f3b71a5884405d17c82320e0a3770af6dafe7249bad33defb567c",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.2/openai-translator-0.2.2.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.2.1",
"desc": "Fixed an issue with some sentences not translating",
"sha256": "8b847e9a33b2278d6ee8894e99c767f53166ab683e075a8ea5f6b43c5de7ef1f",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.1/openai-translator-0.2.1.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.2.0",
"desc": "With the ability to use Grammarly, you can polish your sentences and correct grammar errors!",
"sha256": "ee2165c49e82ffe553c66dff732b3ff8f2e9807b6e08629bba91f0827975147b",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.2.0/openai-translator-0.2.0.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.1.4",
"desc": "Recommend gpt-3.5-turbo model",
"sha256": "56c56ff74e8902317b5554a29ecbb906f54bd0b48cc08e48d44ec3425efc7592",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.1.4/openai-translator-0.1.4.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.1.3",
"desc": "Fine-tune the prompt to eliminate unnecessary symbols in the translation result.",
"sha256": "99a41cd9cb660c0389463dde5bf3c1a3077c3d45a54eec94b48f90927902fe25",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.1.3/openai-translator-0.1.3.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.1.2",
"desc": "Support Classical Chinese to Simple Chinese",
"sha256": "61f270491fd8b46cb67ae62c7fdec8aaa8d2e5942364b9ddb051621e18caecf9",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.1.2/openai-translator-0.1.2.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.1.1",
"desc": "Fix buggy ChatGPT model detection logic",
"sha256": "a2831405a2c2e5381ef89a9af2636a396645159b8f7e40294d77c209683b4e8d",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.1.1/openai-translator-0.1.1.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.1.0",
"desc": "feat: support ChatGPT API!!! Please change the model to \"gpt-3.5-turbo\" or \"gpt-3.5-turbo-0301\"",
"sha256": "9f08257b46f864f514b1963f27fc240db654c355eb9bae3c25feef8b177202c4",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.1.0/openai-translator-0.1.0.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.12",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.12",
"sha256": "ce9f60c9a9282c083459af55719521cb7abd9b618681674290fe26f3d78b2b75",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.12/openai-translator-0.0.12.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.11",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.11",
"sha256": "a274fe29119ce4a5a4fb522f79f71db5a0867befd12d807a7f14d15643dc3481",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.11/openai-translator-0.0.11.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.10",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.10",
"sha256": "784c9c304a2b4b76aa6abd023dd897c29924331a9b29ecc7cadb60a18d48f8b5",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.10/openai-translator-0.0.10.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.9",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.9",
"sha256": "57e07d15a5654abf41ade482b0f76d024b371dc40de4df8cb80f3d93530b1811",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.9/openai-translator-0.0.9.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.8",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.8",
"sha256": "a5acb2971f31fd5989092ead4ed21757d409256ad5c3a0ca80d9ee1db8450a09",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.8/openai-translator-0.0.8.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.7",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.7",
"sha256": "a2738659384fde997ce222655a841ac7f2184e702a1eb7230071c7edbb4d7214",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.7/openai-translator-0.0.7.bobplugin",
"minBobVersion": "0.5.0"
},
{
"version": "0.0.6",
"desc": "https://github.com/yetone/bob-plugin-openai-translator/releases/tag/v0.0.6",
"sha256": "979a3db1a4ebde0475a79b267f8d05f7f940f38325daabdf0cecb73030102ca6",
"url": "https://github.com/yetone/bob-plugin-openai-translator/releases/download/v0.0.6/openai-translator-0.0.6.bobplugin",
"minBobVersion": "0.5.0"
"desc": "init",
"sha256": "bc2038954f4031c520b6dca37e0b45724c9eaf7aff02ad6490077906d54f8282",
"url": "https://github.com/ytsteven/easyuseai-plugin-openai-translator/releases/download/v0.1.0/openai-translator-0.1.0.aiplugin",
"minVersion": "0.4.0"
}
]
}
8 changes: 4 additions & 4 deletions scripts/update_appcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def update_appcast(version, desc):
release_file = Path(f'release/openai-translator-{version}.bobplugin')
release_file = Path(f'release/openai-translator-{version}.aiplugin')
assert release_file.is_file(), 'Release file not exist'
with open(release_file, 'rb') as f:
c = f.read()
Expand All @@ -14,15 +14,15 @@ def update_appcast(version, desc):
'version': version,
'desc': desc,
'sha256': file_hash,
'url': f'https://github.com/yetone/bob-plugin-openai-translator/releases/download/v{version}/{release_file.name}',
'minBobVersion': '0.5.0'
'url': f'https://github.com/ytsteven/easyuseai-plugin-openai-translator/releases/download/v{version}/{release_file.name}',
'minVersion': '0.4.0'
}
appcast_file = Path('appcast.json')
if appcast_file.is_file():
with open(appcast_file, 'r') as f:
appcast = json.load(f)
else:
appcast = dict(identifier='yetone.openai.translator', versions=[])
appcast = dict(identifier='ytsteven.openai.translator', versions=[])
appcast['versions'].insert(0, version_info)
with open(appcast_file, 'w') as f:
json.dump(appcast, f, ensure_ascii=False, indent=2)
Expand Down
1 change: 1 addition & 0 deletions scripts/update_appcast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3 scripts/update_appcast.py 0.2.6 init
1 change: 1 addition & 0 deletions scripts/zip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zip -j -r release/openai-translator-0.1.0.aiplugin ./src/*
10 changes: 5 additions & 5 deletions src/info.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"identifier": "yetone.openai.translator",
"identifier": "ytsteven.openai.translator",
"version": "0.2.6",
"category": "translate",
"name": "OpenAI Translator",
"summary": "GPT powered translator",
"icon": "",
"author": "yetone <yetoneful@gmail.com>",
"homepage": "https://github.com/yetone/bob-plugin-openai-translator",
"appcast": "https://raw.githubusercontent.com/yetone/bob-plugin-openai-translator/main/appcast.json",
"minBobVersion": "0.5.0",
"author": "yt1647605516@gmail.com",
"homepage": "https://github.com/ytsteven/easyuseai-plugin-openai-translator",
"appcast": "https://raw.githubusercontent.com/ytsteven/easyuseai-plugin-openai-translator/main/appcast.json",
"minVersion": "0.4.0",
"options": [
{
"identifier": "api_url",
Expand Down

0 comments on commit 7a51d52

Please sign in to comment.