OK, just thinking out loud here. There are three distinct operations as I see it:
- Retrieve the rows of the table
- Process the rows
- Create the new files based on the input
All of these should be doable given some javascript knowledge, and with the help of either dataviewjs or Templater.
Retrieve the rows of the table
Two options spring to mind. Either you select and copy the table to the clipboard before triggering a Templater template using tp.system.clipboard()
to process it (or you could possibly also use tp.file.selection()
).
Alternatively, you could use some query selector to locate a table in the current document, and process it from there. This can be done from both dataviewjs and Templater.
Process the rows
A little depending on how you get the rows, the amount of processing will vary, but given you collect it from the clipboard it’s a matter of splitting into lines, and then splitting each line based on tab characters. Easy enough, I think.
Then you should have the wanted data in a readily available format. What else do you need to get you going on creating the new file? Do you need a date of sorts, or will you pull that out the magic hat somehow?
If you’re doing the query selector, it could be a little trickier to either navigate the markdown (somewhat easy) or the html (somewhat harder). Still doable, but not as elegant as the clipboard variant.
Create the new files
Using Templater you would have access to its file functions, whilst using dataviewjs you would rely on the javascript functions. They do work, but maybe they’ve got as many bells and whistles as the Templater alternatives.
The files you want created seems simple enough, so either option should be good, and just a matter of personal preferences.
All in all, I think it boils down to some personal preference and how familiar you’re with javascript and/or the various API of the plugins. It should be rather doable within the context of both Templater and dataviewjs, and personally I’m leaning towards the Templater option and copying the data into the clipboard before triggering the template to create the files.
The question I don’t know your thoughts about would be what will be the names of the new files, and how are you going to pick those names. What are the criteria for the file names?