Build Time Automation from Photos: Difference between revisions
(Created page with "== Automated Extraction of Build Time from Photos (Steps 1–8) == === Step 1: Define the Photo Time Range === Use Google Photos search to select the relevant date range (e.g., a specific build phase or start date). Select all photos in the range and add them to a new album. Name the album clearly (e.g., ''Build Photos – Phase 1''). This album becomes the authoritative boundary of the dataset. === Step 2: Export Photos and Metadata via Google Takeout === Go to https:...") |
No edit summary |
||
| Line 1: | Line 1: | ||
https://chatgpt.com/share/696f38a6-2d20-8010-bd17-26154b0e6d92 | |||
=== Step 1: Define the Photo Time Range | = Automated Extraction of Build Time from Photos (Steps 1–8) = | ||
Use Google Photos search to select the relevant date range ( | |||
== Step 1: Define the Photo Time Range == | |||
Use Google Photos search to select the relevant date range (for example, a specific build phase or start date). | |||
Select all photos in the range and add them to a new album. | Select all photos in the range and add them to a new album. | ||
Name the album clearly (e.g., ''Build Photos – Phase 1''). | Name the album clearly (e.g., ''Build Photos – Phase 1''). | ||
This album becomes the authoritative boundary of the dataset. | This album becomes the authoritative boundary of the dataset. | ||
== Step 2: Export Photos and Metadata via Google Takeout == | |||
Go to https://takeout.google.com. | Go to https://takeout.google.com. | ||
Deselect all services except Google Photos. | Deselect all services except Google Photos. | ||
| Line 14: | Line 16: | ||
This produces media files plus JSON sidecar files containing authoritative timestamps. | This produces media files plus JSON sidecar files containing authoritative timestamps. | ||
== Step 3: Prepare a Local Working Directory == | |||
Extract the Takeout ZIP into a raw archive directory. | Extract the Takeout ZIP into a raw archive directory. | ||
Create a separate working copy for analysis. | Create a separate working copy for analysis. | ||
Never modify the raw archive; all processing happens on the working copy. | Never modify the raw archive; all processing happens on the working copy. | ||
== Step 4: Normalize Filenames with Timestamps == | |||
Read each photo’s JSON sidecar file. | Read each photo’s JSON sidecar file. | ||
Extract the photoTakenTime timestamp. | Extract the photoTakenTime timestamp. | ||
| Line 26: | Line 28: | ||
This makes chronological ordering explicit and reproducible. | This makes chronological ordering explicit and reproducible. | ||
== Step 5: Bulk Metadata Extraction == | |||
Use ExifTool to extract metadata for all photos and videos into a CSV file. | Use ExifTool to extract metadata for all photos and videos into a CSV file. | ||
Include multiple timestamp fields to ensure coverage across photos and videos. | Include multiple timestamp fields to ensure coverage across photos and videos. | ||
The output CSV contains one row per media file with candidate timestamps. | The output CSV contains one row per media file with candidate timestamps. | ||
== Step 6: Select the Best Timestamp and Normalize Timezones == | |||
For each file, select the best available timestamp in priority order (e.g., DateTimeOriginal, then MediaCreateDate). | For each file, select the best available timestamp in priority order (e.g., DateTimeOriginal, then MediaCreateDate). | ||
Convert timestamps to a single local timezone. | Convert timestamps to a single local timezone. | ||
| Line 37: | Line 39: | ||
The result is a clean per-file timestamp table. | The result is a clean per-file timestamp table. | ||
== Step 7: Compute Daily Time Spans == | |||
Group photos by local calendar date. | Group photos by local calendar date. | ||
For each day: | For each day: | ||
| Line 45: | Line 47: | ||
This span represents the maximum possible work window for that day. | This span represents the maximum possible work window for that day. | ||
== Step 8: Compute Build Time Using a Lunch-Gap Rule == | |||
Within each day, sort photos by time. | Within each day, sort photos by time. | ||
Compute gaps between consecutive photos. | Compute gaps between consecutive photos. | ||
Latest revision as of 08:12, 20 January 2026
https://chatgpt.com/share/696f38a6-2d20-8010-bd17-26154b0e6d92
Automated Extraction of Build Time from Photos (Steps 1–8)
Step 1: Define the Photo Time Range
Use Google Photos search to select the relevant date range (for example, a specific build phase or start date). Select all photos in the range and add them to a new album. Name the album clearly (e.g., Build Photos – Phase 1). This album becomes the authoritative boundary of the dataset.
Step 2: Export Photos and Metadata via Google Takeout
Go to https://takeout.google.com. Deselect all services except Google Photos. Choose “All photo albums included” and select only the build album. Export as ZIP. This produces media files plus JSON sidecar files containing authoritative timestamps.
Step 3: Prepare a Local Working Directory
Extract the Takeout ZIP into a raw archive directory. Create a separate working copy for analysis. Never modify the raw archive; all processing happens on the working copy.
Step 4: Normalize Filenames with Timestamps
Read each photo’s JSON sidecar file.
Extract the photoTakenTime timestamp.
Rename each media file to:
YYYY-MM-DD_HH-MM-SS__OriginalFilename.ext
This makes chronological ordering explicit and reproducible.
Step 5: Bulk Metadata Extraction
Use ExifTool to extract metadata for all photos and videos into a CSV file. Include multiple timestamp fields to ensure coverage across photos and videos. The output CSV contains one row per media file with candidate timestamps.
Step 6: Select the Best Timestamp and Normalize Timezones
For each file, select the best available timestamp in priority order (e.g., DateTimeOriginal, then MediaCreateDate). Convert timestamps to a single local timezone. Discard files with no valid timestamp. The result is a clean per-file timestamp table.
Step 7: Compute Daily Time Spans
Group photos by local calendar date. For each day:
- Identify the first photo timestamp.
- Identify the last photo timestamp.
- Compute the daily span as the difference between them.
This span represents the maximum possible work window for that day.
Step 8: Compute Build Time Using a Lunch-Gap Rule
Within each day, sort photos by time. Compute gaps between consecutive photos. If a gap exceeds one hour, interpret it as lunch. Subtract the excess time beyond one hour from the daily span. If no gap exceeds one hour, treat the day as continuous work. The result is the daily build time derived from photographic evidence.