Can someone help please / generating title or attribute with sequence number

Started by AnaDia, April 20, 2016, 09:22:29 PM

Previous topic - Next topic

AnaDia

At the end, I like to have the titles of a set of batch exported pictures filled with something like "{project/event name} {sequence number}".
I think it would be very easy to generate such filenames with the "Renamer", but I prefere to keep my original filename and to fill the title with this kind of text. Maybe I can/should set this kind of title or attribute in an earlier step and write it during batch export into the title.
Do I have to try to write a little script or is there something out of the box, which I have missed?
I tried to use an auto-increment global variable during batch export, but this didn't work for me. I get more or less random numbers which increment very fast.

Any help would be welcome.

AnaDia

jch2103

I think you should be able to do this with the Folder and Filename options in the Batch Processor. "Here you can use a free mix of literal text, variables, the {seq} sequence token and one or more of the special file name tokens to produce individual file names."

John

AnaDia

Ah, no, I don't want to change the filenames.
I want to write text in combination with a sequence number into the metadata title field or maybe into an attribute.

jch2103

Aah, I misunderstood. How about using a Metadata Template? That will let you put text and/or variables into a destination tag.
John

Mario

I would use a Metadata Template for this purpose.

1. Go to Edit > Preferences > Variables and create a new variable. Name it MySequence or similar. Make it auto-incement, start with 1 and increment by 1.
2. Commit your changes with OK. Important!
3. Now, go to Edit > Preferences > Metadata Templates
4. Create a new template. Choose whatever tag you want to update as the target, and then enter a variable like

Image number #{Application.Variables.MySequence}

as the source. By using Application.Variables.MySequence you have a running number which is incremented by one for each file in the selection you are currently processing with your metadata template.

You can of course freely mix this with other literal text or metadata.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

AnaDia

Ok, thank you, I will try it.
I did step 1 and 2 a few days ago, but then used it in the batch processor for writing the "custom metadata" "titel". But I didn't get the expected numbers. I will try it with the metadata template.

AnaDia

I did a quick test and I think that this would work, but the batch exported files won't be imported into the database and at the moment I wouldn't prefere to write this "special" title in the source files. I think, that it would be a better idea, to use an attribute field as an basic storage and then write it to the title field of the exported image during the batch exporting. But then I have to learn writing IMatch scripts, right?

But I'm just searching for my final workflow. So I will think about it a few more nights and days and we will see, where I end up  :)


Mario

I'm not sure that I can follow.

If you want to set the title only for the batch exported files, but not for the originals, why don't you just use the global sequence variable in the metadata section of the batch processor?

For example, the variable I explained above can be used to set the title in the batch processor as follows:



When I set the variable to 0 before I run the batch processor and then process 10 images, the output images will have these titles:



Is this not what you want?

[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

AnaDia

Yes, Mario, you could follow  :D
And yes, it works like you described. This was the first thing that I tried in the past, but it ends up in a mixture of numbers and so I thought, that this wouldn't work.  But today I saw, that I didn't use a sort profile during the batch process and this explains the result of the first days. So, your solution is the answer for my first question. Thank you!

But today I'm not sure, if this really is all that I want/need.
I have a bunch of original pics (most times raw format) and put a subset of this pictures (developed jpeg versions) on a web gallery to share them with friends. This subset of photos will go through the batch processor and the resulting images are not imported into IMatch, but keep the original filenames.
At the moment I didn't fill the exif title and therefore the title in the web gallery is filled with the filename (without extension and without "_"). This gallery title isn't very comfortable to use, if one of this friends like to ask me for a copy of one ore more photos. So I decided to use a gallery title which is a combination of fixed text and something like a sequence number per gallery-album.
But I think that the relationship between filename and gallery title should be fixed. And it is possible, that I add some photos to or maybe change some content in an album. So I'm thinking about the right place for the "sequence" number, maybe a file-attribute which is initially set for the originale (raw files) and the propagated to the versions ...

Puh, at the moment I have a big knot in my brain and I really don't know, if anyone can follow my thougths  :D Maybe that all sounds a little bit stupid  :D

It will be fine for me, if this thread ends here, but if there is anyone who likes to through in some ideas, please feel free to do so.


Mario

Each file in your database has a lifetime id (LTID) which does not change as long as the file remains in the database.

Variable: {File.LTID}

this returns a GUID like

A5B41B0D-3E14-4982-827A-72D9A96393DA

This id can be used to identify each image in your database.

If you produce the title or whatever for your gallery from that id, you can later find the file by searching in the file window for the LTID.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Mario has posted some of the best solutions, I think.

Maybe you will think, that the lifetime-number is too complicated for friends to say/write for you, if they want have an image.

I am not sure, if I fully understand your problem, hence my thoughts are maybe wrong:

1) You have an image in your DB
2) You want with help of the Batch processor create a copy of this image
3) You want not rename or add a number into the original file
4) The new generated copy should not be in the DB
5) Your friends should be able to see a number, what they can say to you and you can find then the original file in your DB

