@@ -65,6 +65,13 @@ def first_markdown(paths: list[str]) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
def first_docx(paths: list[str]) -> str | None:
|
||||
for path in paths:
|
||||
if path.lower().endswith(".docx") and os.path.isfile(path):
|
||||
return path
|
||||
return None
|
||||
|
||||
|
||||
def enable_file_drop(widget, callback: DropCallback) -> str:
|
||||
"""Enable dropping files onto widget. Returns backend name: tkdnd | win32 | none."""
|
||||
def _deliver(items: list[str] | str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user