fix(anki): external resources in flashcards

This commit is contained in:
arne314
2024-12-23 20:22:56 +01:00
parent 1124181f59
commit b0d8031a8e
6 changed files with 41 additions and 102 deletions

View File

@@ -1,3 +1,4 @@
import os.path
from typing import List
import tree_sitter
@@ -11,6 +12,10 @@ class FileHandler:
self.file_path = path
self.read()
@property
def directory_path(self) -> str:
return os.path.dirname(self.file_path)
def get_bytes(self) -> bytes:
return bytes("".join(self.file_content), encoding="utf-8")