36 lines
815 B
Python
36 lines
815 B
Python
|
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: _
|
||
|
|
||
|
применимо к: _
|
||
|
|
||
|
примерное русское описание: _
|
||
|
|
||
|
----
|
||
|
""")
|