承接 dsuurlant/takeout-redate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dsuurlant/takeout-redate

Composer 安装命令:

composer create-project dsuurlant/takeout-redate

包简介

A Symfony Console CLI tool to restore filesystem timestamps for Google Takeout media from JSON metadata.

README 文档

README

A Symfony Console application to recursively go through your Google Photos Takeout archive and rewrite the file dates according to the accompanying metadata json.

Requirements

  • PHP 8.4 or higher

Recommended Usage with Google Photos Takeout

When exporting your Google Photos archive, the ZIP files strip the original creation and modification dates from your photos and videos. However, these dates are preserved in the accompanying JSON metadata files. This tool restores those dates programmatically.

Overview

The process involves three main steps:

  1. Obtain and extract your Google Photos Takeout archive
  2. Consolidate all files into a single directory structure
  3. Restore dates using this tool

Step 1: Obtain Your Archive

  1. Request your Google Photos archive from Google Takeout
  2. Download all ZIP files before they expire (archives have expiration dates)
  3. Choose a storage location:
    • Recommended: Local device or NAS for faster processing
    • Not recommended: Directly to another cloud service (too slow)

Important: If you do not download the entire archive before expiration, a newly requested Takeout archive will not have the same file distribution across different ZIPs, resulting in potential data loss. Make sure to download your entire archive before the expiration date.

Step 2: Extract and Consolidate

  1. Extract all ZIP files from your download

  2. Consolidate the extracted directories.

    On macOS: If files are split into multiple "Takeout 1", "Takeout 2", etc. directories, use this script to merge them:

#!/bin/bash
for src in Takeout\ [0-9]*; do
  [ -d "$src" ] || continue
  rsync -a --info=progress2 --ignore-existing --remove-source-files "$src"/ "Takeout"/ && find "$src" -type d -empty -delete
done

On other platforms: Files may automatically merge into a single directory, or you can manually combine them.

Note: Google may distribute metadata JSON files across different ZIP archives, meaning a photo's metadata might not be in the same archive as the photo itself. You must have the entire archive extracted and consolidated before running the date restoration tool.

Step 3: Restore Dates

Google exports photos organized by year:

./Photos from 2018/
./Photos from 2019/
./Photos from 2020/
./Photos from 2021/
...

Recommended approach: Process one year at a time to avoid timeouts with large archives.

For each year directory:

  1. Set your base directory (optional, for convenience):
export TAKEOUT_DIR="/mystorage/takeout/photos/"
  1. Test with dry-run first:
php takeout-redate.phar --path="$TAKEOUT_DIR/Photos from 2018" --dry-run
  1. If no errors, run for real and optionally delete metadata files after processing:
php takeout-redate.phar --path="$TAKEOUT_DIR/Photos from 2018" --delete
  1. Repeat for each year directory in your archive

Happy archiving and good luck moving away from Google!

Installation

As PHAR

Download the compiled PHAR file and make it executable:

chmod +x takeout-redate.phar
mv takeout-redate.phar /usr/local/bin/takeout-redate

Or use it directly:

php takeout-redate.phar

Usage

# Run the application
php bin/app

# Or after building the PHAR
./takeout-redate.phar

Development

# Install dependencies
composer install

# Run tests
composer test

# Build PHAR file
composer build

# Test build locally (runs tests, builds PHAR, and verifies it works)
composer test-build

# Code quality checks
composer quality

License

MIT

dsuurlant/takeout-redate 适用场景与选型建议

dsuurlant/takeout-redate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 dsuurlant/takeout-redate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dsuurlant/takeout-redate 我们能提供哪些服务?
定制开发 / 二次开发

基于 dsuurlant/takeout-redate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 25
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-13