categories_dict = {
    "General": [
        "FileName",
        "SourceFile",
        "FileType",
        "ImageSize",
        "Megapixels",
        "FileSize",
        "Directory",
        "FilePermissions",
        "FileModifyDate",
        "FileAccessDate",
        "Subject",
        "Comment",
    ],
    "Camera": [
        "Make",
        "Model",
        "SerialNumber",
        "LensMake",
        "LensID",
        "ShutterSpeed",
        "Aperture",
        "ApertureValue",
        "FNumber",
        "MaxApertureValue",
        "FocalLength",
        "FocalLengthIn35mmFormat",
        "ScaleFactor35efl",
        "CircleOfConfusion",
        "DOF",
        "FOV",
        "HyperfocalDistance",
        "ShootingMode",
        "CameraType",
        "FocusDistanceRange",
    ],
    "Exposure": [
        "ExposureTime",
        "ExposureCompensation",
        "ExposureMode",
        "ExposureProgram",
        "ISO",
        "SensitivityType",
        "LightValue",
        "MeteringMode",
        "Flash",
        "WhiteBalance",
        "BrightnessValue",
        "SceneCaptureType",
        "Contrast",
        "Saturation",
        "Sharpness",
        "GainControl",
        "SubjectDistance",
        "SubjectDistanceRange",
    ],
    "Image Processing": [
        "Software",
        "ColorSpace",
        "ColorMode",
        "RenderingIntent",
        "Compression",
        "ICCProfileName",
        "ProfileDescription",
        "ProfileVersion",
        "CreatorTool",
        "WriterName",
        "ReaderName",
        "PhotoshopQuality",
        "PhotoshopFormat",
        "HasRealMergedData",
        "AlreadyApplied",
        "HasSettings",
        "HasCrop",
        "ToneCurveName",
        "ToneCurve",
        "Clarity",
        "Vibrance",
        "FillLight",
        "Brightness",
        "HighlightRecovery",
        "Shadows",
        "ColorTemperature",
        "Tint",
        "Defringe",
        "LuminanceSmoothing",
        "ColorNoiseReduction",
        "SharpenRadius",
        "SharpenDetail",
        "SharpenEdgeMasking",
        "PostCropVignetteAmount",
        "ConvertToGrayscale",
        "CameraProfile",
        "LensProfileName",
        "LensProfileEnable",
    ],
    "Date && Time": [
        "DateTimeOriginal",
        "CreateDate",
        "ModifyDate",
        "DateCreated",
        "MetadataDate",
        "SubSecTime",
        "OffsetTime",
        "SubSecTimeOriginal",
        "SubSecTimeDigitized",
        "SubSecCreateDate",
        "SubSecModifyDate",
        "SubSecDateTimeOriginal",
        "DateTimeCreated",
        "TimeCreated",
    ],
    "Author && Rights": [
        "Artist",
        "Creator",
        "By-line",
        "Copyright",
        "CopyrightNotice",
        "Rights",
        "Credit",
        "Source",
        "CreatorCity",
        "CreatorRegion",
    ],
    "Location": [
        "GPSLatitude",
        "GPSLongitude",
        "GPSImgDirection",
        "GPSAltitude",
        "GPSDateStamp",
        "GPSDateTime",
        "GPSLatitudeRef",
        "GPSLongitudeRef",
        "GPSAltitudeRef",
        "GPSMapDatum",
        "GPSProcessingMethod",
        "GPSSpeedRef",
        "GPSSpeed",
    ],
    "Editing History": [
        "History",
        "HistoryAction",
        "HistorySoftwareAgent",
        "HistoryChanged",
        "HistoryParameters",
    ],
    "XMP && IPTC": [
        "XMPToolkit",
        "DocumentID",
        "InstanceID",
        "OriginalDocumentID",
        "DerivedFromInstanceID",
        "DerivedFromDocumentID",
        "DerivedFromOriginalDocumentID",
        "ApplicationRecordVersion",
        "CodedCharacterSet",
        "IPTCDigest",
        "CurrentIPTCDigest",
    ],
    "Advanced / Technical": [
        "ExifToolVersion",
        "ExifVersion",
        "ExifByteOrder",
        "EncodingProcess",
        "BitsPerSample",
        "ColorComponents",
        "YCbCrSubSampling",
        "Orientation",
        "SensingMethod",
        "SceneType",
        "CustomRendered",
        "CFAPattern",
        "FileSource",
        "DigitalZoomRatio",
        "SensingMethod",
        "ProfileClass",
        "ProfileFileSignature",
        "ProfileCreator",
        "ProfileID",
        "ProfileCMMType",
        "ProfileConnectionSpace",
        "ProfileDateTime",
        "DeviceManufacturer",
        "DeviceModel",
        "DeviceAttributes",
        "ConnectionSpaceIlluminant",
        "MediaWhitePoint",
        "MediaBlackPoint",
    ],
}

