DDRparser GUI tool – Technical details

🧰 DDRparser GUI Tool (FileMaker Frontend)

The DDRparser GUI Tool is a lightweight FileMaker-based front end that simplifies using the DDRparser command-line utility. It allows you to:

  • Select XML files or folders visually
  • Configure project-specific options
  • Generate ready-to-run Terminal commands

🔐 ACF Plugin Requirement

To ensure usability, safety, and robust file validation, this tool requires the ACF plugin. This plugin adds essential helper functions that:

  • Detect installed versions
  • Check for updates
  • Validate input files
  • Integrate terminal output with FileMaker

    Download ACF-plugin below to install.

At the bottom of this page, you’ll find:

  • The full InitACF script listing
  • A list of helper ACF functions used in the tool

🧩 Functions Included in the Package

🟢 DDRparserFunctions_AreWeLoaded

A simple guard function that checks whether the DDRparser helper package is installed. If not, the GUI initiates compiles the source.


🔍 GetDDRparserInstalledVersion

Runs the command:

DDRparser --version

Returns the currently installed DDRparser version, used for update checks.


📂 ProbeXMLtype

Analyzes the selected XML file by running:

DDRparser --probe [filename]

Detects:

  • DDR_Summary
  • DDR_Solution
  • FMSaveAsXML
  • Or returns unknown / error

This is triggered when a user selects an XML file.


🌐 getLatestVersionNumber

Downloads a small text file from our server containing the latest released version of DDRparser. Used to compare against the local version and prompt updates if needed.


🧮 normalizeVersionNumber

Normalizes version strings for comparison:

Input: 1.2.9 → Output: 001.002.009

This ensures consistent version comparison even if version segments have varying digit lengths.


🔄 needUpdate

Compares:

  • Installed version (via GetDDRparserInstalledVersion)
  • Latest version (via getLatestVersionNumber)

Returns either an update message or an empty string if up-to-date.


🛠️ getDevInfo

Runs:

DDRparser --devinfo

Displays technical info about the SaveAsXML parser implementation — e.g., which parts are complete or experimental. Especially useful when working with new SaveAsXML exports. This will likely become obsolete once version 2.0.0 is finalized.


🧷 InitACF Script Listing

The InitACF script serves as the initializer for the ACF plugin functions required by the GUI. The text below is also an example of a script text extracted using this tool.


// ----------------------------------------------------
// Script: InitACF
// ----------------------------------------------------

If [ ACF_run( "DDRparserFunctions_AreWeLoaded") <> "Yes" ]
    Insert Text [ Select; Target: "$$ACFsource";  “Package DDRparserSupport "Support Functions for the DDR UI app";
    
    function DDRparserFunctions_AreWeLoaded ()
    	return "Yes";
    end
    
    function GetDDRparserInstalledVersion ()
    	string res, cmd = "DDRparser --version";
    	print cmd; 
    
    	try
    		res = SystemCommand(cmd, ""); 
    	catch
    		return "DDRparser not installed"; 
    	end try
    
    	return trimboth(substring(res, 11)); 
    end
    
    function ProbeXMLtype ( string path )
    	string res, cmd = format("DDRparser --probe -i '%s'", path);
    	print cmd; 
    	try
    		res = SystemCommand(cmd, ""); 
    	catch
    		return "DDRparser not installed"; 
    	end try
    
    	
    	return trimboth(res); 
    end
    
    function getLatestVersionNumber ()
    	return trimboth ( http_get("https://horneks.no/Files/DDRparser-version.txt")); 
    end
    
    function normalizeVersionNumber (string version)
    	array string parts = explode(".", version);
    	int i; 
    	for (i = 1, sizeOf(parts))
    		parts[i] = format("%03d", int(parts[i]));
    	end for
    	return implode(".", parts);
    end
    
    function needUpdate (string current)
    
    	string available = getLatestVersionNumber(); 
    	string currentn = normalizeVersionNumber(current); 
    	string availablen = normalizeVersionNumber(available);
    
    	if ( availablen > currentn) then
    		return format ("New updated DDRparser is available for download. Version %s, You have Version %s", available, current); 
    	end if
    	return ""; 
    
    end
    
    function getDevInfo ()
    	string res, cmd = "DDRparser --devinfo";
    	print cmd; 
    	try
    		res = SystemCommand(cmd, ""); 
    	catch
    		return "DDRparser not installed"; 
    	end try
    
    	
    	return trimboth(res); 
    
    end”  ]

    Set Variable [ $$Comp; Value:ACF_Compile( $$ACFsource ) ]

End If

# Check if update is available
Set Field [ DDRprojects::CurrentParserVersion; ACF_run( "GetDDRparserInstalledVersion") ]

Set Field [ DDRprojects::NedUpdateText; ACF_run( "needUpdate"; DDRprojects::CurrentParserVersion) ]


💬 Feedback or Feature Requests?

Feel free to contact us with suggestions.