mirror of https://github.com/stenzek/duckstation
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			20 lines
		
	
	
		
			483 B
		
	
	
	
		
			Python
		
	
			
		
		
	
	
			20 lines
		
	
	
		
			483 B
		
	
	
	
		
			Python
		
	
import json
 | 
						|
import sys
 | 
						|
import os
 | 
						|
 | 
						|
if __name__ == "__main__":
 | 
						|
    if (len(sys.argv) < 3):
 | 
						|
        print("usage: %s <gamedb dir> <output path>" % sys.argv[0])
 | 
						|
        sys.exit(1)
 | 
						|
 | 
						|
    games = []
 | 
						|
    for file in os.listdir(sys.argv[1]):
 | 
						|
        with open(os.path.join(sys.argv[1], file), "r") as f:
 | 
						|
            fgames = json.load(f)
 | 
						|
            games.extend(list(fgames))
 | 
						|
 | 
						|
 | 
						|
    with open(sys.argv[2], "w") as f:
 | 
						|
        json.dump(games, f, indent=1)
 | 
						|
 | 
						|
    print("Wrote %s" % sys.argv[2]) |