Files
md_to_gost/md2gost/__init__.py
T
Igor20264 b38661f588
Python application / build (push) Has been cancelled
Update 0.4.0
- Add\Rework UI
- Add Split Table and Listing
- Add Support Customazeble schems
2026-09-04 22:28:39 +03:00

18 lines
601 B
Python

"""md2gost — Markdown → DOCX (MIREA TZ / GOST)."""
import os
import sys
def package_dir() -> str:
"""Directory of the md2gost package (Template.docx, mml2omml, etc.)."""
if getattr(sys, "frozen", False):
meipass = getattr(sys, "_MEIPASS", None)
if meipass:
bundled = os.path.join(meipass, "md2gost")
if os.path.isfile(os.path.join(bundled, "Template.docx")):
return bundled
if os.path.isfile(os.path.join(meipass, "Template.docx")):
return meipass
return os.path.dirname(os.path.abspath(__file__))