Suru83 / phoshare

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

Caption-Abstract #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run Phoshare with image that have Captions / Descriptions in iPhoto

What is the expected output? What do you see instead?
Captions written to the Caption-Abstract field as typed. Instead, there seems 
to be a line break at the end?

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

Please provide any additional information below.
Looking through the source, I think the newline is introduced when the utf8 
encoded string is written to the tmp file

            print >> file1, new_caption.encode("utf-8")

"file1" has a new line at the end of it. running "exiftool" on the file shows 
the Caption-Abstract to have a period at the end; looking at the file info in 
Finder shows a line break (attached image).

Original issue reported on code.google.com by nzia...@gmail.com on 23 Apr 2011 at 1:05

Attachments:

GoogleCodeExporter commented 8 years ago
I changed...

    print >> file1, new_caption.encode("utf-8")

...to...

    file1.write(new_caption.encode("utf-8"))

...and it fixed the issue for me.

Original comment by nzia...@gmail.com on 23 Apr 2011 at 3:11

GoogleCodeExporter commented 8 years ago
Excellent! Thanks for investigating this and finding a fix. I will incorporate 
this into the next update of Phoshare.

Original comment by tsporkert on 23 Apr 2011 at 4:17

GoogleCodeExporter commented 8 years ago
The fix is included in Phoshare 1.4.6.

Original comment by tsporkert on 1 May 2011 at 7:26