Add base conversions and refresh palette theme

This commit is contained in:
Codex
2026-03-07 21:13:37 +00:00
parent 82dd971200
commit 16ca847d55
5 changed files with 144 additions and 9 deletions

View File

@@ -513,6 +513,46 @@ The registry currently contains 416 unique calculator slugs.
| Octal to Binary Convert base-8 numbers into binary digits. | octal-to-binary | 8_to_2 |
| Octal to Decimal Convert base-8 digits into decimal values. | octal-to-decimal | 8_to_10 |
| Octal to Hex Express octal numbers as hexadecimal. | octal-to-hex | 8_to_16 |
| Base 2 to Base 3 Translate binary digits into ternary format for alternate radix comparisons. | base-2-to-base-3 | Base 2 → 3 |
| Base 2 to Base 4 Group binary bits into quaternary digits for compact notation. | base-2-to-base-4 | Base 2 → 4 |
| Base 2 to Base 5 Reframe base-2 quantities as base-5 digits when analyzing quinary systems. | base-2-to-base-5 | Base 2 → 5 |
| Base 2 to Base 6 Express binary numbers as base-6 figures for seximal conversions. | base-2-to-base-6 | Base 2 → 6 |
| Base 2 to Base 7 Compare binary data with septenary digits by converting between the bases. | base-2-to-base-7 | Base 2 → 7 |
| Base 2 to Base 9 Translate binary magnitudes into base-9 representation for cultural numeral work. | base-2-to-base-9 | Base 2 → 9 |
| Base 2 to Base 11 Switch binary values into base-11 to explore undecimal patterns. | base-2-to-base-11 | Base 2 → 11 |
| Base 2 to Base 12 Re-express bits as duodecimal digits for dozenal studies. | base-2-to-base-12 | Base 2 → 12 |
| Base 2 to Base 13 Convert binary into tridecimal digits for creative numeral experiments. | base-2-to-base-13 | Base 2 → 13 |
| Base 2 to Base 14 Translate binary streams into tetradecimal digits for base-14 comparisons. | base-2-to-base-14 | Base 2 → 14 |
| Base 3 to Base 2 Return ternary digits back into binary for systems that rely on base-2 processors. | base-3-to-base-2 | Base 3 → 2 |
| Base 3 to Base 4 Convert ternary values into quaternary digits for cross-radix conversions. | base-3-to-base-4 | Base 3 → 4 |
| Base 3 to Base 5 Express base-3 magnitude as base-5 digits to bridge different numeral pools. | base-3-to-base-5 | Base 3 → 5 |
| Base 3 to Base 6 Convert ternary numbers into base-6 to align with seximal systems. | base-3-to-base-6 | Base 3 → 6 |
| Base 3 to Base 7 Translate ternary digits into septenary notation for niche radices. | base-3-to-base-7 | Base 3 → 7 |
| Base 3 to Base 8 Encode base-3 values as octal digits for legacy computing contexts. | base-3-to-base-8 | Base 3 → 8 |
| Base 3 to Base 9 Reframe ternary numbers as base-9 digits for nonary comparisons. | base-3-to-base-9 | Base 3 → 9 |
| Base 3 to Base 10 Bring ternary measurements into decimal for common calculations. | base-3-to-base-10 | Base 3 → 10 |
| Base 4 to Base 2 Collapse quaternary digits back into binary bits for digital systems. | base-4-to-base-2 | Base 4 → 2 |
| Base 4 to Base 3 Convert quaternary values into ternary digits for culture-specific bases. | base-4-to-base-3 | Base 4 → 3 |
| Base 4 to Base 5 Express base-4 digits as base-5 to compare across radices. | base-4-to-base-5 | Base 4 → 5 |
| Base 4 to Base 7 Translate base-4 magnitudes into septenary notation for space exploration contexts. | base-4-to-base-7 | Base 4 → 7 |
| Base 4 to Base 8 Convert quaternary streams into octal digits for computing artifacts. | base-4-to-base-8 | Base 4 → 8 |
| Base 4 to Base 10 Bring quaternary numbers into decimal across human-friendly radices. | base-4-to-base-10 | Base 4 → 10 |
| Base 5 to Base 2 Decompose quinary digits into binary bits for digital translation. | base-5-to-base-2 | Base 5 → 2 |
| Base 5 to Base 3 Turn quinary values into ternary digits for alternate radices. | base-5-to-base-3 | Base 5 → 3 |
| Base 5 to Base 6 Express base-5 data as base-6 digits for seximal comparisons. | base-5-to-base-6 | Base 5 → 6 |
| Base 5 to Base 10 Convert quinary counts into decimals for everyday math. | base-5-to-base-10 | Base 5 → 10 |
| Base 6 to Base 2 Recast sextimal digits into binary for electronics. | base-6-to-base-2 | Base 6 → 2 |
| Base 6 to Base 5 Translate base-6 magnitudes into quinary digits for cultural math. | base-6-to-base-5 | Base 6 → 5 |
| Base 6 to Base 10 Express seximal data in decimal for typical calculators. | base-6-to-base-10 | Base 6 → 10 |
| Base 7 to Base 2 Break down septenary digits into binary bits for processors. | base-7-to-base-2 | Base 7 → 2 |
| Base 7 to Base 5 Convert septenary numbers into base-5 digits for quinary comparisons. | base-7-to-base-5 | Base 7 → 5 |
| Base 7 to Base 8 Re-express base-7 values as octal digits for digital gear. | base-7-to-base-8 | Base 7 → 8 |
| Base 7 to Base 10 Translate septenary magnitudes into decimal for general audiences. | base-7-to-base-10 | Base 7 → 10 |
| Base 8 to Base 3 Turn octal digits into ternary numbers for unique radices. | base-8-to-base-3 | Base 8 → 3 |
| Base 8 to Base 5 Express octal values as base-5 digits to cross-check radices. | base-8-to-base-5 | Base 8 → 5 |
| Base 8 to Base 7 Convert octal numbers into septenary digits for base-7 models. | base-8-to-base-7 | Base 8 → 7 |
| Base 8 to Base 9 Translate octal digits into base-9 notation for nonary math. | base-8-to-base-9 | Base 8 → 9 |
| Base 8 to Base 10 Reframe octal quantities in decimal for common use. | base-8-to-base-10 | Base 8 → 10 |
| Watts to amps | watts-to-amps | Multi-Variable |
| Volts to amps | volts-to-amps | Multi-Variable |
| Volts to Abvolts Convert SI volts into CGS abvolts. | volts-to-abvolts | 1e+08 |
@@ -2380,6 +2420,46 @@ The registry currently contains 416 unique calculator slugs.
- [x] Hertz to Kilohertz (1 hertz = 0.001 kilohertz)
- [x] Hertz to RPM (1 hertz = 60 RPM)
- [x] Hex to Octal (base-16 digits convert directly to base-8 representation)
- [x] Base 2 to Base 3 (`base-2-to-base-3`)
- [x] Base 2 to Base 4 (`base-2-to-base-4`)
- [x] Base 2 to Base 5 (`base-2-to-base-5`)
- [x] Base 2 to Base 6 (`base-2-to-base-6`)
- [x] Base 2 to Base 7 (`base-2-to-base-7`)
- [x] Base 2 to Base 9 (`base-2-to-base-9`)
- [x] Base 2 to Base 11 (`base-2-to-base-11`)
- [x] Base 2 to Base 12 (`base-2-to-base-12`)
- [x] Base 2 to Base 13 (`base-2-to-base-13`)
- [x] Base 2 to Base 14 (`base-2-to-base-14`)
- [x] Base 3 to Base 2 (`base-3-to-base-2`)
- [x] Base 3 to Base 4 (`base-3-to-base-4`)
- [x] Base 3 to Base 5 (`base-3-to-base-5`)
- [x] Base 3 to Base 6 (`base-3-to-base-6`)
- [x] Base 3 to Base 7 (`base-3-to-base-7`)
- [x] Base 3 to Base 8 (`base-3-to-base-8`)
- [x] Base 3 to Base 9 (`base-3-to-base-9`)
- [x] Base 3 to Base 10 (`base-3-to-base-10`)
- [x] Base 4 to Base 2 (`base-4-to-base-2`)
- [x] Base 4 to Base 3 (`base-4-to-base-3`)
- [x] Base 4 to Base 5 (`base-4-to-base-5`)
- [x] Base 4 to Base 7 (`base-4-to-base-7`)
- [x] Base 4 to Base 8 (`base-4-to-base-8`)
- [x] Base 4 to Base 10 (`base-4-to-base-10`)
- [x] Base 5 to Base 2 (`base-5-to-base-2`)
- [x] Base 5 to Base 3 (`base-5-to-base-3`)
- [x] Base 5 to Base 6 (`base-5-to-base-6`)
- [x] Base 5 to Base 10 (`base-5-to-base-10`)
- [x] Base 6 to Base 2 (`base-6-to-base-2`)
- [x] Base 6 to Base 5 (`base-6-to-base-5`)
- [x] Base 6 to Base 10 (`base-6-to-base-10`)
- [x] Base 7 to Base 2 (`base-7-to-base-2`)
- [x] Base 7 to Base 5 (`base-7-to-base-5`)
- [x] Base 7 to Base 8 (`base-7-to-base-8`)
- [x] Base 7 to Base 10 (`base-7-to-base-10`)
- [x] Base 8 to Base 3 (`base-8-to-base-3`)
- [x] Base 8 to Base 5 (`base-8-to-base-5`)
- [x] Base 8 to Base 7 (`base-8-to-base-7`)
- [x] Base 8 to Base 9 (`base-8-to-base-9`)
- [x] Base 8 to Base 10 (`base-8-to-base-10`)
- [x] Hogshead to Liters (1 US hogshead ≈ 238.481 liters)
- [x] Horsepower to BTU/hour (1 horsepower ≈ 2,544.43 BTU/hour)
- [x] Horsepower to Tons of Refrigeration (1 horsepower ≈ 0.284345 tons of refrigeration)

