Skip to content

Commit

Permalink
Merge pull request #271 from hsyhhssyy/V6-dev
Browse files Browse the repository at this point in the history
加入两个帮助函数获取绝对路径
  • Loading branch information
vivien8261 authored Jun 17, 2024
2 parents 3255505 + c44d1b9 commit 06a32c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/util/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,11 @@ def sorted_dict(data: dict, *args, **kwargs):

def text_to_pinyin(text: str):
return ''.join([item[0] for item in pypinyin.pinyin(text, style=pypinyin.NORMAL)]).lower()

def get_resource_dir():
absolute_path = os.path.abspath('./resource')
return absolute_path

def get_plugin_dir():
absolute_path = os.path.abspath('./plugins')
return absolute_path

0 comments on commit 06a32c9

Please sign in to comment.