b38661f588
Python application / build (push) Has been cancelled
- Add\Rework UI - Add Split Table and Listing - Add Support Customazeble schems
18 lines
601 B
Python
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__))
|