Mindtunnel.com Projects

Assorted Spare Time Projects

metaSave: extract and save Picasa metadata

| Comments

metaSave uses the picasa3meta package to create a duplicate Picasa photo tree containing only the metadata (from .picasa.ini, PMP, contacts.xml and pyexiv2)

Command Line Help

metaSave help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
~/metaSave$ metaSave --help
usage: metaSave [-h] [--path PATH] --photos SOURCE [--dest DEST]
                [--tweak TWEAK]

Collect all the image metadata I can find into one place.

optional arguments:
  -h, --help       show this help message and exit
  --path PATH      Path to the Picasa database files. If left off, search
                   $HOME for directory Picasa3 containing directories db3 and
                   contacts
  --photos SOURCE  Path to the photo tree. This directory tree will be
                   duplicated at <dest>/<basename of tree>.meta and all meta
                   data from the pmp databases, .picasa.ini files and exif
                   info will be placed there. **NOTHING UNDER THIS DIRECTORY
                   WILL BE MODIFIED**
  --dest DEST      Where to create the metadata tree. Defaults to $CWD
  --tweak TWEAK    Adjust the path names used when searching thumbindex.db.
                   What is stored in thumbindex.db is the full path relative
                   to the system it was created on. If you have copied the
                   photo tree and Picasa3 files to another system or have them
                   remotely mounted with a different path you can use --tweak
                   to adjust the path. example: --tweak
                   '/my/path/Pictures':'/thumbindex/path/Pictures'

Example

metaSave example run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
~/metaSave$ export PYTHONPATH=~/git/picasa3meta
~/metaSave$ metaSave --path $NAS/Picasa3 --photos $NAS/Pictures --tweak $NAS/Pictures:"/Volumes/myPassport/wayne/Pictures"
 Picasa3 path: /net/nas/DataVolume/wayne/Picasa3
       thumbs: /net/nas/DataVolume/wayne/Picasa3/db3/thumbindex.db
     contacts: /net/nas/DataVolume/wayne/Picasa3/contacts/contacts.xml
       source: /net/nas/DataVolume/wayne/Pictures
         dest: /home/wayne/metaSave/Pictures.meta
       myPath: /net/nas/DataVolume/wayne/Pictures
    thumbPath: /Volumes/myPassport/wayne/Pictures
 reading imagedata pmp files ... done
      reading pmp index file ... 28001 records
       reading contacts file ... 236 read
   reading .picasa.ini files ... 188 processed

now walking image library at /net/nas/DataVolume/wayne/Pictures  and writing all metadata to a duplicate tree at /home/wayne/metaSave/Pictures.meta ... 12962 files
```

After completion a sample output .meta file might be:

metaSave example output file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
pmp.index:20939
pmp.filters:tilt=1,0.146245,0.000000;crop64=1,69a15f9fb04ebe9;
pmp.filters.tilt:-1.462450
pmp.filters.crop64xy:0.025788,0.085832,0.980545,0.921538
pmp.rotate:
pmp.facequality:0
pmp.uid64:13482980970903349410
pmp.personalbumrecs:4294967295
pmp.height:2307
pmp.fileid:18446743639918797726
pmp.crop64:475716874043452393
pmp.crop64.xy:0.025788,0.085832,0.980545,0.921538
pmp.onlinechecksum:0
pmp.flipped:
pmp.personalbumid:0
pmp.lat:0.0
pmp.originfast:9987161983474779938
pmp.edited:1
pmp.text:
pmp.tags:
pmp.caption:Grandma in her new house
pmp.fileflags:
pmp.redo:
pmp.avgcolor:4271609233
pmp.geoview:
pmp.revertable:0
pmp.facerectdata:1
pmp.suggestionpersonalbumid:0
pmp.colorspace:64
pmp.deferredface:
pmp.personalbumrecs2:4294967295
pmp.filetype:14
pmp.long:0.0
pmp.width:2210
pmp.personalbumrecvalues:0
pmp.textactive:0
pmp.backuphash:46966
pmp.wayne@mindtunnel.com_lhlist:4ee6004177724e82
pmp.facerect:9674110839854362728
pmp.aliasparents:4294967295
pmp.suppress:
pmp.peoplealbumchecksum:0
pmp.originslow:9430931997677480010
pmp.personalbumrecvalues2:0
ini.filters:tilt=1,0.146245,0.000000;crop64=1,69a15f9fb04ebe9;
ini.backuphash:46966
ini.caption:Grandma in her new house
ini.faces:rect64(8641588d9f467068),a05cd0d401ec16fb
ini.sfaces:"Grandma"
ini.crop:rect64(69a15f9fb04ebe9)
ini.cropxy:0.025788,0.085832,0.980545,0.921538
ini.IIDLIST_wayne@mindtunnel.com_lh:4ee6004177724e82
ini.albums:4a4938d34ac436ab52e23550dd29fac4
Exif.Image.Orientation:top, left
Exif.Image.XResolution:72
Exif.Image.YResolution:72
Exif.Image.ResolutionUnit:inch
Exif.Image.ExifTag:90
Exif.Photo.PixelXDimension:2210
Exif.Photo.PixelYDimension:2307

Comments