Add next calculators set with flow, magnetism, and EV conversions

This commit is contained in:
Codex Agent
2026-03-08 01:55:19 +00:00
parent e9e5adce42
commit 5e974ea9c7
4 changed files with 174 additions and 89 deletions

View File

@@ -120,7 +120,11 @@ def process():
offset_val = "0"
# Special-case calculator families that require custom math beyond simple factors.
if 'awg' in slug:
if 'ev-to-lux' in slug or 'lux-to-ev' in slug:
c_type = 'ev-lux'
elif 'focal-length-to-angle-of-view' in slug:
c_type = 'aov'
elif 'awg' in slug:
c_type = 'awg'
elif 'brinell-to-rockwell-c' == slug or 'rockwell-c-to-brinell' == slug:
c_type = 'brinell-rockwell'
@@ -301,7 +305,7 @@ def process():
# Ensure types are right
# write to TS
out = """// THIS FILE IS AUTO-GENERATED BY migrate.py
export type CalcType = 'standard' | 'inverse' | '3col' | '3col-mul' | 'base' | 'text-bin' | 'bin-text' | 'dms-dd' | 'dd-dms' | 'dec-frac' | 'db-int' | 'db-spl' | 'db-v' | 'db-w' | 'awg' | 'brinell-rockwell';
export type CalcType = 'standard' | 'inverse' | '3col' | '3col-mul' | 'base' | 'text-bin' | 'bin-text' | 'dms-dd' | 'dd-dms' | 'dec-frac' | 'db-int' | 'db-spl' | 'db-v' | 'db-w' | 'awg' | 'brinell-rockwell' | 'ev-lux' | 'aov';
export interface CalculatorDef {
slug: string;