DDRparser — Version 1.4.1
Made by HORNEKS ANS
https://horneks.no

Revision record:
Windows update 1.4.1: (2025-10-04)
- Increased stack size to improve Windows stability. 
Version 1.4.1
- Improved performance in SaveAsXML parsing
- SaveAsXML Layout catalog: 
	- Added Tooltips and Grouped Button parsing. 
	- Cleanup of some text output. 

Version 1.4.0
- First version for Windows (Beta)
- For Mac. Some adjustments for Windows compatibility regarding GIT commit and enforcing LF as
  the line-delimiter in git configuration. 
- Changed the parsing function for translatable strings to require less memory footprint. 
  Uses the same function on both Mac and Windows
- ACF scripts in the GUI app are adapted to both Mac and Windows, making it cross-platform. 
  (Some differences for interaction with the OS, file paths and so on). Also added container 
  for the Windows version of the ACF plugin (In the GUI app). 

Version 1.3.2
- DDR format parsing: Getting the solution name from the "File" tag in XML instead of constructing 
  it from the XML's filename. 
- Generate the Group hierarchy also for the DDR-format (Layouts and scripts)
- Relationship Graph: Syncronized CC/CD functionality from SaveAsXML format. 

Version 1.3.1
- Bugfix: Corrected missing "=" in heading of Relationship graph document. 
- LayoutCatalog: Added Group hierarchy heading to the header of each layout document. 
- ScriptCatalog: Changed Group heading to show group hierarchy instead of just the inner group element. 
Both Group hierarchies are shown as Group1 / Group2 / Group_n
Note: This is a mini release of just the DDRparser. Use the same GUI tool as in 1.3.0. 

Version 1.3.0
- New features for multilingual translation workflows
- Support for compiling .po files into .mo (--create_mo)
- Update .po/.mo files with new strings from .pot (--update-pos)
- Automatic translation of new strings via OpenAI (--use-openAI-apikey <api-key>)
- Enhanced the DDR GUI Tools.fmp12 app: Works as a demo of new translation functions. Bundled with 
  10 languages. 
- GUI app requires ACF-Plugin 1.7.6.2 (which is loaded with the app). 

Version 1.2.0
- Changes to Relationship document: show Cascade Create and Cascade Delete (CC/CD)
  markings on the tables in the relationship. 
- New command line switch: -t => Etraction of _(...) calls and production of
  translation files (POT - POedit template) that can be used in the translation work. 
  Works together with ACF-Plugin 1.7.6.2, which can load such translations and return
  translated versions of texts inside _("any text")

Version 1.1.1
- **Theme Catalogue export in both formats.** DDR and SaveAsXML now both export the Theme Catalogue.
- **Reduce SSD wear by skipping unchanged writes for repetitive parsing.** Files are read, compared, 
  and written only if the content differs. This change does not affect Git diffs or overall speed. 
  It simply prevents unnecessary disk writes.
- The FileMaker app DDR-GUI-tool.fmp12 is not changed since 1.1.0. 

Version 1.1.0:
- Completed SaveAsXML format (beta). Files exported from FileMaker Pro using
  "Save a copy as XML" can now be parsed with this version. The DDR format is still
  supported. The app probes the XML file to select the parser automatically. 

- Bug fixes for DDR format parsing:
  - Relationship graph output previously mixed relationship predicates and
    sorting criteria. Sorting criteria are now listed under a separate heading.
  - The script step "Insert Text" sometimes omits the text content in the
    script output due to variations in how FileMaker includes this text in the
    XML.

- Added a FileInfo folder with a FileMeta text file containing details about the
  versions involved, and the date and time of the export.

- DDRparser GUI tool changes:
  - Added a table for automatic installation of the ACF plugin using a Container field 
    with the plugin. 
  - Added logic for version checking and probing XML file formats.
  - Included an ACF source package containing custom functions used by the
    application (Insert Text script step in the InitACF function, plus the
    ACF_Compile command).
  - Moved calculation logic from the script "UpdateCommand" (for generating the
    command and performing checks) into an ACF function
    (DDRparser_buildCommandLine) for better maintainability.
  - Added a checkbox to open the output folder after parsing is done. 
  - Added a check if git is installed when selecting "git-auto-commit". If it's not
    installed, install the XCode command line utilities.  

