【发布时间】:2013-10-21 06:54:49
【问题描述】:
我正在编写一个脚本来将 IPTC 数据添加到图像文件夹中。它从 EXIF 信息中提取日期并将其添加到 'Caption' IPTC 标记中。
date = iptc["DateTimeOriginal"]
date = date.strftime('%A %e %B %Y').upcase
iptc["Caption"] = '%s: %s (%s)' % [date, caption, location]
除了日期输出之外,脚本可以工作:
Sunday 13 October 2013
理想情况下,我希望它输出:
Sunday 13th October 2013
任何建议将不胜感激。
【问题讨论】: