2023-11-20 23:08:10 +08:00
|
|
|
import os
|
|
|
|
|
2023-11-21 21:48:54 +08:00
|
|
|
from app.decrypt import dat2pic
|
2023-11-20 23:08:10 +08:00
|
|
|
from app.person import MePC
|
|
|
|
|
2023-11-21 21:48:54 +08:00
|
|
|
if not os.path.exists('./data/image'):
|
|
|
|
os.mkdir('./data/image')
|
|
|
|
|
2023-11-20 23:08:10 +08:00
|
|
|
|
|
|
|
def get_abs_path(path):
|
2023-11-21 21:48:54 +08:00
|
|
|
# return os.path.join(os.getcwd(), 'app/data/icons/404.png')
|
2023-11-20 23:08:10 +08:00
|
|
|
if path:
|
2023-11-21 21:48:54 +08:00
|
|
|
# if os.path.exists(os.path.join())
|
|
|
|
output_path = dat2pic.decode_dat(os.path.join(MePC().wx_dir, path), './data/image')
|
|
|
|
return output_path
|
2023-11-20 23:08:10 +08:00
|
|
|
else:
|
|
|
|
return os.path.join(os.getcwd(), 'app/data/icons/404.png')
|