Skip to content
Open
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "00:00"
timezone: America/Chicago
open-pull-requests-limit: 10
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependabot auto-merge
on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion sound.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import time
Expand Down
2 changes: 1 addition & 1 deletion tts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from gtts import gTTS
Expand Down
12 changes: 6 additions & 6 deletions twitchTransFN.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from async_google_trans_new import AsyncTranslator, constant
Expand Down Expand Up @@ -480,18 +480,18 @@ async def event_message(self, msg):
translatedText = (
await asyncio.gather(asyncio.to_thread(deepl.translate, source_language= deepl_lang_dict[lang_detect], target_language=deepl_lang_dict[lang_dest], text=in_text))
)[0]
if config.Debug: print(f'[DeepL Tlanslate]({deepl_lang_dict[lang_detect]} > {deepl_lang_dict[lang_dest]})')
if config.Debug: print(f'[DeepL Translate]({deepl_lang_dict[lang_detect]} > {deepl_lang_dict[lang_dest]})')
else:
if not config.GAS_URL:
try:
translatedText = await translator.translate(in_text, lang_dest)
if config.Debug: print('[Google Tlanslate (google_trans_new)]')
if config.Debug: print('[Google Translate (google_trans_new)]')
except Exception as e:
if config.Debug: print(e)
else:
try:
translatedText = await GAS_Trans(self._http.session, in_text, '', lang_dest)
if config.Debug: print('[Google Tlanslate (Google Apps Script)]')
if config.Debug: print('[Google Translate (Google Apps Script)]')
except Exception as e:
if config.Debug: print(e)
except Exception as e:
Expand All @@ -503,15 +503,15 @@ async def event_message(self, msg):
if not config.GAS_URL:
try:
translatedText = await translator.translate(in_text, lang_dest)
if config.Debug: print('[Google Tlanslate (google_trans_new)]')
if config.Debug: print('[Google Translate (google_trans_new)]')
except Exception as e:
if config.Debug: print(e)

# use GAS ---
else:
try:
translatedText = await GAS_Trans(self._http.session, in_text, '', lang_dest)
if config.Debug: print('[Google Tlanslate (Google Apps Script)]')
if config.Debug: print('[Google Translate (Google Apps Script)]')
except Exception as e:
if config.Debug: print(e)

Expand Down