diff --git a/fugashi_parser.py b/fugashi_parser.py index 62addd5..b048ba5 100644 --- a/fugashi_parser.py +++ b/fugashi_parser.py @@ -363,10 +363,10 @@ def analyze(text: str, vocab: Dict[str, Dict]): } def write_word_note(word: str, destination_dir: Path): - if Path(destination_dir.joinpath('/' + word + '.md')).exists() == False: + if Path(destination_dir.joinpath(word + '.md')).exists() == False: definitions = anki_fields_term(word) if definitions.get("fields"): - with open(destination_dir.as_posix() + '/' + word + '.md', 'w') as vocab_note: + with open(destination_dir.joinpath(word + '.md'), 'w') as vocab_note: for entry in definitions.get("fields"): #vocab_note.write("\n") #print(entry['expression'], file=vocab_note) diff --git a/subtitle_processor.py b/subtitle_processor.py index cce1dd1..646061b 100644 --- a/subtitle_processor.py +++ b/subtitle_processor.py @@ -85,6 +85,7 @@ def main(): ## Lookup vocab for word in vocab: write_word_note(word, destination_path) + return # with open("/run/media/deck/YF8SD/Video/Yu-Gi-Oh! Duel Monsters - 001.vtt", "w", encoding="utf-8") as f: # f.writelines(lines)