Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readmeの更新 #100

Merged
merged 4 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/link-pr-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,28 @@ name: Link PR to Issue
on:
pull_request:
types: [opened]
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request number'
required: true

jobs:
link_pr_to_issue:
runs-on: ubuntu-latest
steps:
- name: Extract issue number from branch name
id: extract-issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH_NAME="${{ github.head_ref }}"
ISSUE_NUMBER=$(echo $BRANCH_NAME | grep -oP 'issue-\K\d+')
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
PR_NUMBER="${{ github.event.inputs.pr_number }}"
BRANCH_NAME=$(gh pr view $PR_NUMBER --json headRefName -q .headRefName)
else
BRANCH_NAME="${{ github.head_ref }}"
fi
Comment on lines +18 to +26

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

インデントが不揃いです。envrunのインデントを修正してください。

-         env:
+          env:
-          run: |
+           run: |

ISSUE_NUMBER=$(echo $BRANCH_NAME | grep -oP 'issue-\K\d+' || true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

grep -oPは、-Pオプションを使用してPerl互換の正規表現を有効にしていますが、これはすべての環境でサポートされているわけではありません。より広くサポートされている方法として、grep -Eを使用することをお勧めします。

-           ISSUE_NUMBER=$(echo $BRANCH_NAME | grep -oP 'issue-\K\d+' || true)
+           ISSUE_NUMBER=$(echo $BRANCH_NAME | grep -Eo 'issue-[0-9]+' | cut -d'-' -f2 || true)

Comment on lines +21 to +27

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

gh pr viewコマンドの実行に失敗した場合、スクリプトがエラーで停止する可能性があります。これを防ぐために、エラーハンドリングを追加することをお勧めします。

+            set -e
             if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
               PR_NUMBER="${{ github.event.inputs.pr_number }}"
+              BRANCH_NAME=$(gh pr view $PR_NUMBER --json headRefName -q .headRefName || echo "")
             else
               BRANCH_NAME="${{ github.head_ref }}"
             fi
             ISSUE_NUMBER=$(echo $BRANCH_NAME | grep -oP 'issue-\K\d+' || true)

if [ -z "$ISSUE_NUMBER" ]; then
echo "No issue number found in branch name. Workflow will exit."
exit 0
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# EveEve プロジェクト

## 概要
EveEve(Everyone Translate Everything)は、インターネットに公開されているテキストに高品質な対訳を付与し、読みやすいレイアウトで提供することを目指すオープンソースプロジェクトです。このプロジェクトの目的は、世界中の人々に、物語と知識への扉を開くことです。
EveEve(Everyone Translate Everything)は、インターネットに公開されているテキストに、対訳、脚注、解説を付け、美しいレイアウトで提供し、人々の理解を促進することを目指すオープンソースプロジェクトです。このプロジェクトの目的は、世界中の人々に、物語と知識への扉を開くことです。

## プロジェクト名の由来
「EveEve」は "Everyone Translate Everything" の略です。この名前は、世界中の人々が協力して、あらゆるテキストを翻訳し、知識を共有するというプロジェクトの理念を体現しています。

## 現在の機能
- 基本的なHTML翻訳機能
- HTML翻訳
- LLM(大規模言語モデル)を使用した翻訳
- シンプルなウェブインターフェース
- 翻訳結果の保存
- 翻訳結果の共有
- 翻訳結果への投票
- 翻訳の投稿
- リーダーモード

## 開発中の機能
- 読みやすいレイアウト:対訳を見やすく配置(改善中)
- コミュニティによる翻訳品質の向上システム(開発中)
- 脚注の追加(計画段階)
- ハイライト機能(計画段階)
- 複数フォーマット対応:HTML、PDF、EPUB、プレーンテキスト(計画段階)
Expand Down
Loading