Workflow query - Can XY parse compressed XML, map properties to tag?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Burningfeetman
Posts: 21
Joined: 27 Jul 2013 06:32
Location: Sydney, Australia

Workflow query - Can XY parse compressed XML, map properties to tag?

Post by Burningfeetman »

For years I've been frustrated with the inability to index & search notes within my favourite music app Ableton Live. With the recent announcement of version 10 being released in the new year, I scanned all the release notes in hope that the developers were addressing one pin-point complaint that I have - being that the applications internal "File Browser" allows users to write custom Text Info notes on files, but with the catch that this text is unsearchable.

Enter XYPlorer (hopefully...)

So a screenshot shows 1,000 words, and here's what I'm facing;

Image

Firstly, the Ableton file formats - there's a few of them, but most are simply re-branded gzip files containing raw XML data that you can read in notepad once decompressed.

The XYPlorer "Raw View" tab shows a .ADG file that I decompressed (I gave it the same file extension as its parent, note the file size is waaay larger). Hi-lighted within the XYPlorer "Raw View" is the pot of gold at the end of my rainbow - the XML Tag <Annotation Value= /> holds the applications "Info Text" (with the string "testing").

Is it possible, via script or configuration, for XYPlorer to;
  1. Understand a .ADG (or any other gzip compressed file) is simply raw XML sitting in a compressed format.
  2. Extract the XML file, parse the raw data, find a tag (in this case the tag <Annotation Value= /> and then copy that text string into an XYPlorer Tag (In my screenshot, you can see I've a XYPlorer tag column called "Info Text").
  3. User can then search via XYPlorer for that text string to return that file. Or even just simply view all "Info Texts" of all files at a glance.
  4. Extra Points - User can update the XYPlorer tag that would then be written back to the file - meaning the XML would need to be updated, the file re-saved via gzip, then the extension modified to the original file ext.
Very curious how one could approach this problem, even solve it.

highend
Posts: 14566
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Workflow query - Can XY parse compressed XML, map properties to tag?

Post by highend »

Possible? Sure.

Requires quite a bit of scripting, though.

For extracting you should use e.g. the command line version of 7zip / gzip for windows.
Don't know with which parameters an extracted xml file needs to be recompressed
afterwards, I've played with some -mx -mfb settings for 7za.exe but I never got
the exact same size like the .adg file. You need to try what Ableton accepts
afterwards...
XML parsing should be done in a different language than xys. Not that it is
impossible to do it with regexmatches / regexreplace inside xys but it
requires a bit of effort to do it correctly (markup languages should better
use a real parser instead of regex expressions).

Getting the node value + saving it as a tag (so that your tag column can read it)
requires its own script and ofc setting a new value can either be an option for
the first or its own script, too.

2. Btw, you didn't mention where exactly your Annotation node is placed, the xml
inside the .adg file can contain quite a few of these nodes in different places^^
3. You just need to query the tag database afterwards to get the required information
One of my scripts helped you out? Please donate via Paypal

Post Reply