mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	remove repeated spaces
This commit is contained in:
		@@ -241,6 +241,8 @@ def format_filename(s):
 | 
				
			|||||||
    # maybe you can use `--format` to select a suitable filename
 | 
					    # maybe you can use `--format` to select a suitable filename
 | 
				
			||||||
    ban_chars = '\\\'/:,;*?"<>|\t'
 | 
					    ban_chars = '\\\'/:,;*?"<>|\t'
 | 
				
			||||||
    filename = s.translate(str.maketrans(ban_chars, ' '*len(ban_chars))).strip()
 | 
					    filename = s.translate(str.maketrans(ban_chars, ' '*len(ban_chars))).strip()
 | 
				
			||||||
 | 
					    filename = re.sub("\s\s+" , " ", filename)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while filename.endswith('.'):
 | 
					    while filename.endswith('.'):
 | 
				
			||||||
        filename = filename[:-1]
 | 
					        filename = filename[:-1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user