diff --git a/.github/workflows/a18n.yml b/.github/workflows/a18n.yml index 0e3524b..be01d64 100644 --- a/.github/workflows/a18n.yml +++ b/.github/workflows/a18n.yml @@ -31,7 +31,7 @@ jobs: - name: Install dependencies run: pip install --upgrade openai - - name: Translate README.md to English + - name: Translate README.zh-CN.md to README.md (English) env: CHATGPT_API_KEY: ${{ secrets.CHATGPT_API_KEY }} CHATGPT_API_BASE: ${{ secrets.CHATGPT_API_BASE }} @@ -52,7 +52,7 @@ jobs: client = OpenAI(api_key=api_key, base_url=base_url or None) - with open("README.md", "r", encoding="utf-8") as f: + with open("README.zh-CN.md", "r", encoding="utf-8") as f: source = f.read() prompt = ( @@ -72,14 +72,14 @@ jobs: ) text = (resp.choices[0].message.content or "").strip() + "\n" - with open("README_EN.md", "w", encoding="utf-8") as f: + with open("README.md", "w", encoding="utf-8") as f: f.write(text) PY - name: Commit and push translated README run: | if git diff --quiet -- README.md; then - echo "README.md is up to date, nothing to commit." + echo "README.md is up to date after translating README.zh-CN.md, nothing to commit." exit 0 fi diff --git a/README.md b/README.md index e571c3b..afe638d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[中文](./README.zh-CN.md) | English +English | [中文](./README.zh-CN.md) ## Directory Structure ```text diff --git a/README.zh-CN.md b/README.zh-CN.md index 86a4254..0b93cfe 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,7 +1,7 @@ -中文 | [English](./README.md) +[English](./README.md) | 中文 ## 目录结构 -``` +```text ./ ├── cache/ ├── config/ @@ -32,19 +32,17 @@ ### 自动安装 理论上可以支持大多数发行版,请自行测试,**运行前务必备份!** -``` -curl -fsSL https://raw.githubusercontent.com/SinclairLin/omz/main/scripts/install_zsh_config.sh -o install_zsh_config.sh -chmod +x install_zsh_config.sh -./install_zsh_config.sh + +```bash +curl -fsSL https://raw.githubusercontent.com/SinclairLin/omz/main/scripts/install_zsh_config.sh | bash ``` > 注意:自动安装脚本会优先使用系统包管理器,Debian stable/oldstable 上部分依赖版本可能偏旧。 > 建议安装后手动检查版本,必要时再单独升级关键依赖。 快速检查: -``` -zsh --version -lua -v + +```bash fzf --version fd --version || fdfind --version ``` @@ -53,18 +51,21 @@ fd --version || fdfind --version #### Requires - `Zsh`,`lua`,`fd` in Arch Linux: -``` + +```bash sudo pacman -S zsh lua fd ``` in Debian: -``` + +```bash sudo apt install zsh lua5.4 fd-find command -v fd >/dev/null 2>&1 || sudo ln -s /usr/bin/fdfind /usr/local/bin/fd ``` in OpenWrt: -``` + +```bash opkg install zsh sed -i 's|:/bin/ash|:/usr/bin/zsh|g' /etc/passwd # 更换默认shell wget https://github.com/sharkdp/fd/releases/download/v10.3.0/fd-v10.3.0-aarch64-unknown-linux-musl.tar.gz @@ -75,19 +76,17 @@ fd --version ``` - fzf -``` + +```bash git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install ``` -- 可选增强工具(版本过旧时建议自行升级) -`eza`/`bat`/`ueberzug`/`img2txt`/`lazygit`/`ranger` - #### source clone 我的配置到`~/.config`: -``` -git clone https://github.com/SinclairLin/omz ~/.config/zsh && \ -echo 'source ~/.config/zsh/omz.zsh' >> ~/.zshrc + +```bash +git clone https://github.com/SinclairLin/omz ~/.config/zsh && echo 'source ~/.config/zsh/omz.zsh' >> ~/.zshrc ``` ## Plugins @@ -107,7 +106,8 @@ echo 'source ~/.config/zsh/omz.zsh' >> ~/.zshrc > 使用`z