Make sure to call $readMappingFile(some_file) if you want to support a user-defined file mapping. Otherwise, calls to $getShortNames() will create/augment the mapping for filenames.
Data.frame with columns 'from', 'to' and maybe 'best.effort' (if shorting was unsuccessful)
how the current mapping was obtained (user or auto)
Filename of user-defined mapping file; only defined if readMappingFile() was called
getShortNamesStatic(raw.files, max_len, fallbackStartNr = 1)
Static method: Shorten a set of Raw file names and return a data frame with the mappings. Mapping will have: $from, $to and optionally $best.effort (if shorting was unsuccessful and numbers had to be used)
raw.files Vector of Raw files.
max_len Maximal length of shortening results, before resorting to canonical names (file 1,...).
fallbackStartNr Starting index for canonical names.
data.frame with mapping.
a = FilenameMapper$new() a$readMappingFile('filenamemapping.txt')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.