我昨天好像只是寫爽的,完全沒對 script 作說明。

有些人沒有 Python 經驗,如果想試試這個 script,請依以下步驟操作。

  1. 取得 Python 並安裝。Linux 的使用者大概不必安裝就會有 Python,但 Windows 的使用者請到 Python 的老巢抓 installer 下來安裝。我用的是 Python 2.5.1,目前的最新版。

  2. 取得 EXIF.py。這個檔案是個簡單的程式庫,方便 Python 程式讀取檔案裡的 EXIF 資料。google 一下就找得到這個檔了,不過我也快取了一份下來。

  3. cpbyexif.py 存起來,記得要和 EXIF.py 放在一起。

  4. 打開指令行環境,切到 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.

Posted by yungyuc at 10:47, 0 comment, 0 trackback.
Add a trackback
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "klPLb"
© hover year to navigate month: powered by django