rename_dict = {
    # General
    "FileName": "File Name",
    "SourceFile": "Source File",
    "FileType": "File Type",
    "ImageSize": "Image Size",
    "Megapixels": "Megapixels",
    "FileSize": "File Size",
    "Directory": "Directory",
    "FilePermissions": "File Permissions",
    "FileModifyDate": "File Modify Date",
    "FileAccessDate": "File Access Date",
    "Subject": "Subject",
    "Comment": "Comment",
    # Camera
    "Make": "Manufacturer",
    "Model": "Camera Model",
    "SerialNumber": "Serial Number",
    "LensID": "Lens",
    "LensMake": "Lens Manufacturer",
    "ShutterSpeed": "Shutter Speed",
    "Aperture": "Aperture",
    "ApertureValue": "Aperture Value",
    "FNumber": "F-Number",
    "MaxApertureValue": "Max Aperture Value",
    "FocalLength": "Focal Length",
    "FocalLengthIn35mmFormat": "Focal Length (35mm)",
    "ScaleFactor35efl": "Scale Factor (35mm EFL)",
    "CircleOfConfusion": "Circle of Confusion",
    "DOF": "Depth of Field",
    "FOV": "Field of View",
    "HyperfocalDistance": "Hyperfocal Distance",
    "ShootingMode": "Shooting Mode",
    "CameraType": "Camera Type",
    "FocusDistanceRange": "Focus Distance Range",
    # Exposure
    "ExposureTime": "Exposure Time",
    "ExposureCompensation": "Exposure Compensation",
    "ExposureMode": "Exposure Mode",
    "ExposureProgram": "Exposure Program",
    "ISO": "ISO",
    "BrightnessValue": "Brightness",
    "SensitivityType": "Sensitivity Type",
    "LightValue": "Light Value",
    "MeteringMode": "Metering Mode",
    "Flash": "Flash",
    "WhiteBalance": "White Balance",
    "SceneCaptureType": "Scene Capture Type",
    "Contrast": "Contrast",
    "Saturation": "Saturation",
    "Sharpness": "Sharpness",
    "GainControl": "Gain Control",
    "SubjectDistance": "Subject Distance",
    "SubjectDistanceRange": "Subject Distance Range",
    # Image Processing
    "Software": "Software",
    "ColorSpace": "Color Space",
    "ColorMode": "Color Mode",
    "RenderingIntent": "Rendering Intent",
    "Compression": "Compression",
    "ICCProfileName": "ICC Profile Name",
    "ProfileDescription": "Profile Description",
    "ProfileVersion": "Profile Version",
    "CreatorTool": "Creator Tool",
    "WriterName": "Writer Name",
    "ReaderName": "Reader Name",
    "PhotoshopQuality": "Photoshop Quality",
    "PhotoshopFormat": "Photoshop Format",
    "HasRealMergedData": "Has Real Merged Data",
    "AlreadyApplied": "Already Applied",
    "HasSettings": "Has Settings",
    "HasCrop": "Has Crop",
    "ToneCurveName": "Tone Curve Name",
    "ToneCurve": "Tone Curve",
    "Clarity": "Clarity",
    "Vibrance": "Vibrance",
    "FillLight": "Fill Light",
    "Brightness": "Brightness",
    "HighlightRecovery": "Highlight Recovery",
    "Shadows": "Shadows",
    "ColorTemperature": "Color Temperature",
    "Tint": "Tint",
    "Defringe": "Defringe",
    "LuminanceSmoothing": "Luminance Smoothing",
    "ColorNoiseReduction": "Color Noise Reduction",
    "SharpenRadius": "Sharpen Radius",
    "SharpenDetail": "Sharpen Detail",
    "SharpenEdgeMasking": "Sharpen Edge Masking",
    "PostCropVignetteAmount": "Post Crop Vignette Amount",
    "ConvertToGrayscale": "Convert to Grayscale",
    "CameraProfile": "Camera Profile",
    "LensProfileName": "Lens Profile Name",
    "LensProfileEnable": "Lens Profile Enable",
    # Date & Time
    "DateTimeOriginal": "Date/Time Original",
    "CreateDate": "Create Date",
    "ModifyDate": "Modify Date",
    "DateCreated": "Date Created",
    "MetadataDate": "Metadata Date",
    "SubSecTime": "Subsecond Time",
    "OffsetTime": "Time Zone Offset",
    "SubSecTimeOriginal": "Subsecond Time Original",
    "SubSecTimeDigitized": "Subsecond Time Digitized",
    "SubSecCreateDate": "Subsecond Create Date",
    "SubSecModifyDate": "Subsecond Modify Date",
    "SubSecDateTimeOriginal": "Subsecond Date/Time Original",
    "DateTimeCreated": "Date/Time Created",
    "TimeCreated": "Time Created",
    # Author & Rights
    "Artist": "Artist",
    "Creator": "Creator",
    "By-line": "By-line",
    "Copyright": "Copyright",
    "CopyrightNotice": "Copyright Notice",
    "Rights": "Rights",
    "Credit": "Credit",
    "Source": "Source",
    "CreatorCity": "Creator City",
    "CreatorRegion": "Creator Region",
    # Location
    "GPSLatitude": "GPS Latitude",
    "GPSLongitude": "GPS Longitude",
    "GPSAltitude": "GPS Altitude",
    "GPSDateStamp": "GPS Date Stamp",
    "GPSDateTime": "GPS Date/Time",
    "GPSLatitudeRef": "GPS Latitude Ref",
    "GPSLongitudeRef": "GPS Longitude Ref",
    "GPSAltitudeRef": "GPS Altitude Ref",
    "GPSMapDatum": "GPS Map Datum",
    "GPSProcessingMethod": "GPS Processing Method",
    "GPSImgDirection": "GPS Direction",
    "GPSSpeedRef": "GPS Speed Unit",
    "GPSSpeed": "GPS Speed",
    # Editing History
    "History": "History",
    "HistoryAction": "History Action",
    "HistorySoftwareAgent": "History Software Agent",
    "HistoryChanged": "History Changed",
    "HistoryParameters": "History Parameters",
    # XMP & IPTC
    "XMPToolkit": "XMP Toolkit",
    "DocumentID": "Document ID",
    "InstanceID": "Instance ID",
    "OriginalDocumentID": "Original Document ID",
    "DerivedFromInstanceID": "Derived From Instance ID",
    "DerivedFromDocumentID": "Derived From Document ID",
    "DerivedFromOriginalDocumentID": "Derived From Original Document ID",
    "ApplicationRecordVersion": "Application Record Version",
    "CodedCharacterSet": "Coded Character Set",
    "IPTCDigest": "IPTC Digest",
    "CurrentIPTCDigest": "Current IPTC Digest",
    # Advanced / Technical
    "ExifToolVersion": "ExifTool Version",
    "ExifVersion": "Exif Version",
    "ExifByteOrder": "Exif Byte Order",
    "EncodingProcess": "Encoding Process",
    "BitsPerSample": "Bits Per Sample",
    "ColorComponents": "Color Components",
    "YCbCrSubSampling": "YCbCr Subsampling",
    "Orientation": "Orientation",
    "SensingMethod": "Sensing Method",
    "SceneType": "Scene Type",
    "CustomRendered": "Custom Rendered",
    "CFAPattern": "CFA Pattern",
    "FileSource": "File Source",
    "DigitalZoomRatio": "Digital Zoom Ratio",
    "ProfileClass": "Profile Class",
    "ProfileFileSignature": "Profile File Signature",
    "ProfileCreator": "Profile Creator",
    "ProfileID": "Profile ID",
    "ProfileCMMType": "Profile CMM Type",
    "ProfileConnectionSpace": "Profile Connection Space",
    "ProfileDateTime": "Profile Date/Time",
    "DeviceManufacturer": "Device Manufacturer",
    "DeviceModel": "Device Model",
    "DeviceAttributes": "Device Attributes",
    "ConnectionSpaceIlluminant": "Connection Space Illuminant",
    "MediaWhitePoint": "Media White Point",
    "MediaBlackPoint": "Media Black Point",
}