It is basically the same problem, what I have, if I deliver photos to someone (friend or client). My original filename are like:

20080212-0918-089053-s-sin-ulrich
20120710-1132-180444-s-sin-zeitraffer-treppe_m_v1
20160412-1122-282761-s-ref-klingnau_m

As you can see, in front is the date, then the time, then in the middle a special number (like 089053). Then comes a free text.
The special number is a variable, like Mario pointed out, hence this number is unique for me, each file in my DB has such a unique number. The advantage against a number like the LTID is, that this number is short. I decided a number with 6 digits, because I will not have more then 999'999 numbers. If so, then I will find a solution for this in some years  :)

That is whay I generate for files, what I will give out (deliver, catalog), a filename, what is a combination from this number and (maybe, optionally) some text. This can generate files like
s-089053
089053-ulrich

Sometimes I have the feeling, that even  6 digits are too much for someone.
It is a bit akward, sometimes, to order 089053, instead of for example only 53.
Hence I do sometimes even take even less numbers, like
9053
53-ulrich

These numbers are not really unique, but if someone orders from me then a number "9053", then I usually know, from what "theme" (event) this friend is speaking and I have no problem to find the wished image in my DB.

Because the number is stored in the filename of my original file in the DB, I can quickly find this file.

Maybe you have also such a unique number or a combination of number and text (712-jackson, 813-grillieren, 972-peter...), what would you allow to think about such a solution.

If you have not such a unique number and you want not change something in your Metadata from the original files (adding the exported filename to a field), then maybe you could also find some Metadata-fields, where a combination would also be uniqe and would create a good filename for exporting, like parts of the headline, description, date, time, city and so on. Could give names like

Berlin-120924
D700-120924
Peter-1224-1635

and so on. In my examples above is used
City-date
Camera-date
Headline-parts of date-time

I hope, you can find a good solution for you.










Best wishes from Switzerland! :-)
Markus

AnaDia

Thank you both for your input!!

Yes, I think, that the GUID will be too complicated. Then it will be easier to stay with my filenames. The idea with the shorter special number sounds interesting, but I'm not in a hurry, because it isn't a real problem.

So I will stop thinking about it for a while and then start a new iteration later. Some things need time to come to a good and finally maybe a simple solution.

So again, thank you for your ideas!



sinus

Quote from: AnaDia on April 25, 2016, 05:56:36 PM
Thank you both for your input!!

So I will stop thinking about it for a while and then start a new iteration later. Some things need time to come to a good and finally maybe a simple solution.

So again, thank you for your ideas!

Yep, sometimes this helps!  ;D

BTW, I do this with shorter filenames since years. Because my delivered photos or gallery-images should have an easy name. That is why i think, it is my job, to create a good short, easy filename for my clients, friends and so on.

How I do this, is my problem. Since we have a lot of possibilities in IMatch, we have several (good) solutions. We must simply take care, if a someone asks for a photo called for example "ix-451", "71" or "3123", that we can look up (in IMatch), what photo this is originally.

I personally think, numbers up to 4 digits (numbers) are ok, less is better, but more is not acceptable. My opinion.
Best wishes from Switzerland! :-)
Markus