YouTube ID を外部に
このコミットが含まれているのは:
+1
-1
@@ -1,4 +1,4 @@
|
||||
/connection.py
|
||||
/__pycache__
|
||||
/nizika_talking.wav
|
||||
|
||||
/youtube.py
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import unicodedata
|
||||
|
||||
|
||||
class CommonModule:
|
||||
@staticmethod
|
||||
def is_wide (c: str) -> bool:
|
||||
return unicodedata.east_asian_width (c) in ['F', 'W', 'A']
|
||||
|
||||
@classmethod
|
||||
def string_width_per_pt (cls, string: str) -> float:
|
||||
return sum ([1 if cls.is_wide (c) else .5
|
||||
for c in string.decode ('utf-8')])
|
||||
|
||||
@@ -8,9 +8,8 @@ from talk import Talk
|
||||
import subprocess
|
||||
from aques import Aques
|
||||
from playsound import playsound
|
||||
|
||||
|
||||
YOUTUBE_ID: str = 'Q0kSYNcu5Xk'
|
||||
from common_module import CommonModule
|
||||
from youtube import *
|
||||
|
||||
|
||||
class Main:
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
YOUTUBE_ID: str = 'XXXXXXXXXXX'
|
||||
|
||||
新しい課題から参照
ユーザをブロックする