Type: Note

Identifier:
import-mappings
Description

Import Mappings are used to import several materials (or really any data) into about::power. In the following a short list of hints for a successfull data import into about::power
Source of Description: em
Longer Description or Text-Content


if using libre office, use xls instead of xlsx files for your data table, or hundreds of empty rows will be processed.
regex are tricky to use as they dont drop specific debug messages.
the debug info is only displayed in the logfile on the server, never visible from the web-interface
be aware, that all options, refineries etc. are in json. json strings have a strict syntax. within the double quotes, certain characters have to be "escaped" with a backslash. For an explanation see the picture attached.
the string

{
"applyRegularExpressions":{
"match":"([A-Z])",
"replaceWith":"_\L\1"
}
}


should convert data in camelcase into under_score but it seems to mess up.

For Zotero users:
workflow one:
export items to csv, convert then to xls,
copy the type contents (row2) ito a texteditor with good regex support and convert camelCase into under_score format
(in vscodium replace ([a-z])([A-Z])([a-z]) with $1_\L$2$3 )
important: enter Collection if not given!
import
import media
 
 
If that works, you could run a pre-import data cleanse over your source data to do the change from camelCase to snake_case by using a tool like openrefine.