Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Vincent Vande Vyvre Newsgroups: comp.lang.python Subject: Re: Grab metadata from images and save to file, batch mode Date: Sat, 2 Apr 2016 11:14:41 +0200 Lines: 32 Message-ID: References: <75200b1c-eb54-4e03-a859-6c9631b9073a@googlegroups.com> Reply-To: vincent.vandevyvre@oqapy.eu Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de G7aUuAkNRrCN5cPKGOxy5gLBkFE4g9348z50V6iQE6rw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:file': 0.07; 'scripts': 0.09; 'cvs': 0.09; 'advance': 0.10; 'python': 0.10; 'value.': 0.15; 'from:name:vincent vande vyvre': 0.16; 'received:195.130': 0.16; 'received:195.130.137': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'received:telenet- ops.be': 0.16; 'row': 0.16; '\xe9crit': 0.16; 'keys': 0.22; 'file.': 0.22; 'trying': 0.22; "haven't": 0.24; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'header:User- Agent:1': 0.26; 'command': 0.26; 'coding': 0.27; 'separate': 0.27; 'values': 0.28; 'thus,': 0.29; 'folder': 0.30; 'received:be': 0.30; 'certain': 0.31; 'extract': 0.33; 'values.': 0.33; 'file': 0.34; 'info': 0.34; 'path': 0.35; 'url:org': 0.36; '(and': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'files': 0.38; 'data': 0.39; 'url:en': 0.39; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'save': 0.60; 'email addr:gmail.com': 0.62; 'charset:windows-1252': 0.62; 'grab': 0.64; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'guides.': 0.84; 'subject:mode': 0.84; 'tack': 0.84; 'url:readthedocs': 0.84; 'url:latest': 0.91 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <75200b1c-eb54-4e03-a859-6c9631b9073a@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:106281 Le 01/04/2016 23:20, accessnewbie@gmail.com a écrit : > I have a directory (and sub-directories) full of images that I want to cycle through and grab certain metadata values and save those values to a single row in a cvs file. I would like to tack on the full path name to the row as a separate value. > > Folder > C:\Images\Family > Brother.jpg > Sister.jpg > Mom.jpg > > Keys/Values > Original Date/Time > User Name > File Name > > Thus, data might look like this in a Family.csv file > 2014:11:10 13:52:12; BillyBob111; Brother.jpg; C:\Images\Family\Brother.jpg > 2015:10:54 11:45:34; BillyBob111; Sister.jpg; C:\Images\Family\Sister.jpg > 2010:10:31 19:22:11; SallySue232; Mom.jpg; C:\Images\Family\Mom.jpg > > Big time noob. Much of what I have read cites command line examples dealing with single files and no info as to how to extract specific keys and their values. > What module would some of you users recommend I use (I want it to be python as that is what I am trying to learn) > > Can you give me some coding suggestions to get me goings? I haven't found any substantive scripts to use as guides. > > Many thanks in advance Have a look at py3exiv2: http://python3-exiv2.readthedocs.org/en/latest/ Vincent