Skip to content

Commit

Permalink
Merge pull request #202 from ensan-hcl/refactoring/add_setup_sh
Browse files Browse the repository at this point in the history
[Refactoring] setupスクリプトを追加
  • Loading branch information
ensan-hcl authored May 27, 2023
2 parents 2bab4ab + 8cacac9 commit d7d8e5e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
AzooKey-dict
Package.resolved
*.DS_Store
__MACOSX/

# Xcode settings
# Created by https://www.toptal.com/developers/gitignore/api/xcode
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ azooKeyは[App Store](https://apps.apple.com/jp/app/azookey-%E8%87%AA%E7%94%B1%E

Apple Developer Account(無料)が必要です。開発環境は最新のXcodeを利用してください。

1. [Google DriveからazooKeyの辞書をダウンロードします](https://drive.google.com/drive/folders/1Kh7fgMFIzkpg7YwP3GhWTxFkXI-yzT9E?usp=sharing)。最新バージョンのフォルダの中にある「`Dictionary`」というフォルダを右クリックし、フォルダごとダウンロードします。ついで、`Keyboard/`配下に`Dictionary`フォルダを配置してください。上書きして構いません。
1. `setup.sh`を実行してください。[Google Drive](https://drive.google.com/drive/folders/1Kh7fgMFIzkpg7YwP3GhWTxFkXI-yzT9E?usp=sharing)から辞書ファイルがダウンロードされます。

```bash
sh setup.sh
```

1. `azooKey.xcodeproj`を開き、Xcodeの指示に従って「Run (Command+R)」を実行してください。

Expand All @@ -23,6 +27,10 @@ Apple Developer Account(無料)が必要です。開発環境は最新のXco
### テスト方法
[Document](docs/tests.md)をご覧ください。

### 辞書の変更

azooKeyの辞書ファイルは任意に置き換えることができます。過去のバージョンの辞書を利用するには、[Google DriveからazooKeyの辞書をダウンロードします](https://drive.google.com/drive/folders/1Kh7fgMFIzkpg7YwP3GhWTxFkXI-yzT9E?usp=sharing)。任意のバージョンのフォルダの中にある「`Dictionary`」というフォルダを右クリックし、フォルダごとダウンロードします。ついで、`Keyboard/`配下に`Dictionary`フォルダを配置してください。上書きして構いません。

### さらに詳しく

`docs/`内の[Document](./docs/overview.md)をご覧ください。
Expand Down
22 changes: 22 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -e

if ! command -v gdown &> /dev/null; then
echo "gdown is not installed. Installing..."
pip install gdown
fi

gdown --id 1ImBsHiZILYBYno4L0xvb0RfdXPKzeV_D --output Keyboard/latest_dic.zip

if [ -f "Keyboard/Dictionary" ]; then
echo "Removing Source/Dictionary..."
rm -r "Keyboard/Dictionary"
fi

echo "Extracting latest_dic.zip..."
unzip -o "Keyboard/latest_dic.zip" -d "Keyboard/"

rm Keyboard/latest_dic.zip


0 comments on commit d7d8e5e

Please sign in to comment.