wlpotter / csv-to-srophe

A set of XQuery modules for converting CSV data to Srophe-compliant TEI XML records. Developed for Syriaca.org
GNU General Public License v3.0
1 stars 1 forks source link

Default file output path should be `/out/$collectionName$/$current-date-time$` #32

Open wlpotter opened 2 years ago

wlpotter commented 2 years ago

If there is no output path specified in config.xml at /meta/config/io/outputPath, the fall back should be $repo-base/out/$collectionName$/$current-date-time$. The date-time format should be based on the ISO format, e.g., path/to/repo/persons/2021-11-17T11_33_50_662.

This can be accomplished with the following code:

let $currentDateTime := string(current-dateTime())
let $currentDateTime := functx:substring-before-last($currentDateTime, "-")
let $currentDateTime := replace($currentDateTime, ":|\.", "_")

I think this should be accomplished in the config.xqm module rather than in the transform.xq driver.

Also need to add this as documentation.

wlpotter commented 10 months ago

Sounds simple and useful