# Credit: @stellasphere
# https://gist.github.com/stellasphere/9490c195ed2b53c707087c8c2db4ec0c

weather_codes = {
    "0": {
        "day": {
            "description": "Sunny",
            "image": "http://openweathermap.org/img/wn/01d@2x.png",
        },
        "night": {
            "description": "Clear",
            "image": "http://openweathermap.org/img/wn/01n@2x.png",
        },
    },
    "1": {
        "day": {
            "description": "Mainly Sunny",
            "image": "http://openweathermap.org/img/wn/01d@2x.png",
        },
        "night": {
            "description": "Mainly Clear",
            "image": "http://openweathermap.org/img/wn/01n@2x.png",
        },
    },
    "2": {
        "day": {
            "description": "Partly Cloudy",
            "image": "http://openweathermap.org/img/wn/02d@2x.png",
        },
        "night": {
            "description": "Partly Cloudy",
            "image": "http://openweathermap.org/img/wn/02n@2x.png",
        },
    },
    "3": {
        "day": {
            "description": "Cloudy",
            "image": "http://openweathermap.org/img/wn/03d@2x.png",
        },
        "night": {
            "description": "Cloudy",
            "image": "http://openweathermap.org/img/wn/03n@2x.png",
        },
    },
    "45": {
        "day": {
            "description": "Foggy",
            "image": "http://openweathermap.org/img/wn/50d@2x.png",
        },
        "night": {
            "description": "Foggy",
            "image": "http://openweathermap.org/img/wn/50n@2x.png",
        },
    },
    "48": {
        "day": {
            "description": "Rime Fog",
            "image": "http://openweathermap.org/img/wn/50d@2x.png",
        },
        "night": {
            "description": "Rime Fog",
            "image": "http://openweathermap.org/img/wn/50n@2x.png",
        },
    },
    "51": {
        "day": {
            "description": "Light Drizzle",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Light Drizzle",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "53": {
        "day": {
            "description": "Drizzle",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Drizzle",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "55": {
        "day": {
            "description": "Heavy Drizzle",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Heavy Drizzle",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "56": {
        "day": {
            "description": "Light Freezing Drizzle",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Light Freezing Drizzle",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "57": {
        "day": {
            "description": "Freezing Drizzle",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Freezing Drizzle",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "61": {
        "day": {
            "description": "Light Rain",
            "image": "http://openweathermap.org/img/wn/10d@2x.png",
        },
        "night": {
            "description": "Light Rain",
            "image": "http://openweathermap.org/img/wn/10n@2x.png",
        },
    },
    "63": {
        "day": {
            "description": "Rain",
            "image": "http://openweathermap.org/img/wn/10d@2x.png",
        },
        "night": {
            "description": "Rain",
            "image": "http://openweathermap.org/img/wn/10n@2x.png",
        },
    },
    "65": {
        "day": {
            "description": "Heavy Rain",
            "image": "http://openweathermap.org/img/wn/10d@2x.png",
        },
        "night": {
            "description": "Heavy Rain",
            "image": "http://openweathermap.org/img/wn/10n@2x.png",
        },
    },
    "66": {
        "day": {
            "description": "Light Freezing Rain",
            "image": "http://openweathermap.org/img/wn/10d@2x.png",
        },
        "night": {
            "description": "Light Freezing Rain",
            "image": "http://openweathermap.org/img/wn/10n@2x.png",
        },
    },
    "67": {
        "day": {
            "description": "Freezing Rain",
            "image": "http://openweathermap.org/img/wn/10d@2x.png",
        },
        "night": {
            "description": "Freezing Rain",
            "image": "http://openweathermap.org/img/wn/10n@2x.png",
        },
    },
    "71": {
        "day": {
            "description": "Light Snow",
            "image": "http://openweathermap.org/img/wn/13d@2x.png",
        },
        "night": {
            "description": "Light Snow",
            "image": "http://openweathermap.org/img/wn/13n@2x.png",
        },
    },
    "73": {
        "day": {
            "description": "Snow",
            "image": "http://openweathermap.org/img/wn/13d@2x.png",
        },
        "night": {
            "description": "Snow",
            "image": "http://openweathermap.org/img/wn/13n@2x.png",
        },
    },
    "75": {
        "day": {
            "description": "Heavy Snow",
            "image": "http://openweathermap.org/img/wn/13d@2x.png",
        },
        "night": {
            "description": "Heavy Snow",
            "image": "http://openweathermap.org/img/wn/13n@2x.png",
        },
    },
    "77": {
        "day": {
            "description": "Snow Grains",
            "image": "http://openweathermap.org/img/wn/13d@2x.png",
        },
        "night": {
            "description": "Snow Grains",
            "image": "http://openweathermap.org/img/wn/13n@2x.png",
        },
    },
    "80": {
        "day": {
            "description": "Light Showers",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Light Showers",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "81": {
        "day": {
            "description": "Showers",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Showers",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "82": {
        "day": {
            "description": "Heavy Showers",
            "image": "http://openweathermap.org/img/wn/09d@2x.png",
        },
        "night": {
            "description": "Heavy Showers",
            "image": "http://openweathermap.org/img/wn/09n@2x.png",
        },
    },
    "85": {
        "day": {
            "description": "Light Snow Showers",
            "image": "http://openweathermap.org/img/wn/13d@2x.png",
        },
        "night": {
            "description": "Light Snow Showers",
            "image": "http://openweathermap.org/img/wn/13n@2x.png",
        },
    },
    "86": {
        "day": {
            "description": "Snow Showers",
            "image": "http://openweathermap.org/img/wn/13d@2x.png",
        },
        "night": {
            "description": "Snow Showers",
            "image": "http://openweathermap.org/img/wn/13n@2x.png",
        },
    },
    "95": {
        "day": {
            "description": "Thunderstorm",
            "image": "http://openweathermap.org/img/wn/11d@2x.png",
        },
        "night": {
            "description": "Thunderstorm",
            "image": "http://openweathermap.org/img/wn/11n@2x.png",
        },
    },
    "96": {
        "day": {
            "description": "Light Thunderstorms With Hail",
            "image": "http://openweathermap.org/img/wn/11d@2x.png",
        },
        "night": {
            "description": "Light Thunderstorms With Hail",
            "image": "http://openweathermap.org/img/wn/11n@2x.png",
        },
    },
    "99": {
        "day": {
            "description": "Thunderstorm With Hail",
            "image": "http://openweathermap.org/img/wn/11d@2x.png",
        },
        "night": {
            "description": "Thunderstorm With Hail",
            "image": "http://openweathermap.org/img/wn/11n@2x.png",
        },
    },
}
