Skip to content

Commit a1266c6

Browse files
committed
Cleanup whitespace.
1 parent db3970d commit a1266c6

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

jpgSorter.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def getMinimumCreationTime(exif_data):
1818
if (dateTimeOriginal is None):
1919
# case 1/9: dateTime, dateTimeOriginal, and dateTimeDigitized = None
2020
# case 2/9: dateTime and dateTimeOriginal = None, then use dateTimeDigitized
21-
creationTime = dateTimeDigitized
21+
creationTime = dateTimeDigitized
2222
else:
2323
# case 3/9: dateTime and dateTimeDigitized = None, then use dateTimeOriginal
2424
# case 4/9: dateTime = None, prefere dateTimeOriginal over dateTimeDigitized
@@ -33,7 +33,7 @@ def postprocessImage(images, imageDirectory, fileName):
3333
imagePath = os.path.join(imageDirectory, fileName)
3434
image = open(imagePath, 'rb')
3535
creationTime = None
36-
try:
36+
try:
3737
exifTags = exifread.process_file(image, details=False)
3838
creationTime = getMinimumCreationTime(exifTags)
3939
except:
@@ -89,7 +89,7 @@ def writeImages(images, destinationRoot, splitByMonth=False):
8989
createUnknownDateFolder(destinationRoot)
9090
destination = os.path.join(destinationRoot, unknownDateFolderName)
9191
destinationFilePath = os.path.join(destination, fileName)
92-
92+
9393
else:
9494
if (previousTime == None) or ((previousTime + minEventDelta) < imageTuple[0]):
9595
eventNumber = eventNumber + 1

numberOfFilesPerFolderLimiter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ def limitFilesPerFolder(folder, maxNumberOfFilesPerFolder):
1616
if not os.path.exists(subFolderPath):
1717
os.mkdir(subFolderPath)
1818
fileCounter = 1
19-
for file in os.listdir(dirPath):
19+
for file in os.listdir(dirPath):
2020
source = os.path.join(dirPath, file)
2121
if os.path.isfile(source):
2222
destDir = str(((fileCounter - 1) // maxNumberOfFilesPerFolder) + 1)
2323
destination = os.path.join(dirPath, destDir, file)
2424
shutil.move(source, destination)
2525
fileCounter += 1
26-
26+
2727

recovery.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def log(logString):
3030
def moveFile(file, destination):
3131
extension = os.path.splitext(file)[1][1:].upper()
3232
sourcePath = os.path.join(root, file)
33-
33+
3434
destinationDirectory = os.path.join(destination, extension)
3535

3636
if not os.path.exists(destinationDirectory):
3737
os.mkdir(destinationDirectory)
38-
38+
3939
fileName = str(fileCounter) + "." + extension.lower()
4040
destinationFile = os.path.join(destinationDirectory, fileName)
4141
if not os.path.exists(destinationFile):
@@ -75,12 +75,12 @@ def moveFile(file, destination):
7575
for file in files:
7676
extension = os.path.splitext(file)[1][1:].upper()
7777
sourcePath = os.path.join(root, file)
78-
78+
7979
destinationDirectory = os.path.join(destination, extension)
8080

8181
if not os.path.exists(destinationDirectory):
8282
os.mkdir(destinationDirectory)
83-
83+
8484
fileName = str(fileCounter) + "." + extension.lower()
8585
destinationFile = os.path.join(destinationDirectory, fileName)
8686
if not os.path.exists(destinationFile):

0 commit comments

Comments
 (0)