用途:sync-content 用于把本地画廊内容同步到 AWS S3 桶,典型场景是在向作品集添加新照片后执行,使线上媒体与本地内容保持一致。
主要能力:支持同步全部媒体文件,也支持只同步某个指定画廊文件夹;支持 dry run 预览将要同步的内容而不实际上传;同步时可排除 .DS_Store、.tmp、.git 等文件;完成后报告上传文件数、删除文件数(若使用 --delete)、传输数据总量以及 S3 桶 URL。
使用方式:先验证 AWS 凭据,命令为 aws sts get-caller-identity --profile pitfal。同步全部媒体文件使用 aws s3 sync ./content/galleries/ s3://pitfal-media/galleries/ --profile pitfal --exclude ".DS_Store" --exclude ".tmp" --exclude ".git/"。若提供 $ARGUMENTS 指定画廊,则使用 aws s3 sync ./content/galleries/$ARGUMENTS/ s3://pitfal-media/galleries/$ARGUMENTS/ --profile pitfal --exclude ".DS_Store"。仅预览时使用 aws s3 sync ./content/galleries/ s3://pitfal-media/galleries/ --profile pitfal --dryrun。
限制:资料未提供该技能的安装方式、依赖版本、权限要求、错误处理、并发或增量同步细节,也未说明是否支持其他云存储或非 AWS 环境。使用前需确保本地存在 content/galleries 目录、目标 S3 桶可访问,并已配置名为 pitfal 的 AWS profile。