I have zips of photo sets. Holidays, bday parties and such. Some have ratings and some have tags.
I want to:
Read the zip and look for a tag.
Depending on the value preform an action that will result in replacing the zip with a new one.
Copy tags from old zip to new zip.
Add Tag to indicate processed.
I want to produce a script that would process all files, hence considering PowerShell.
I could make a Dopus script. I am also considering hacking the comic book script, as there is some cross over (and it might add some value to that script for others).
Doing it from an Opus script would be much easier, since that gives you access to the data. You could have the Opus script run a PowerShell script/command and tell if the tags etc. if you want to do most of it in PS.
Description of that stream afm .%H(fs-read('.default.md:\x05SummaryInformation'),,16)
Will get you access to the comments, but it is a bit more complicated to decode. Hint: The comments are at the end typically if no other fields.
You can see [xattr] file streams on an NTFS-File by typing dir /R at a console [wt.exe or cmd.exe] command-line.
From some testing, via nirsoft's "AltenateStreamView" and "HxD", the structure actually appears to be:
Header:
00:
14 00 00 00 00 00 00 00
: Probably an offset to the start of the Optional Text section, possibly to allow further expansion of the header, so probably not a good idea to ignore it!
Is there any update on the easiest way to do this? I am trying to get the status and label information for a tool outside of DOpus using Python but am having a hard time doing so.
Maybe a custom command (that writes to a temp file) that would be called from python via dopusrt ?
A bit cumbersome though ....
Or a script that outputs information in a structured output file that you can feed to your python script (more steps and more manual).
Do you know how to get the information in the first place? I haven't been able to find anything in the dopusrt documentation that will allow access to the information. Also haven't found anything in the documentation that allows scripts or plugins to access it, either.
For the labels, even though I never tested this, using the Labels method of the item object might lead you to what you need.
The item object itself if easily retrievable from selection, or from scanning a folder, or from its path (first from the scriptCommandData object passed into the entry point of the command, last two from FSUtil.ReadDir and FSUtil.GetItem)
Another thought : Depending on what the python script is doing, you might have to consider one of the three options : 1) calling Opus (custom command in JScript ... or VB) from Python; 2) calling Python from Opus ; 3) Doing everything from Opus.
EDIT: As said before, option 1) is probably better to be done via dopusrt.exe and a file with content result. Note that dopusrt.exe calls are asynchronous: once called, you get back to the caller even if the command called takes several minutes to execute (even seconds might be a problem to address). And you don't have the ability to get any content in return from dopusrt.exe.
Option 1 is probably best for my purpose but I may also look into option 3. And thanks for the note about it being asynchronous! Fortunately the application I am writing is already multi-threaded, so the thread that would be talking to DOpus can wait around until the temp file is done being written to without blocking much.