mirror of
https://github.com/Ascyii/typstar.git
synced 2026-01-01 13:34:24 -05:00
fix(anki): external resources in flashcards
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user