我昨天好åƒåªæ˜¯å¯«çˆ½çš„ï¼Œå®Œå…¨æ²’å° script 作說明。
有些人沒有 Python 經驗,如果想試試這個 script,請ä¾ä»¥ä¸‹æ¥é©Ÿæ“作。
å–å¾— Python 並安è£ã€‚Linux 的使用者大概ä¸å¿…安è£å°±æœƒæœ‰ Python,但 Windows 的使用者請到 Python çš„è€å·¢æŠ“ installer 下來安è£ã€‚我用的是 Python 2.5.1,目å‰çš„最新版。
å–å¾— EXIF.py。這個檔案是個簡單的程å¼åº«ï¼Œæ–¹ä¾¿ Python 程å¼è®€å–檔案裡的 EXIF 資料。google 一下就找得到這個檔了,ä¸éŽæˆ‘也快å–了一份下來。
把 cpbyexif.py å˜èµ·ä¾†ï¼Œè¨˜å¾—è¦å’Œ EXIF.py 放在一起。
打開指令行環境,切到 cpbyexif.py 所在的目錄下。執行
cpbyexif.py <source dir> <target base dir>
<source dir> 是放來æºå½±åƒæª”的目錄;<target base dir> 是è¦è¤‡è£½è‡³çš„目錄。執行以後,<target base dir> 裡會自己建出 YYYYMMDD.model é€™ç¨®æ ¼å¼çš„目錄,分日期放照片。
é¡å¤–還有第三個å¯å¿½ç•¥çš„åƒæ•¸ï¼Œæ˜¯ä»¥ YYYYMMDD æ ¼å¼æŒ‡å®šçš„æ—¥æœŸã€‚å¦‚æžœåŠ äº†é€™å€‹åƒæ•¸ï¼Œåªæœ‰åœ¨é€™å€‹æ—¥æœŸå¾Œçš„照片會被複製,之å‰çš„éƒ½æœƒè¢«å¿½ç•¥ã€‚é€™ç•¶ç„¶æ˜¯ç‚ºäº†å› æ‡‰æˆ‘ä¸æ®ºè¨˜æ†¶å¡è£¡çš„照片。
Dear semson, because it is not a good idea to type 10 thousands of words to explain HOW this script works, I chose to give a picture about WHAT this script does. Hoping it encourages you to know more about Python. I would recommend you to run my script and try to alter something you need. You would also need to take a look of EXIF.py, which defined a lot of things about EXIF tags. You can teach yourself Python by visiting http://docs.python.org/ and start from the great PythonTut http://docs.python.org/tut/tut.html . Enjoy.
- Previous: æ•´ç†ç…§ç‰‡ @2007/10/21
- Next: Firefox, Seamonkey (Mozilla), Netscape Navigator, Opera, Internet Explorer @2007/10/30
Please send trackback to: http://blog.seety.org/everydaywork/2007/10/22/857/trackback/.