Batch processing of TreeSheets files

94 views
Skip to first unread message

Andrés C. González

unread,
May 22, 2020, 10:36:11 AM5/22/20
to TreeSheets
Hello,

I would like to process a list of .cts files, let's say, I want to export them all to JSON or whatever.
So far, lobster scripts can process the document that is currently open in TreeSheets. But, as far as I know, the API doesn't allow you to load or manage a document just in memory and process it (I mean, the only TreeSheets datamodel accesible from the API is the current open document).

So, in order to do this batch processing, I suppose the most feasible way would be:

1) load a document in a new tab.
2) switch to that tab.
3) run the script that exports the datamodel to the desired format.
4) repeat for each file.

To do so in a unique script, I would need to develop functions 1) and 2), because they are not available so far in the API.

Does this look like a reasonable approach? Any comments?

Thank you,
Andrés


Wouter van Oortmerssen

unread,
May 22, 2020, 11:49:54 AM5/22/20
to trees...@googlegroups.com
Added some functions here:  https://github.com/aardappel/treesheets/commit/806914f7fe578ad3ad8f1a8c0cbf17e0e915379d

Continuous build binaries should soon be available for it here: http://strlen.com/treesheets/

--
You received this message because you are subscribed to the Google Groups "TreeSheets" group.
To unsubscribe from this group and stop receiving emails from it, send an email to treesheets+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/treesheets/47e37176-45c3-4233-b6fa-6143ba766f68%40googlegroups.com.

Andrés C. González

unread,
May 22, 2020, 12:11:34 PM5/22/20
to trees...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages