Design & Print Dynamic templates and text files

Started by halftone, October 01, 2017, 06:37:46 PM

Previous topic - Next topic

halftone

What I am hoping to do:

Create a dynamic Design & Print template that arranges iMatch images alongside extended narrative text files that relate to those files.

I do not want the narrative text as part of the metadata for the images. The text files might contain 0-300 words and must be editable outside iMatch. Plain ASCI is fine (or perhaps HTML for basic text styling).

EG I have an image 1234.jpg somewhere in iMatch. Somewhere else (Dropbox probably) I have a text file 1234.txt
           "                 4567.jpg      "                 "      .    "                   "                        "                            4567.txt
               2017-10-1_289.jpg     "                 "           "                   "                        "             2017-10-1_289.jpg
etc.

Typically a 'book' will comprise 50-120 images + caption texts, 1 per page, and end up as a PDF.

The aim is that bespoke documents can be produced just by changing the selection and sort order of images, and any associated text files will be automatically incorporated. And/or if the content of a text file changes, it's easy to update the output 'book' to a revised edition.

It seems like a simple thing :) but I can't see how to do it in iMatch. Nor can I see how to do it in any other software I've looked at, without enormous amounts of copy and paste and faffing about with individual image files.

NB I am an idiot with scripting. Oh, and the first deadline is tomorrow :)

Any ideas welcome.





Mario

Design & Print gives you full access to all metadata, IMatch Attributes and other data IMatch maintains for your files.
You cannot read and process data from external text files in a Design & Print template.

Your best chance would be to either integrate the data you keep in your external text files into proper metadata (e.g. XMP description) or to import the contents of your external text files into IMatch Attributes.
Prepare a CSV file which has the fully qualified file name in the first column and the contents of the external text file in a second colum - e.g with Excel. You can them import everything in one go into IMatch using the CSV Import.

Keeping metadata in several places (metadata embedded in files and external text files on your hard disk) is usually not a good idea and complicates things in many ways...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

halftone

Thanks Mario, that confirms what I'd thought.

I'd formed the impression from the Help that attributes were graphic objects, so didn't really look into that. If it's a matter of creating a graphic image of text, that's not going to work because it has to remain as editable text in the eventual PDF output.

iMatch can ingest .txt files (or seems to). No hope there?

Mario

#3
Attributes is a powerful database-in-database technology which is central part of IMatch. Attributes can be used to storage any kind of data in an IMatch database. For things like billing, scientific use, linking in backoffice database systems or, in your case, importing text. See the IMatch help on Attributes for detailed information.

I think you have confused Attributes with Annotations. Annotations are vector-based objects which can be used to add graphical objects, text and other elements to images in a non-destructive way.


IMatch cannot ingest arbitrary kinds of text files. You can import CSV text files into global or per-file Attributes.
This makes it easy to import data e.g., from Excel or database systems.

There is no "import text file into Attribute" command or feature. Was never needed. But it could be easily done via a custom app.

I don't know how many text files you have, but even for 100 files it is a matter of minutes to "import" them via copy/paste into Attributes.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

halftone

Clearly I need to have a thorough read of the Help file re Attributes and other stuff I've never previously used. So far they do look promising, so thanks for the pointer.

Oddly enough I was trying to do this in LibreOffice calc, but like most - perhaps all - spreadsheets it's doesn't handle graphical BLOBs at all. Any graphic is just plonked on top of the sheet, it isn't anchored to a cell. If you insert a row, the image stays where it physically was, it doesn't move with the row of data, so images as thumbnails for related text are useless.

I don't want to use XMP:description because most of the time these files have to travel so data is written back to the actual files IPTC - and it mustn't be for these images. Hence the requirement for separate text files - or CSV or XML.


sinus

Quote from: halftone on October 01, 2017, 08:11:18 PM
Clearly I need to have a thorough read of the Help file re Attributes and other stuff I've never previously used. So far they do look promising, so thanks for the pointer.

Oddly enough I was trying to do this in LibreOffice calc, but like most - perhaps all - spreadsheets it's doesn't handle graphical BLOBs at all. Any graphic is just plonked on top of the sheet, it isn't anchored to a cell. If you insert a row, the image stays where it physically was, it doesn't move with the row of data, so images as thumbnails for related text are useless.

I don't want to use XMP:description because most of the time these files have to travel so data is written back to the actual files IPTC - and it mustn't be for these images. Hence the requirement for separate text files - or CSV or XML.

You may have a look at the new notes-attributes.
Could be interesting for you.

https://www.photools.com/community/index.php?topic=7084.msg49209#msg49209

These notes-text (even large) you can see then in D&P, simply choose there this-attribute-field.
Best wishes from Switzerland! :-)
Markus

Mario

