Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/pathexist.py

26 lines
548 B
Python
Raw Normal View History

2020-06-13 12:43:43 +00:00
import os
import re
from os.path import abspath
2020-08-12 16:01:34 +00:00
2020-06-13 12:43:43 +00:00
def pathexist(ss):
2020-08-12 16:01:34 +00:00
ss = re.sub('_', '', ss)
d = abspath('./assests/Favicon/' + ss + '/')
2020-06-13 12:43:43 +00:00
if not os.path.exists(d):
os.mkdir(d)
else:
pass
ddd = abspath('./assests/Favicon/' + ss + '/Wiki.png')
2020-06-13 12:43:43 +00:00
if not os.path.exists(ddd):
return False
else:
return True
2020-08-12 16:01:34 +00:00
2020-06-13 12:43:43 +00:00
def pathexist2(ss):
ddd = abspath('./home/wdljt/oasisakari/bot/assests/usercard/' + ss + '.png')
2020-06-13 12:43:43 +00:00
if not os.path.exists(ddd):
return False
else:
return True