Version 1.0.2:
- Most changes to the GUI tool.
- New command-line parameters to support the GUI tool functions. 
- Changed logic when selecting files. It is no longer bound to the name Summary.xml. 
  It checks using the command-line tool to determine the file type instead. 
- It fetches a small text file from our web, containing the current available version. 
  This is used to inform users about new versions available. The text file is found at 
  https://horneks.no/Files/DDRparser-version.txt
  Currently, it contains only the text: 1.0.2
  The GUI app then compares it with the current installed version to provide information 
  about any new versions available. 
- Made some progress on the FMSaveAsXML format, but there's still far to go before this 
  is complete. BaseTables and Value-lists seem now complete. Scripts are exported but we are not
  finished with the quality checks on every possible script-step and its parameters. 
- The DDR format is complete. 
- Some Bugfix done to the DDR format. It is about the value-list extraction. Some value-lists 
  that has been changed from Custom to File option or visa versa had both defs in the DDR export,
  made both versions exported. Also Value-list of type "External" was dropped from the export. 
  This is now fixed. 
- Edited the layout for the relationships document. Cosmetic changes - Indentations and separator
  lines to make the document more readable. 
  
Version 1.0.1:
- Bugfix release and some dev tools included in the app. 
- Fixed bug in script parsing that sometimes produced incomplete script sources and extra files. Fixed.
- Added tools for extracting and listing nodes in XML files. Look at the Help menu. 
- Users who have downloaded the 1.0.0 version are encouraged to download this new version and install it. 
Version 1.0.0:
- First release. 

What is it?
-----------
DDRparser is a command-line tool that parses FileMaker Database Design Report (DDR) XML exports
and splits them into structured, readable text files — searchable and usable in any code editor.
The application is code-signed and notarised by Apple. 

How to Generate a DDR:
----------------------
1. Open your FileMaker solution
2. Go to Tools → Database Design Report
3. Select all objects and all files in the solution
4. Choose "XML" as the output format (not HTML)
5. Click "Create" and choose an output folder

How to Use DDRparser (with the GUI Tool):
-----------------------------------------
1. Install the included DDRparser_1.1.0.pkg from the .dmg archive.
2. The GUI tool uses the ACF Plugin to allow file/folder selection.
   - The plugin runs with a free demo license until September 2025.
   - After that, it will work for 30 minutes each time FileMaker starts.
   - Download it here:
     https://horneks.no/?sdm_process_download=1&download_id=174
3. Copy the file DDR-GUI-Tool.fmp12 to a writable location and open it.
4. Each record represents a project.
5. Enter a project name, select the Summary.xml or any solution XML file, and set any desired options.
6. Copy the generated command into Terminal and press Enter.

How to Use DDRparser (Command Line):
------------------------------------
1. Install DDRparser_1.1.0.pkg from the .dmg archive.
2. Open Terminal.
3. Change directory to the folder containing the DDR files:
     cd /path/to/your/ddr-export
4. Run:
     DDRparser -i Summary.xml

The tool will split the DDR into folders like:
  - Scripts/
  - Layouts/
  - ValueLists/
  - MenuSets/
  - CustomFunctions/

You can open these files with BBEdit, Sublime, VSCode, or any plain text editor.

Advanced Options:
-----------------
  -i <file>      Input DDR Summary XML file
  -f <folder>    Output folder to split into (optional)
  -v             Verbose output
  --version      Show version info
  -b             Enable BaseTable Alt output (Exp and Num)
  --clean        Remove obsolete files from target directories
  --git-auto-commit "Commit message"
                 Automatically commit changes to Git repo
  -h             Show help

System Requirements:
--------------------
- macOS 10.13 or later
- Apple Silicon and Intel supported
- Terminal access

Website:
--------
https://horneks.no
