Skip to content

Commit

Permalink
fix: listen to audio display + ci (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajite authored Oct 17, 2023
1 parent 156a0a6 commit 14f4bb0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,3 @@ jobs:
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi:
needs: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
concurrency: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build PyPi

# Only trigger, when the build workflow succeeded
on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
pypi:
concurrency: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions hebikani/hebikani.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ def process_answer(self, question: Question, answer_type: AnswerType):
elif answer_type == AnswerType.INEXACT:
print(
"\nTry again. We are looking for the",
f"{question.primary.type}.",
f"{question.primary.type}.\n",
)
# If the user answers incorrectly, we show the correct answer
else:
Expand Down Expand Up @@ -1414,7 +1414,7 @@ def ask_audio(self, question: Question):
and question.question_type == QuestionType.READING
and (
self.client.options.autoplay
or input("Would you like to hear the audio? [y/N] ") in ["y", "Y"]
or input("\nWould you like to hear the audio? [y/N] ") in ["y", "Y"]
)
):
audio = self.select_audio(question.subject.audios)
Expand Down

0 comments on commit 14f4bb0

Please sign in to comment.