Skip to content

Commit

Permalink
作者支持中文名称
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Oct 27, 2023
1 parent d66c4c8 commit a864f9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script/releaseDeck.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def formatUTF8WithBOM(data:bytes):
meta_info_data = None
file_dir_path = f'../deck/{deck_user_this}/{deck_type}/'
file_dir_path_real = f'deck/{deck_user_this}/{deck_type}/'
deck_user_this_quote = parse.quote(deck_user_this)
file_dir_path_real_quote = f'deck/{deck_user_this_quote}/{deck_type}/'
file_meta_info_path = f'../deck/{deck_user_this}/{deck_type}/__index.json'
if os.path.exists(file_meta_info_path):
with open(file_meta_info_path, 'r', encoding='utf-8') as f:
Expand Down Expand Up @@ -57,7 +59,7 @@ def formatUTF8WithBOM(data:bytes):
deck_name = deck_name.rstrip('.xlsx')
elif deck_name.endswith('.xls'):
deck_name = deck_name.rstrip('.xls')
deck_url_path_this = file_dir_path_real + parse.quote(deck_name_this)
deck_url_path_this = file_dir_path_real_quote + parse.quote(deck_name_this)
info_this = {
'name': meta_info_data.get(deck_name_this, {}).get('name', deck_name),
'download_link': [
Expand Down

0 comments on commit a864f9f

Please sign in to comment.