Add config-based database conversion.

This commit is contained in:
Joshua Lucas
2026-10-29 09:09:03 -05:00
parent 36636878bd
commit d5da5c6618
35 changed files with 8450 additions and 209 deletions

View File

@@ -0,0 +1,66 @@
$schema: ../../../src/AuDage/extensions/assets/schema.yaml
format:
name: csv
sep: " "
header: false
index: false
extension: mcr
quoting: 3 # No automatic quoting
quotechar: null
escapechar: null
export:
encoding: cp1252
import:
columns:
command:
type: str
const: "&set"
tagname:
type: str
translate:
columns: tagname
operations:
- operation: radd
arg: Units.$plc$.PLC.
value:
type: str
translate:
columns: tagname
operations:
- operation: replace
pattern: '^WA3252_[A-Z]+_\d+_\d+[A-Z]?_?([A-Z]+)?\d?.*'
repl: '"\1"'
- operation: replace
pattern: '"AI"'
repl: '"PPM"'
- operation: replace
pattern: '"FI"'
repl: '"GPM"'
- operation: replace
pattern: '"LI"'
repl: '"FT"'
- operation: replace
pattern: '"PI"'
repl: '"PSI"'
- operation: replace
pattern: '"SI"'
repl: '"%"'
- operation: replace
pattern: '"TI"'
repl: '"°F"'
- operation: replace
pattern: '"VI"'
repl: '"IN/S"'
- operation: replace
pattern: '("ZI"|"")'
repl: '"%"'
export:
tagname:
translate:
columns: tagname
type:
const: ""
address:
const: ""
comment:
const: ""