Author Topic: Captions - Importing from a txt file not working  (Read 4775 times)

Offline gianca49

  • Newcomer
  • *
  • Posts: 42
    • View Profile
    • fotoswiss.com
Captions - Importing from a txt file not working
« on: January 17, 2017, 02:08:39 AM »
Hi support
macbook pro, el capitan

trying to import from a txt file saved as unicode from excel names of vip people for tonight event in europe.
strangely it is not working anymore.
other version of pm it worked fine

txt file out of excel unicode save
tryed many variations

any quick idea to get this file into it so I can work tonight here ?

thanks for help

regards
giancarlo


Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Captions - Importing from a txt file not working
« Reply #1 on: January 17, 2017, 03:37:24 AM »
I don't fully understand your question. Where do you want to import the file, for what purpose?
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline gianca49

  • Newcomer
  • *
  • Posts: 42
    • View Profile
    • fotoswiss.com
Re: Captions - Importing from a txt file not working
« Reply #2 on: January 17, 2017, 03:46:10 AM »
Hi Hayo

want to have it in the caption fields
so I can quickly assign a name to people in the image

other possibility is code replace but it is slower as I have first to look up which code belongs to which name

after long time testing I think excel is not saving properly a txt file now in unicode.
think the problem is there. pity.

thanks for help
regards
giancarlo

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Captions - Importing from a txt file not working
« Reply #3 on: January 17, 2017, 04:36:43 AM »
Right, I think I understand what you want.
I had never used this myself (just tried it), but you should be able to simply import the file (it must have a .TXT extension!).
Open the IPTC stationary (CMD/CTRL+I), click the Arrow button next to the Caption input field, select Edit Captions, click Import, a file browser opens, navigate to the file you want to import and “open” it.

Worked flawless for me (Note: it does not import anything twice so you can safely import a file, even if some of the entries are already there).

If this doesn't work for you, what error message do you get?
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline gianca49

  • Newcomer
  • *
  • Posts: 42
    • View Profile
    • fotoswiss.com
Re: Captions - Importing from a txt file not working
« Reply #4 on: January 17, 2017, 04:48:47 AM »
I made several test and the file made by excel is probably not correct unicod txt file.
pm cannot import it.
old files do work properly.
so problem is not with pm but with excel..

thanks for help

there is nothing to be done here anymore.

now I have to go to do the job.
no more time to invest in this solution.

thank you for your help
regards
giancarlo

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Captions - Importing from a txt file not working
« Reply #5 on: January 17, 2017, 12:58:07 PM »
Hmm, I don't think it is a unicode vs other encoding issue, can you upload (part of) the file here so I can see what happens if I try it?
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline tboland101

  • Newcomer
  • *
  • Posts: 1
    • View Profile
Re: Captions - Importing from a txt file not working
« Reply #6 on: June 25, 2017, 10:40:01 AM »
Folks,

I just saw this.  I use Excel 2010 and it does not save many of the special characters to a .txt file correctly.

However since I use Excel extensively for creating IPTC files and for captioning, I also keep the Excel file open along with PhotoMechanic.  While most caption info comes from codes, if do I need a text string with special characters I simply copy the Excel cell to the IPTC stationary pad and the special characters paste in correctly.

What I also do is automatically create full or partial captions from roster and event results data pasted into Excel.

For example, the back end of my caption is generated for all files from an event based on the initial data entered into Excel.  For example: "in a Class AA Eastern League baseball game between the Akron RubberDucks and the Reading Fightin Phils, Thursday, June 22, 2017, at FirstEnergy Stadium, Reading, PA." is automatically generated from the initial event data in Excel.

By copying the box score data for that game from the team website and pasting it into Excel I automatically generate the front end of the caption as follows: "Reading third baseman Mitch Walding (10) went 2 for 4 including two home runs with three RBI's ".  The logic and text of the caption can be customized to your preference.

Since the backend of the caption is already in the base IPTC file for that event, the front end is entered with the code /p10x/ which is also automatically generated by Excel by combining the player roster with the box score data for that player.  "p" is the first initial of the team, "10" the player number and "x" denotes this is the caption from the box score, not the general player text which would be /p10/. 

Excel allows you to develop extensive logic for combining data elements for complex captions or correcting data formats to more usable text.

For example, the caption "Dover's Fred Smith defeats Middletown's John Jones in the 106 pound class final " is a caption front end which automatically looks up the name and school of the winner and name and school of the defeated wrestler to create the caption.

Another example: "Joe Herman of Easton in his 1998 Chevy Corvette was fastest in the Super Street Prepared class with a time of 1:30.333 at the Pagoda Hillclimb on Duryea Drive, Reading, PA, Saturday, June 24, 2017" was created by combining data from the entrants list, with data from the results sheet as well as logistical and date data from other parts of the Excel file.  In this case, Excel converts the year of the car from a two digit format to a four digit format.  Excel also automatically converts the time of the run from seconds "90.333" to minutes and seconds format "1:30.333".

Since Excel automates so much data management, I don't use multiple columns in the IPTC text file.  I use Excel to create multiple codes for variations of the same data.  For example:

/p10/ = "Reading third baseman Mitch Walding (10) "
/p10n/ = "third baseman Mitch Walding (10) " such as may be used when two players are in the photo and the team identification is redundant for the second player ID'd
/p10x/ = "Reading third baseman Mitch Walding (10) went 2 for 4 including two home runs with three RBI's " the caption front end generated from the box score.

The reduction in manual typing for captions is massive and significantly speeds up captioning allowing more time for photo selection an formatting.

There is tons more productivity possible with Excel.  For example, covering track and field events can be difficult.  Excel can be used to combine the athlete roster and the event schedule to build a shooting schedule for all events, identifying whether the event is a "preliminary" or "final" as well as listing the top three seeds by name and number so I can find those persons quickly.

Cheers.