gottagetit / phoshare

Automatically exported from code.google.com/p/phoshare
Other
0 stars 0 forks source link

Problem upgrading from 1.4.2 to 1.4.7 #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.just replaced the phoshare app in my app folder and launched a dry run with 
the new one using my old parameters (here is a copy of the beginning of the 
script running :
Reading iPhoto database from /Users/sergevernouillet/Pictures/iPhoto Library...
Version 8.1.2 library with 16657 images
Phoshare.py --export "/Volumes/photo/Serge et Cathy" --iphoto 
"~/Pictures/iPhoto Library" --events "." --foldertemplate "{yyyy}_{mm}_{dd} 
{name}" --nametemplate "{index0} {title}" --captiontemplate "{description}" 
--update --faces --iptc --gps --verbose

What is the expected output? What do you see instead?

I was expecting to see only the "create"line  for my new photos, but instead 
I've seen "delete obsolete direction" with all my folders containing all my 
events, and then recreate new directories of all my events.

I've noticed that the deleted directories looked like :
Obsolete exported file: /Volumes/photo/Serge et Cathy/2007_11_27 diaporama 
1/016 IMG 0440m.jpg

and the new one

New file: /Volumes/photo/Serge et Cathy/2007_11_27 diaporama 1/016 
IMG_0440m.jpg (copy)

Only the space in the file name {title} has been replaced by a _
Is it a known issue or is it a new feature of phoshare (maybe to create 
direction without any space?)
In that case is there a solution not for erasing all my pictures from my NAS 
and then just recopy it with a new file name?

Thanks a lot

What version of the product are you using? On what operating system?

just moved from 1.4.2 to 1.4.7
OSX 10.6.8

Please provide any additional information below.

Original issue reported on code.google.com by thomas.v...@gmail.com on 17 Jul 2011 at 8:02

GoogleCodeExporter commented 8 years ago
Phoshare 1.4.2 had a bug (at least that's what I call it) where it replaced 
underscores in filenames with spaces as part of the processing that generates a 
valid filename. Some characters aren't allowed in filenames, so Phoshare cleans 
them up during the export. Underscores are perfectly valid in file names, so 
they shoud not be replaced.

This has indeed the undesired side effect of recreating all your images after 
an upgrade if you use underscores in image titles. I don't know of any way 
around this. You can of course change the code in Phoshare yourself. The change 
is in the file
   Phoshare.app/Contents/Resources/lib/python2.7/tilutil/imageutils.py:

95c133
<         if c.isalnum() or c.isspace():
---
>         if c.isalnum() or c.isspace() or c == '_':

Original comment by tsporkert on 17 Jul 2011 at 11:39