test-mdbook/scr.py

38 lines
817 B
Python
Raw Normal View History

2023-06-12 17:51:12 +10:00
import sys
import os
if len(sys.argv) > 1:
path = f"book/src/images/{sys.argv[1]}"
# Check whether the specified path exists or not
isExist = os.path.exists(path)
if not isExist:
# Create a new directory because it does not exist
os.makedirs(path)
print("The new directory is created!")
else:
print('dir exists already.')
print(f"""
----
### {sys.argv[1]}
#### [etymonline.com / {sys.argv[1]}](https://www.etymonline.com/word/{sys.argv[1]})
#### [merriam-webster.com / {sys.argv[1]}](https://www.merriam-webster.com/dictionary/{sys.argv[1]})
![by years](images/{sys.argv[1]}/years.png)
Ориентировочно появилось: _
from Latin: _
применимо к: _
2023-06-12 17:52:09 +10:00
примерное русское описание:
_
2023-06-12 17:51:12 +10:00
----
""")