Initial commit
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					.idea
 | 
				
			||||||
 | 
					*.pyc
 | 
				
			||||||
							
								
								
									
										15
									
								
								normalisename.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								normalisename.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					from sys import argv
 | 
				
			||||||
 | 
					from os import rename
 | 
				
			||||||
 | 
					from unidecode import unidecode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for file in argv[1:]:
 | 
				
			||||||
 | 
					    rename(file,
 | 
				
			||||||
 | 
					           unidecode
 | 
				
			||||||
 | 
					           (
 | 
				
			||||||
 | 
					               ''.join(ch for ch in file
 | 
				
			||||||
 | 
					                       if ch.isalnum()
 | 
				
			||||||
 | 
					                       or ch is ' '
 | 
				
			||||||
 | 
					                       or ch is '.')
 | 
				
			||||||
 | 
					           )
 | 
				
			||||||
 | 
					           .replace(' ', '_'))
 | 
				
			||||||
		Reference in New Issue
	
	Block a user