mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-06-08 22:19:26 +02:00
reformat file
This commit is contained in:
parent
4df8e1bae0
commit
9e537e60f2
@ -2,6 +2,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
def serialize(doujinshi, dir):
|
||||
metadata = {'title': doujinshi.name,
|
||||
'subtitle': doujinshi.info.subtitle}
|
||||
@ -22,6 +23,7 @@ def serialize(doujinshi, dir):
|
||||
metadata['category'] = doujinshi.info.categories
|
||||
metadata['URL'] = doujinshi.url
|
||||
metadata['Pages'] = doujinshi.pages
|
||||
|
||||
with open(os.path.join(dir, 'metadata.json'), 'w', encoding="raw_unicode_escape") as f:
|
||||
json.dump(metadata, f, separators=','':')
|
||||
|
||||
@ -37,7 +39,6 @@ def merge_json():
|
||||
continue
|
||||
data_folder = output_dir + folder + '/' + 'metadata.json'
|
||||
json_file = open(data_folder, 'r')
|
||||
json_dict = {}
|
||||
json_dict = json.load(json_file)
|
||||
json_dict['Folder'] = folder
|
||||
lst.append(json_dict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user