Skip to content

Instantly share code, notes, and snippets.

View alea12's full-sized avatar
🏠

alea12 alea12

🏠
View GitHub Profile
@alea12
alea12 / exif_folder_renamer.py
Created October 10, 2024 14:55
exif_folder_renamer.py
import os
from PIL import Image
from PIL.ExifTags import TAGS
# Function to check if the image was taken by a Fujifilm camera
def is_fujifilm(image_path):
try:
image = Image.open(image_path)
exif_data = image._getexif()
if exif_data:
^XA
^FX ---------------------------------------
^FX QR Code on the left
^FO15,5
^BQ,2,3
^FDHA,25938
^FS
^FX ---------------------------------------
^FXText First Row, Date
IF({Number of Rolls} = 1,
{Barcode} & "01",
IF({Number of Rolls} = 2,
{Barcode} & "01, " & {Barcode} & "02",
IF({Number of Rolls} = 3,
{Barcode} & "01, " & {Barcode} & "02, " & {Barcode} & "03",
IF({Number of Rolls} = 4,
{Barcode} & "01, " & {Barcode} & "02, " & {Barcode} & "03, " & {Barcode} & "04",
IF({Number of Rolls} = 5,
{Barcode} & "01, " & {Barcode} & "02, " & {Barcode} & "03, " & {Barcode} & "04, " & {Barcode} & "05",