QuoteHence the requirement for separate text files - or CSV or XML.

This is why IMatch includes the unique Attributes feature. They allow you to create your own database inside IMatch, to store whatever data you want to store. The data is kept in the database and not in the image files. Attributes can be filled manually via the Attributes panel and there is the CSV import which can import CSV files into Attributes.

You can also export Attributes into  CSV file or import/export Attributes in the standard IMatch Attribute format, which is XML. And you can read/write Attribute data from IMatch apps, which makes them especially interesting for all kinds of data-exchange stuff.

Managing additional data in external text files is usually not a good solution. They can get lost, are not associated to a specific image (except via some context-knowledge like "file name must match") and they are not accessible in DAM software like IMatch.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

halftone

Just to say thanks, attributes did what I needed once I understood how.

iMatch is extraordinary software :)

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

halftone

Oh I do, I have, and again today:)

Elsewhere I think I saw you talking about an enhanced WYSIWYG text editor for attribute text fields. +1 for that. The editing is at present rudimentary.

Perhaps if I tell you a use case here, for which I just used it.

I am currently working on two projects. One is an exhibition of 50 images with extended caption narrative. The other is an expanded set of those 50 plus another 65, as a prototype book. The captions and sequence are different between the two, albeit with some overlap.

Attributes has been useful for sequencing the images (by using a Page_no integer attribute, that I can sort the view on), and editing the captions. It's actually a really neat way to handle book pages that are a mix of images and caption text.  I'm sure you know this already but I get it now :)

Tentative wishlist:


  • A WYSIWYG editor for text attributes
  • Drag-and-drop ability to arrange image sequence in the attribute grid view (an auto incrementing integer variable)
( I thought I remembered a lightbox sort in iMatch (3?) many years ago, where images could be dragged and dropped into any desired order, but perhaps I imagined that. Anyhow achieving the same thing via attributes would do fine.
  • Blurb page templates and/or plugin app.

Blurb's Bookwright software is OK for page makeup, editing and styling text... until you get to >20 pages, then page order, moving things around, becomes a major PITA. It has no grid view that shows any text, so you have to remember what text is on which page Perhaps an app as a Blurb plugin to input an iMatch image selection with attributes into Bookwright templates...? Must be possible, since there is a plugin for LR (which I don't use and never will:).

Mario

Attributes are plain (UNICODE) text. No formatting. WYSIWYG makes not much sense in that context.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook


Mario

That said, you can of course store some sort of markup in your Attributes.
For whatever purpose. HTML, XML, MarkDown, XAML. IMatch does not care, it considers attributes as plain text and keeps whatever you enter.
This can be useful if you later process Attributes in Javascript or similar.

For Design & Print, you can even store XAML markup (see IMatch help for details) in Attributes. For example:

This word should be in bold font: <Bold>Baby</Bold>

If you render an Attribute with this value in D&P it will come out exactly like this.
But if you wrap it in a <TextBlock> and declare the Textblock to be interpreted as XAML, you get this:



This can be very useful for advanced print projects.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

Quote
Drag-and-drop ability to arrange image sequence in the attribute grid view (an auto incrementing integer variable)
I just want to mention that you can use Drag & Drop in the file window to reorder a given set of images to your liking if you switch the Sort Profile to [Custom]. Mind, this does not save the sort order to an attribute, but IMatch will remember the sort order automatically. Maybe this feature is of interest to you as it is built-in and quite powerful. For example, if you want to store two different sort orders for the same set of images, one possibility is:

  • Create two categories, e.g. "Sort Order A" and "Sort Order B".
  • Select you set of images and assign all images to both of these categories.
  • Switch to the Categories view and select "Sort Order A". Set the Sort Profile (top of the file window) to [Custom].
  • Use Drag & Drop to reorder the images.
  • When done, select "Sort Order B" and repeat the steps, reordering the images to your liking for the second sort order.

Because IMatch stores the Custom sort order per category, you can easily switch back and forth between the two categories to compare the different sort orders.

Thorsten
Win 10 / 64, IMatch 2018, IMA

sinus

Quote from: Mario on October 04, 2017, 08:44:30 PM
That said, you can of course store some sort of markup in your Attributes.
For whatever purpose. HTML, XML, MarkDown, XAML. IMatch does not care, it considers attributes as plain text and keeps whatever you enter.
This can be useful if you later process Attributes in Javascript or similar.

......

This can be very useful for advanced print projects.

Yes, very interesting, specially with your notes-app.
Finally, say I store some text like your example here, in the notes-attributes.
I could then use this in D&P and it will look fine, like your example.

Then I could also create an app (like your notes), what would display this not only as text, but would display such things like "bold" and "underline" and font-size too?
(I could means, if I would  be able to do so  8))
Best wishes from Switzerland! :-)
Markus