Skip to content

Commit

Permalink
支持多种牌堆格式
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Oct 24, 2023
1 parent 6f37dce commit 1dc416e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions script/releaseDeck.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
deck_user_list.pop(deck_user_list.index(deck_meta_list_this))
for deck_user_this in deck_user_list:
for deck_type in [
'classic'
'classic',
'yaml',
'excel'
]:
index_data.setdefault(deck_type, [])
meta_info_data = None
Expand All @@ -32,10 +34,19 @@
deck_name_list.pop(deck_name_list.index(deck_name_meta_this))
for deck_name_this in deck_name_list:
deck_name = deck_name_this
if deck_name.endswith('.json'):
deck_name = deck_name.rstrip('.json')
elif deck_name.endswith('.json5'):
deck_name = deck_name.rstrip('.json5')
if 'classic' == deck_type:
if deck_name.endswith('.json'):
deck_name = deck_name.rstrip('.json')
elif deck_name.endswith('.json5'):
deck_name = deck_name.rstrip('.json5')
elif 'yaml' == deck_type:
if deck_name.endswith('.yaml'):
deck_name = deck_name.rstrip('.yaml')
elif 'excel' == deck_type:
if deck_name.endswith('.xlsx'):
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)
info_this = {
'name': meta_info_data.get(deck_name_this, {}).get('name', deck_name),
Expand Down

0 comments on commit 1dc416e

Please sign in to comment.