line too long (103 > 88 characters)
64 shutil.move(os.path.join(root, f), os.path.join('data', root.replace('/', '-') + '-' + f))
65 data_files.append(root.replace('/', '-') + '-' + f)
66 else:
67 shutil.move(os.path.join(root, f), os.path.join('media', root.replace('/', '-') + '-' + f))68 media_files.append(root.replace('/', '-') + '-' + f)
69
70
line too long (102 > 88 characters)
61 print("Skipping zip file: ", f)
62 continue
63 if '.json' in f:
64 shutil.move(os.path.join(root, f), os.path.join('data', root.replace('/', '-') + '-' + f))65 data_files.append(root.replace('/', '-') + '-' + f)
66 else:
67 shutil.move(os.path.join(root, f), os.path.join('media', root.replace('/', '-') + '-' + f))
line too long (103 > 88 characters)
19
20def move_completed_files(media_path, data_path, final_path, file):
21 shutil.move(os.path.join(media_path, file), os.path.join(final_path, 'media', file))
22 shutil.move(os.path.join(data_path, file + '.json'), os.path.join('final', 'data', file + '.json'))23 print("Modified image data and moved to final directory: ", file)
24
25
line too long (104 > 88 characters)
24
25
26def supports_file(file, supported_files, data_files):
27 return bool([ft for ft in supported_files if (ft in file.lower())]) and file + '.json' in data_files
line too long (102 > 88 characters)
9
10
11def process_image(media_path, data_path, final_path, file):
12 print(f"Running process_image for file: {file} with supported file types: {SUPPORTED_FILE_TYPES}")13 file_date = filedate.File(os.path.join(media_path, file))
14
15 # Get file date
line too long (110 > 88 characters)
15 # Get file date
16 file_date.get()
17
18 media_data = json.load(open(os.path.join(data_path, file + '.json'))) # change to data dir for production19
20 data_photo_time = media_data.get('photoTakenTime', '')
21
line too long (95 > 88 characters)
26 exif_dict['GPS'][piexif.GPSIFD.GPSLatitudeRef] = 'N'
27 exif_dict['GPS'][piexif.GPSIFD.GPSLongitudeRef] = 'E'
28 exif_dict['GPS'][piexif.GPSIFD.GPSLatitude] = degToDmsRational(data_location['latitude'])
29 exif_dict['GPS'][piexif.GPSIFD.GPSLongitude] = degToDmsRational(data_location['longitude'])30
31 # print(exif_dict)
32 exif_bytes = piexif.dump(exif_dict)
line too long (102 > 88 characters)
9
10
11def process_image(media_path, data_path, final_path, file):
12 print(f"Running process_image for file: {file} with supported file types: {SUPPORTED_FILE_TYPES}")13 media_data = json.load(open(os.path.join(data_path, file + '.json')))
14 data_title = media_data.get('title', '')
15 data_photo_time = media_data.get('photoTakenTime', '')
line too long (93 > 88 characters)
25 exif_dict['Exif'][36868] = dt_str
26 exif_dict['GPS'][piexif.GPSIFD.GPSLatitudeRef] = 'N'
27 exif_dict['GPS'][piexif.GPSIFD.GPSLongitudeRef] = 'E'
28 exif_dict['GPS'][piexif.GPSIFD.GPSLatitude] = degToDmsRational(data_location['latitude'])29 exif_dict['GPS'][piexif.GPSIFD.GPSLongitude] = degToDmsRational(data_location['longitude'])
30
31 # print(exif_dict)
Description
Line length greater than configured max_line_length
detected, defaults to 79 character. This limit can be configured docs