Start a new topic
Implemented

Make RDFE format more readable for source control

The RDFE file format is used for Royal TS Dynamic Folder Exports, and is based on the JSON file format. Among other things, the source code of the script backing the dynamic folder is included as part of this Json file, as a single long string.


The problem is that when this is then checked into source code, the scripts become checked in as a single very long line, which makes it impractical to directly read the script by inspecting the RDFE file, something that's useful to be able to do for example when reviewing different versions of the RDFE file in source control.


Example: https://github.com/royalapplications/toolbox/blob/808a0f8af0e1a78a162288f149ed7560ff18883e/Dynamic%20Folder/1Password/1Password%20(Python).rdfe#L71


It would therefore be a good idea of the file format were modified somehow so that the actual source code with one line in the RDFE file representing one line source code, and even better if the source code could be presented mostly verbatim in the RDFE file.


This could of course be acheived in many ways.

Doing it with JSON is not possible, directly, since the JSON format doesn't have any proviso for multiline strings. The best you can do is store the code line by line in an array instead of in a large string, but this is a breaking format change.

If you're going to do a breaking format you might as well do something a little more radical.

For example, XML might offer a solution? The script source code could be then included in a CDATA section, which would make the source code directly readable as part of this new RDFE file format.

1 person likes this idea

We are looking at possible solutions as this is also bugging us ;)


2 people like this

The latest V7 beta introduces a new format (.rdfx) which is XML based. You can still open/save .rdfe files but we will backport this to V6 as well and eventually migrate all our .rdfe file in our github repo to .rdfx. This will take a while but we are getting there.


Thanks again for the feedback!


cheers,
Stefan

Is the new format (.rdfx/XML) supported on Royal TSX 6.0 as well? (i.e. Royal for Mac).

Also, is there some kind of documentation for this new XML format? (i.e. what parameters etc. are needed).

The new XML based format will also be supported/used by Royal TSX 6. Documentation for the file is not available but since Royal TS/X is creating the file upon export, it should be straight forward to see how it is composed.

Thanks, that did the trick.


By the way; it seems you can't import anything (even "Dynamic Folder") under the "Application" (i.e. global) level anymore. It complains with the error in the screenshot below. Is this intentional or a bug? If intentional, how would I have an application-wide Dynamic Folder in the new app version? (the use-case is for Dynamic Folder containing 1Password credentials, without having to have duplicate Dynamic Folder in each Document, when credentials are used in multiple Documents). I'm running Royal TSX 6.0.0.14 on macOS Ventura. FWIW, my old Dynamic Folder (that I had before upgrading from 5.x to 6.x), still exists under the "Application" level, and works fine, but I can't add any new ones.



image

This is intentional - actually it was a bug that you could create a dynamic folder in the application document. Dynamic folders can only be created in a user document. This is because the ability to create dynamic connections - which are not allowed in the Application document.


I recommend to move your dynamic folders to user documents.


Regards,
Stefan


1 person likes this
Login or Signup to post a comment