mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-22 03:59:15 +00:00
13 lines
296 B
Python
13 lines
296 B
Python
|
import re
|
||
|
|
||
|
|
||
|
def get_version():
|
||
|
with open("pagermaid/__init__.py", "r", encoding="utf-8") as f:
|
||
|
if version_match := re.search(r'pgm_version = "(.*?)"', f.read()):
|
||
|
return version_match[1]
|
||
|
raise FileNotFoundError
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
print(get_version())
|