mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	reformat file
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user