This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
start:knowledge:vfx:pipeline [2025/03/10 15:31] – [Startup] florian | start:knowledge:vfx:pipeline [2025/03/28 13:36] (current) – [Startup] florian | ||
---|---|---|---|
Line 31: | Line 31: | ||
==== Startup ==== | ==== Startup ==== | ||
- | === Create Drives | + | I'm executing 2 scripts on startup using a single InvisibleLauncher.vbs file referenced in Windows "Task Scheduler" |
- | Using VisualSubst | + | === 1. CreateDrives |
- | === Open programs on correct desktop | + | This is a bat script. In addition to this I'm also using VisualSubst, this makes naming the mapped drives possible |
- | Put this .ps1 file in any local location on your pc, navigate | + | === 2. AppsToDesktop |
- | powershell.exe -NoProfile -ExecutionPolicy Bypass -File " | + | This is a .ps1 script, referenced |
+ | In this startup, | ||
+ | For this script I'm using the [[https:// | ||
+ | |||
+ | ==== Work locally while keeping a mirror on NAS ==== | ||
+ | |||
+ | Create symbolic links from your Laragon www directory to your development folders on the NAS. This keeps your working environment organized while allowing Laragon to serve the sites. | ||
+ | '' | ||
===== Audio ===== | ===== Audio ===== | ||
Line 75: | Line 82: | ||
Key features: | Key features: | ||
- | * Filters tracks to only include supported audio formats (.mp3, .flac, .wav, etc.) | ||
* Skips system and auto-generated playlists | * Skips system and auto-generated playlists | ||
* Can skip files that already exist in the destination folder | * Can skip files that already exist in the destination folder | ||
Line 172: | Line 178: | ||
<color rgb(0%, | <color rgb(0%, | ||
- | ===== Reference Library | + | ==== Reference Library ==== |
For my collection of reference images, I only use broad categories as folders, the other information I put in the name and metadata. | For my collection of reference images, I only use broad categories as folders, the other information I put in the name and metadata. | ||
I'm using a combination of tools, including Advanced Renamer, digiKam, Python and a tool from GitHub called [[https:// | I'm using a combination of tools, including Advanced Renamer, digiKam, Python and a tool from GitHub called [[https:// | ||
- | == Workflow == | + | === Workflow |
First, I will change the name with Advanced Renamer.\\ | First, I will change the name with Advanced Renamer.\\ | ||
- | Using TagGUI, I will then let the program generate captions into seperate text files, wich are named after the image they are describing.\\ | + | Using [[https:// |
Now we need the Python script to take the information from the text file, and add it to the metadata of the images.\\ | Now we need the Python script to take the information from the text file, and add it to the metadata of the images.\\ | ||
For clean organisation, | For clean organisation, | ||
- | == The name == | + | === The name === |
CATEGORY_SUBJECT_inc Nr | CATEGORY_SUBJECT_inc Nr | ||
- | == The metadata == | + | === The metadata |
A description/ | A description/ | ||
- | |||
- | == The script == | ||
- | <code Python [enable_line_numbers=" | ||
- | import os | ||
- | from PIL import Image as PilImage, PngImagePlugin | ||
- | from pyexiv2 import Image as Pyexiv2Image | ||
- | |||
- | def add_text_to_image_metadata(image_folder): | ||
- | try: | ||
- | # Iterate through all files in the specified folder | ||
- | for filename in os.listdir(image_folder): | ||
- | image_path = os.path.join(image_folder, | ||
- | text_file_path = os.path.join(image_folder, | ||
- | |||
- | print(f" | ||
- | |||
- | if os.path.exists(text_file_path): | ||
- | # Read the content from the text file | ||
- | with open(text_file_path, | ||
- | caption_text = file.read() | ||
- | |||
- | # Convert filename to lowercase for extension checking | ||
- | filename_lower = filename.lower() | ||
- | |||
- | if filename_lower.endswith((' | ||
- | # Load the image' | ||
- | image = Pyexiv2Image(image_path) | ||
- | |||
- | # Add the caption to the image' | ||
- | image.modify_exif({' | ||
- | elif filename_lower.endswith(' | ||
- | # Convert the PNG image to JPEG | ||
- | image = PilImage.open(image_path) | ||
- | rgb_image = image.convert(' | ||
- | rgb_image.save(os.path.splitext(image_path)[0] + ' | ||
- | |||
- | # Load the image' | ||
- | image = Pyexiv2Image(os.path.splitext(image_path)[0] + ' | ||
- | |||
- | # Add the caption to the image' | ||
- | image.modify_exif({' | ||
- | |||
- | # Delete the original PNG image | ||
- | os.remove(image_path) | ||
- | |||
- | # Delete the text file | ||
- | os.remove(text_file_path) | ||
- | |||
- | print(" | ||
- | except Exception as e: | ||
- | print(f" | ||
- | |||
- | # Example usage: Specify the folder containing your images | ||
- | image_folder_path = '/ | ||
- | add_text_to_image_metadata(image_folder_path) | ||
- | }(); | ||
- | </ | ||
\\ | \\ | ||
- | == Sources == | + | ===== Sources |
[[https:// | [[https:// |