Importing into Attributes

Started by jch2103, July 25, 2013, 09:37:59 PM

Previous topic - Next topic

jch2103

I want to set up Attributes that show files I've uploaded to my SmugMug site. I suspect others will also have existing data about images that they would like to import into an Attributes database.

What's the simplest way to load text-based attribute information (e.g., file name, SmugMug album name, etc.) into an Attributes database? The Help topic shows how to do so with an .imas xml file, but my data isn't in that format. Text file imports don't seem to be supported. Is there a work-around?


John

Mario

You can export Attributes into a CSV text format, and exchange Attribute data via the standard IMAS XML format. There are no features to import Attributes from arbitrary text files.

I see this rather as a task for a purpose-built script which knows how your text file is formatted, how the lines are separated, how columns are separated, which column maps into which Attribute and how the data in the text file columns needs to be converted to match the Attribute data type.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Is the Attributes script the best (only?) starting point for a script to convert text (e.g. csv) to IMAS XML?
John

Mario

Do you mean the Import Metadata into Attributes script?

That's a fairly complete script which shows how to import metadata into Attributes (it does not use an XML file, it updates the Attributes in the database directly). Most of the code deals actually with the user interface, which is HTML. The part which updates the Attributes is real small and easy.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Thanks. I'll explore how I might be able to use it.
John