View File

@@ -350,9 +350,6 @@ a:hover {
.palette-dot:hover {
transform: translateY(-1px);
}
.palette-dot.active {
order: -1;
}
.palette-dot.active,
.palette-dot:focus-visible {
border-color: var(--accent);
@@ -368,6 +365,9 @@ a:hover {
opacity: 0;
pointer-events: none;
}
.floating-palette-controls:not(:hover):not(:focus-within) .palette-dot.active {
order: -1;
}
.floating-palette-controls:hover .palette-dots,
.floating-palette-controls:focus-within .palette-dots {
max-width: 360px;

View File

@@ -545,6 +545,46 @@ export const calculators: CalculatorDef[] = [
{"slug": "octal-to-binary", "name": "Octal to Binary", "category": "number-systems", "type": "standard", "teaser": "Convert base-8 numbers into binary digits.", "labels": {"in1": "Octal", "in2": "Binary"}, "hidden": true},
{"slug": "octal-to-decimal", "name": "Octal to Decimal", "category": "number-systems", "type": "standard", "teaser": "Convert base-8 digits into decimal values.", "labels": {"in1": "Octal", "in2": "Decimal"}, "hidden": true},
{"slug": "octal-to-hex", "name": "Octal to Hex", "category": "number-systems", "type": "standard", "teaser": "Express octal numbers as hexadecimal.", "labels": {"in1": "Octal", "in2": "Hex"}, "hidden": true},
{"slug": "base-2-to-base-3", "name": "Base 2 to Base 3", "category": "number-systems", "type": "base", "teaser": "Translate binary digits into ternary format for alternate radix comparisons.", "labels": {"in1": "Base 2", "in2": "Base 3"}, "fromBase": 2, "toBase": 3},
{"slug": "base-2-to-base-4", "name": "Base 2 to Base 4", "category": "number-systems", "type": "base", "teaser": "Group binary bits into quaternary digits for compact notation.", "labels": {"in1": "Base 2", "in2": "Base 4"}, "fromBase": 2, "toBase": 4},
{"slug": "base-2-to-base-5", "name": "Base 2 to Base 5", "category": "number-systems", "type": "base", "teaser": "Reframe base-2 quantities as base-5 digits when analyzing quinary systems.", "labels": {"in1": "Base 2", "in2": "Base 5"}, "fromBase": 2, "toBase": 5},
{"slug": "base-2-to-base-6", "name": "Base 2 to Base 6", "category": "number-systems", "type": "base", "teaser": "Express binary numbers as base-6 figures for seximal conversions.", "labels": {"in1": "Base 2", "in2": "Base 6"}, "fromBase": 2, "toBase": 6},
{"slug": "base-2-to-base-7", "name": "Base 2 to Base 7", "category": "number-systems", "type": "base", "teaser": "Compare binary data with septenary digits by converting between the bases.", "labels": {"in1": "Base 2", "in2": "Base 7"}, "fromBase": 2, "toBase": 7},
{"slug": "base-2-to-base-9", "name": "Base 2 to Base 9", "category": "number-systems", "type": "base", "teaser": "Translate binary magnitudes into base-9 representation for cultural numeral work.", "labels": {"in1": "Base 2", "in2": "Base 9"}, "fromBase": 2, "toBase": 9},
{"slug": "base-2-to-base-11", "name": "Base 2 to Base 11", "category": "number-systems", "type": "base", "teaser": "Switch binary values into base-11 to explore undecimal patterns.", "labels": {"in1": "Base 2", "in2": "Base 11"}, "fromBase": 2, "toBase": 11},
{"slug": "base-2-to-base-12", "name": "Base 2 to Base 12", "category": "number-systems", "type": "base", "teaser": "Re-express bits as duodecimal digits for dozenal studies.", "labels": {"in1": "Base 2", "in2": "Base 12"}, "fromBase": 2, "toBase": 12},
{"slug": "base-2-to-base-13", "name": "Base 2 to Base 13", "category": "number-systems", "type": "base", "teaser": "Convert binary into tridecimal digits for creative numeral experiments.", "labels": {"in1": "Base 2", "in2": "Base 13"}, "fromBase": 2, "toBase": 13},
{"slug": "base-2-to-base-14", "name": "Base 2 to Base 14", "category": "number-systems", "type": "base", "teaser": "Translate binary streams into tetradecimal digits for base-14 comparisons.", "labels": {"in1": "Base 2", "in2": "Base 14"}, "fromBase": 2, "toBase": 14},
{"slug": "base-3-to-base-2", "name": "Base 3 to Base 2", "category": "number-systems", "type": "base", "teaser": "Return ternary digits back into binary for systems that rely on base-2 processors.", "labels": {"in1": "Base 3", "in2": "Base 2"}, "fromBase": 3, "toBase": 2, "hidden": true},
{"slug": "base-3-to-base-4", "name": "Base 3 to Base 4", "category": "number-systems", "type": "base", "teaser": "Convert ternary values into quaternary digits for cross-radix conversions.", "labels": {"in1": "Base 3", "in2": "Base 4"}, "fromBase": 3, "toBase": 4},
{"slug": "base-3-to-base-5", "name": "Base 3 to Base 5", "category": "number-systems", "type": "base", "teaser": "Express base-3 magnitude as base-5 digits to bridge different numeral pools.", "labels": {"in1": "Base 3", "in2": "Base 5"}, "fromBase": 3, "toBase": 5},
{"slug": "base-3-to-base-6", "name": "Base 3 to Base 6", "category": "number-systems", "type": "base", "teaser": "Convert ternary numbers into base-6 to align with seximal systems.", "labels": {"in1": "Base 3", "in2": "Base 6"}, "fromBase": 3, "toBase": 6},
{"slug": "base-3-to-base-7", "name": "Base 3 to Base 7", "category": "number-systems", "type": "base", "teaser": "Translate ternary digits into septenary notation for niche radices.", "labels": {"in1": "Base 3", "in2": "Base 7"}, "fromBase": 3, "toBase": 7},
{"slug": "base-3-to-base-8", "name": "Base 3 to Base 8", "category": "number-systems", "type": "base", "teaser": "Encode base-3 values as octal digits for legacy computing contexts.", "labels": {"in1": "Base 3", "in2": "Base 8"}, "fromBase": 3, "toBase": 8},
{"slug": "base-3-to-base-9", "name": "Base 3 to Base 9", "category": "number-systems", "type": "base", "teaser": "Reframe ternary numbers as base-9 digits for nonary comparisons.", "labels": {"in1": "Base 3", "in2": "Base 9"}, "fromBase": 3, "toBase": 9},
{"slug": "base-3-to-base-10", "name": "Base 3 to Base 10", "category": "number-systems", "type": "base", "teaser": "Bring ternary measurements into decimal for common calculations.", "labels": {"in1": "Base 3", "in2": "Base 10"}, "fromBase": 3, "toBase": 10},
{"slug": "base-4-to-base-2", "name": "Base 4 to Base 2", "category": "number-systems", "type": "base", "teaser": "Collapse quaternary digits back into binary bits for digital systems.", "labels": {"in1": "Base 4", "in2": "Base 2"}, "fromBase": 4, "toBase": 2, "hidden": true},
{"slug": "base-4-to-base-3", "name": "Base 4 to Base 3", "category": "number-systems", "type": "base", "teaser": "Convert quaternary values into ternary digits for culture-specific bases.", "labels": {"in1": "Base 4", "in2": "Base 3"}, "fromBase": 4, "toBase": 3, "hidden": true},
{"slug": "base-4-to-base-5", "name": "Base 4 to Base 5", "category": "number-systems", "type": "base", "teaser": "Express base-4 digits as base-5 to compare across radices.", "labels": {"in1": "Base 4", "in2": "Base 5"}, "fromBase": 4, "toBase": 5},
{"slug": "base-4-to-base-7", "name": "Base 4 to Base 7", "category": "number-systems", "type": "base", "teaser": "Translate base-4 magnitudes into septenary notation for space exploration contexts.", "labels": {"in1": "Base 4", "in2": "Base 7"}, "fromBase": 4, "toBase": 7},
{"slug": "base-4-to-base-8", "name": "Base 4 to Base 8", "category": "number-systems", "type": "base", "teaser": "Convert quaternary streams into octal digits for computing artifacts.", "labels": {"in1": "Base 4", "in2": "Base 8"}, "fromBase": 4, "toBase": 8},
{"slug": "base-4-to-base-10", "name": "Base 4 to Base 10", "category": "number-systems", "type": "base", "teaser": "Bring quaternary numbers into decimal across human-friendly radices.", "labels": {"in1": "Base 4", "in2": "Base 10"}, "fromBase": 4, "toBase": 10},
{"slug": "base-5-to-base-2", "name": "Base 5 to Base 2", "category": "number-systems", "type": "base", "teaser": "Decompose quinary digits into binary bits for digital translation.", "labels": {"in1": "Base 5", "in2": "Base 2"}, "fromBase": 5, "toBase": 2, "hidden": true},
{"slug": "base-5-to-base-3", "name": "Base 5 to Base 3", "category": "number-systems", "type": "base", "teaser": "Turn quinary values into ternary digits for alternate radices.", "labels": {"in1": "Base 5", "in2": "Base 3"}, "fromBase": 5, "toBase": 3, "hidden": true},
{"slug": "base-5-to-base-6", "name": "Base 5 to Base 6", "category": "number-systems", "type": "base", "teaser": "Express base-5 data as base-6 digits for seximal comparisons.", "labels": {"in1": "Base 5", "in2": "Base 6"}, "fromBase": 5, "toBase": 6},
{"slug": "base-5-to-base-10", "name": "Base 5 to Base 10", "category": "number-systems", "type": "base", "teaser": "Convert quinary counts into decimals for everyday math.", "labels": {"in1": "Base 5", "in2": "Base 10"}, "fromBase": 5, "toBase": 10},
{"slug": "base-6-to-base-2", "name": "Base 6 to Base 2", "category": "number-systems", "type": "base", "teaser": "Recast sextimal digits into binary for electronics.", "labels": {"in1": "Base 6", "in2": "Base 2"}, "fromBase": 6, "toBase": 2, "hidden": true},
{"slug": "base-6-to-base-5", "name": "Base 6 to Base 5", "category": "number-systems", "type": "base", "teaser": "Translate base-6 magnitudes into quinary digits for cultural math.", "labels": {"in1": "Base 6", "in2": "Base 5"}, "fromBase": 6, "toBase": 5, "hidden": true},
{"slug": "base-6-to-base-10", "name": "Base 6 to Base 10", "category": "number-systems", "type": "base", "teaser": "Express seximal data in decimal for typical calculators.", "labels": {"in1": "Base 6", "in2": "Base 10"}, "fromBase": 6, "toBase": 10},
{"slug": "base-7-to-base-2", "name": "Base 7 to Base 2", "category": "number-systems", "type": "base", "teaser": "Break down septenary digits into binary bits for processors.", "labels": {"in1": "Base 7", "in2": "Base 2"}, "fromBase": 7, "toBase": 2, "hidden": true},
{"slug": "base-7-to-base-5", "name": "Base 7 to Base 5", "category": "number-systems", "type": "base", "teaser": "Convert septenary numbers into base-5 digits for quinary comparisons.", "labels": {"in1": "Base 7", "in2": "Base 5"}, "fromBase": 7, "toBase": 5},
{"slug": "base-7-to-base-8", "name": "Base 7 to Base 8", "category": "number-systems", "type": "base", "teaser": "Re-express base-7 values as octal digits for digital gear.", "labels": {"in1": "Base 7", "in2": "Base 8"}, "fromBase": 7, "toBase": 8},
{"slug": "base-7-to-base-10", "name": "Base 7 to Base 10", "category": "number-systems", "type": "base", "teaser": "Translate septenary magnitudes into decimal for general audiences.", "labels": {"in1": "Base 7", "in2": "Base 10"}, "fromBase": 7, "toBase": 10},
{"slug": "base-8-to-base-3", "name": "Base 8 to Base 3", "category": "number-systems", "type": "base", "teaser": "Turn octal digits into ternary numbers for unique radices.", "labels": {"in1": "Base 8", "in2": "Base 3"}, "fromBase": 8, "toBase": 3, "hidden": true},
{"slug": "base-8-to-base-5", "name": "Base 8 to Base 5", "category": "number-systems", "type": "base", "teaser": "Express octal values as base-5 digits to cross-check radices.", "labels": {"in1": "Base 8", "in2": "Base 5"}, "fromBase": 8, "toBase": 5},
{"slug": "base-8-to-base-7", "name": "Base 8 to Base 7", "category": "number-systems", "type": "base", "teaser": "Convert octal numbers into septenary digits for base-7 models.", "labels": {"in1": "Base 8", "in2": "Base 7"}, "fromBase": 8, "toBase": 7, "hidden": true},
{"slug": "base-8-to-base-9", "name": "Base 8 to Base 9", "category": "number-systems", "type": "base", "teaser": "Translate octal digits into base-9 notation for nonary math.", "labels": {"in1": "Base 8", "in2": "Base 9"}, "fromBase": 8, "toBase": 9},
{"slug": "base-8-to-base-10", "name": "Base 8 to Base 10", "category": "number-systems", "type": "base", "teaser": "Reframe octal quantities in decimal for common use.", "labels": {"in1": "Base 8", "in2": "Base 10"}, "fromBase": 8, "toBase": 10},
{"slug": "watts-to-amps", "name": "Watts to amps", "category": "power", "type": "3col", "labels": {"in1": "Watts", "in2": "amps", "in3": "Volts"}, "hidden": true},
{"slug": "volts-to-amps", "name": "Volts to amps", "category": "electrical", "type": "3col", "labels": {"in1": "Volts", "in2": "amps", "in3": "Result"}, "hidden": true},
{"slug": "volts-to-abvolts", "name": "Volts to Abvolts", "category": "electrical", "type": "standard", "teaser": "Convert SI volts into CGS abvolts.", "labels": {"in1": "Volts", "in2": "Abvolts"}, "factor": 100000000.0},

View File

@@ -225,12 +225,12 @@
'input-bg': '#fff4d8',
'hover-bg': '#ffeec1',
'border': 'rgba(250, 204, 21, 0.25)',
'text': '#2b2509',
'text-muted': '#6d5f2a',
'accent': '#facc15',
'accent-dark': '#b45309',
'accent-glow': 'rgba(250, 204, 21, 0.2)',
'accent-gradient': 'linear-gradient(135deg, #facc15, #f97316)',
'text': '#1f1505',
'text-muted': '#5b4a1e',
'accent': '#fbbf24',
'accent-dark': '#c2410c',
'accent-glow': 'rgba(250, 204, 21, 0.3)',
'accent-gradient': 'linear-gradient(135deg, #fbbf24, #d97706)',
'header-bg': 'rgba(255, 255, 255, 0.98)',
},
dark: {

View File

@@ -76,6 +76,8 @@ def guess_category(name):
if any(x in name_l for x in ['binary', 'hex', 'octal', 'decimal', 'ascii', 'fraction']): return 'number-systems'
if any(x in name_l for x in ['becquerel', 'curie', 'gray', 'rad', 'sievert', 'rem', 'roentgen', 'rutherford']): return 'radiation'
if any(x in name_l for x in ['volt', 'amp', 'ohm', 'siemens', 'farad', 'henry', 'coulomb']): return 'electrical'
if any(x in name_l for x in ['binary', 'hex', 'octal', 'decimal', 'base']):
return 'number-systems'
return 'other'
def process():
@@ -193,6 +195,19 @@ def process():
if 'decimal' in slug:
if slug.startswith('decimal'): entry['fromBase'] = 10
else: entry['toBase'] = 10
if 'base-' in slug:
parts = slug.split('-')
if len(parts) >= 5 and parts[0] == 'base' and parts[2] == 'to' and parts[3] == 'base':
try:
entry.setdefault('fromBase', int(parts[1]))
entry.setdefault('toBase', int(parts[4]))
except ValueError:
pass
if 'base' in factor_raw.lower():
match = re.search(r'base\\s*(\\d+)\\s*(?:→|to)\\s*(?:base\\s*)?(\\d+)', factor_raw, re.IGNORECASE)
if match:
entry.setdefault('fromBase', int(match.group(1)))
entry.setdefault('toBase', int(match.group(2)))
if category == 'data' and c_type == 'standard':
# Fix data scale names and factors