digital-preservation / csv-validator

CSV Validation Tool and API (CSV Schema RI)
http://digital-preservation.github.io/csv-validator
Mozilla Public License 2.0
205 stars 55 forks source link

Assisted File Path Substitution Selection #507

Closed steve-daly closed 1 week ago

steve-daly commented 1 month ago

The process of picking file path substitutions is quite error prone, with users having to get things like trailing slashes correct; deal with the appropriate prefix (file:) and the right number of slashes following it; and get the direction of slashes correct, especially when the OS being used (e.g. Windows) isn't the same as what created the CSV file (e.g. Mac).

I'm proposing that we have a new button/mode which simplifies this process, at least for a common use case which is changing the location of the files for TNA transfers. Ideally the solution could be made as generic as possible to work in other cases too, but dealing with this basic case will be the priority.

We can do a worked example below, and explore the options about whether it's simplest to match on batch folder or 'content'. Current users such as TNA Digital Archivists will know whether we always have a batch folder or are sometimes matching into a bare content folder. I would suggest that matching on the shortest row folder (i.e. batch) will be more generic if it works, and avoids a further hardcoding to 'content' which is error-prone within this app.