mirror of
				https://github.com/k4yt3x/video2x.git
				synced 2025-10-31 12:50:59 +01:00 
			
		
		
		
	added config generator (alpha)
This commit is contained in:
		
							parent
							
								
									9d5502dd5c
								
							
						
					
					
						commit
						05e2e109c3
					
				
							
								
								
									
										31
									
								
								config_generator.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								config_generator.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | |||||||
|  | #!/usr/bin/env python3 | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  | """ | ||||||
|  | Name: Video2x Config Generator | ||||||
|  | Author: K4YT3X | ||||||
|  | Date Created: October 23, 2018 | ||||||
|  | Last Modified: October 23, 2018 | ||||||
|  | 
 | ||||||
|  | Licensed under the GNU General Public License Version 3 (GNU GPL v3), | ||||||
|  |     available at: https://www.gnu.org/licenses/gpl-3.0.txt | ||||||
|  | 
 | ||||||
|  | (C) 2018 K4YT3X | ||||||
|  | """ | ||||||
|  | from avalon_framework import Avalon | ||||||
|  | import json | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | def enroll_settings(): | ||||||
|  |     settings = {} | ||||||
|  |     settings['waifu2x_path'] = Avalon.gets('waifu2x-caffe-cui.exe path: ') | ||||||
|  |     settings['ffmpeg_path'] = Avalon.gets('ffmpeg binaries directory: ') | ||||||
|  |     return settings | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | def write_config(settings): | ||||||
|  |     with open('video2x.json', 'w') as config: | ||||||
|  |         json.dump(settings, config, indent=2) | ||||||
|  |         config.close() | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | write_config(enroll_settings()) | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user