fixes
This commit is contained in:
@@ -41,10 +41,10 @@ export const calculators: CalculatorDef[] = [
|
||||
{"slug": "kilograms-to-pounds", "name": "Kilograms to Pounds \u2013 A cyclist weighing 68 kilograms wonders how many pounds the scale will show.", "category": "weight", "type": "standard", "labels": {"in1": "Kilograms", "in2": "Pounds \u2013 A cyclist weighing 68 kilograms wonders how many pounds the scale will show."}, "factor": 0.453592},
|
||||
{"slug": "miles-to-kilometers", "name": "Miles to Kilometers \u2013 Planning a road trip, how many kilometers will 120 miles travel?", "category": "length", "type": "standard", "labels": {"in1": "Miles", "in2": "Kilometers \u2013 Planning a road trip, how many kilometers will 120 miles travel?"}, "factor": 0.62137119},
|
||||
{"slug": "acres-to-hectares", "name": "Acres to Hectares \u2013 A 50-acre farm prompts the question: how many hectares does it include?", "category": "area", "type": "standard", "labels": {"in1": "Acres", "in2": "Hectares \u2013 A 50-acre farm prompts the question: how many hectares does it include?"}, "factor": 0.404686},
|
||||
{"slug": "acres-to-square-feet", "name": "Acres to Square Feet \u2013 For the listing, convert 2 acres into square feet to describe the lot size.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 43560.0},
|
||||
{"slug": "angstroms-to-nanometers", "name": "Angstroms to Nanometers \u2013 A materials scientist changes 25 angstroms into nanometers to describe a film thickness.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.1},
|
||||
{"slug": "acres-to-square-feet", "name": "Acres to Square Feet \u2013 For the listing, convert 2 acres into square feet to describe the lot size.", "category": "length", "type": "standard", "labels": {"in1": "Acres", "in2": "Square Feet \u2013 For the listing, convert 2 acres into square feet to describe the lot size."}, "factor": 43560.0},
|
||||
{"slug": "angstroms-to-nanometers", "name": "Angstroms to Nanometers \u2013 A materials scientist changes 25 angstroms into nanometers to describe a film thickness.", "category": "length", "type": "standard", "labels": {"in1": "Angstroms", "in2": "Nanometers \u2013 A materials scientist changes 25 angstroms into nanometers to describe a film thickness."}, "factor": 0.1},
|
||||
{"slug": "apothecary-ounces-to-grams", "name": "Apothecary Ounces to Grams \u2013 Preparing a tincture, how many grams are packed in 8 apothecary ounces?", "category": "weight", "type": "standard", "labels": {"in1": "Apothecary Ounces", "in2": "Grams \u2013 Preparing a tincture, how many grams are packed in 8 apothecary ounces?"}, "factor": 31.1034768},
|
||||
{"slug": "astronomical-units-to-light-years", "name": "Astronomical Units to Light Years \u2013 The astronomer asks how many light years correspond to 5 astronomical units.", "category": "time", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1.58125074e-05},
|
||||
{"slug": "astronomical-units-to-light-years", "name": "Astronomical Units to Light Years \u2013 The astronomer asks how many light years correspond to 5 astronomical units.", "category": "time", "type": "standard", "labels": {"in1": "Astronomical Units", "in2": "Light Years \u2013 The astronomer asks how many light years correspond to 5 astronomical units."}, "factor": 1.58125074e-05},
|
||||
{"slug": "atmosphere-to-mmhg", "name": "Atmosphere to mmHg \u2013 In the lab, what is 2 atmospheres of pressure in millimeters of mercury?", "category": "length", "type": "standard", "labels": {"in1": "Atmosphere", "in2": "mmHg \u2013 In the lab, what is 2 atmospheres of pressure in millimeters of mercury?"}, "factor": 760.0},
|
||||
{"slug": "attograms-to-femtograms", "name": "Attograms to Femtograms \u2013 To compare particle masses, convert 150 attograms into femtograms.", "category": "weight", "type": "standard", "labels": {"in1": "Attograms", "in2": "Femtograms \u2013 To compare particle masses, convert 150 attograms into femtograms."}, "factor": 0.001},
|
||||
{"slug": "bar-to-pascal", "name": "Bar to Pascal", "category": "pressure", "type": "standard", "labels": {"in1": "Bar", "in2": "Pascal"}, "factor": 100000.0},
|
||||
@@ -258,49 +258,49 @@ export const calculators: CalculatorDef[] = [
|
||||
{"slug": "nanograms-to-picograms", "name": "Nanograms to picograms", "category": "weight", "type": "standard", "labels": {"in1": "Nanograms", "in2": "picograms"}, "factor": 1000.0},
|
||||
{"slug": "metric-tons-to-long-tons", "name": "Metric tons to long tons", "category": "weight", "type": "standard", "labels": {"in1": "Metric tons", "in2": "long tons"}, "factor": 0.9842},
|
||||
{"slug": "lumens-to-candela", "name": "Lumens to candela", "category": "light", "type": "standard", "labels": {"in1": "Lumens", "in2": "candela"}, "factor": 0.079577, "hidden": true},
|
||||
{"slug": "gsm-to-ounces-per-sq-yard", "name": "GSM to Ounces per sq yard \u2013 Convert GSM to Ounces per sq yard instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.02952},
|
||||
{"slug": "hands-to-centimeters", "name": "Hands to Centimeters \u2013 Convert Hands to Centimeters instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 10.16},
|
||||
{"slug": "hands-to-inches", "name": "Hands to Inches \u2013 Convert Hands to Inches instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 4.0},
|
||||
{"slug": "hartree-to-electron-volts", "name": "Hartree to Electron-volts \u2013 Convert Hartree to Electron-volts instantly.", "category": "energy", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 27.2114},
|
||||
{"slug": "hectares-to-ares", "name": "Hectares to Ares \u2013 Convert Hectares to Ares instantly.", "category": "area", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 100.0},
|
||||
{"slug": "hectares-to-square-feet", "name": "Hectares to Square Feet \u2013 Convert Hectares to Square Feet instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 107639.0},
|
||||
{"slug": "hectares-to-square-kilometers", "name": "Hectares to Square Kilometers \u2013 Convert Hectares to Square Kilometers instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.01},
|
||||
{"slug": "hectares-to-square-meters", "name": "Hectares to Square Meters \u2013 Convert Hectares to Square Meters instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 10000.0},
|
||||
{"slug": "hectopascals-to-atmosphere", "name": "Hectopascals to Atmosphere \u2013 Convert Hectopascals to Atmosphere instantly.", "category": "pressure", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.000986923},
|
||||
{"slug": "hectopascals-to-bar", "name": "Hectopascals to Bar \u2013 Convert Hectopascals to Bar instantly.", "category": "pressure", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.001},
|
||||
{"slug": "hectopascals-to-psi", "name": "Hectopascals to PSI \u2013 Convert Hectopascals to PSI instantly.", "category": "pressure", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.0145038},
|
||||
{"slug": "henries-to-millihenries", "name": "Henries to Millihenries \u2013 Convert Henries to Millihenries instantly.", "category": "other", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1000.0},
|
||||
{"slug": "hertz-to-kilohertz", "name": "Hertz to Kilohertz \u2013 Convert Hertz to Kilohertz instantly.", "category": "other", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.001},
|
||||
{"slug": "hertz-to-rpm", "name": "Hertz to RPM \u2013 Convert Hertz to RPM instantly.", "category": "speed", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 60.0},
|
||||
{"slug": "hex-to-octal", "name": "Hex to Octal \u2013 Convert Hex to Octal instantly.", "category": "number-systems", "type": "base", "labels": {"in1": "From", "in2": "To"}, "fromBase": 16, "toBase": 8},
|
||||
{"slug": "hogshead-to-liters", "name": "Hogshead to Liters \u2013 Convert Hogshead (US) to Liters instantly.", "category": "volume", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 238.481},
|
||||
{"slug": "horsepower-to-btuhour", "name": "Horsepower to BTU/hour \u2013 Convert Horsepower to BTU/hour instantly.", "category": "energy", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 2544.43},
|
||||
{"slug": "horsepower-to-tons-of-refrigeration", "name": "Horsepower to Tons of Refrigeration \u2013 Convert Horsepower to Tons of Refrigeration instantly.", "category": "weight", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.284345},
|
||||
{"slug": "horsepower-to-watts", "name": "Horsepower to Watts \u2013 Convert Horsepower to Watts instantly.", "category": "power", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 745.7},
|
||||
{"slug": "hours-to-seconds", "name": "Hours to Seconds \u2013 Convert Hours to Seconds instantly.", "category": "time", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 3600.0},
|
||||
{"slug": "hours-to-weeks", "name": "Hours to Weeks \u2013 Convert Hours to Weeks instantly.", "category": "time", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.00595238},
|
||||
{"slug": "hundredweight-to-kilograms", "name": "Hundredweight (cwt) to Kilograms \u2013 Convert Hundredweight (cwt) to Kilograms instantly.", "category": "weight", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 45.3592},
|
||||
{"slug": "imperial-fl-oz-to-us-fl-oz", "name": "Imperial fl oz to US fl oz \u2013 Convert Imperial fl oz to US fl oz instantly.", "category": "other", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1.20095},
|
||||
{"slug": "imperial-gallons-to-liters", "name": "Imperial gallons to Liters \u2013 Convert Imperial gallons to Liters instantly.", "category": "volume", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 4.54609},
|
||||
{"slug": "imperial-gallons-to-us-gallons", "name": "Imperial gallons to US gallons \u2013 Convert Imperial gallons to US gallons instantly.", "category": "volume", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1.20095},
|
||||
{"slug": "imperial-pints-to-us-pints", "name": "Imperial pints to US pints \u2013 Convert Imperial pints to US pints instantly.", "category": "volume", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1.20095},
|
||||
{"slug": "inch-pounds-to-foot-pounds", "name": "Inch-Pounds to Foot-Pounds \u2013 Convert Inch-Pounds to Foot-Pounds instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.0833333},
|
||||
{"slug": "inch-pounds-to-newton-meters", "name": "Inch-Pounds to Newton-Meters \u2013 Convert Inch-Pounds to Newton-Meters instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.112985},
|
||||
{"slug": "inches-of-water-to-psi", "name": "Inches of Water to PSI \u2013 Convert Inches of Water to PSI instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.0360912},
|
||||
{"slug": "inches-per-second-to-cm-per-second", "name": "Inches per second to cm per second \u2013 Convert Inches per second to Centimeters per second instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 2.54},
|
||||
{"slug": "inches-to-meters", "name": "Inches to Meters \u2013 Convert Inches to Meters instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.0254},
|
||||
{"slug": "inches-to-points", "name": "Inches to Points \u2013 Convert Inches to Points instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 72.0},
|
||||
{"slug": "inches-to-yards", "name": "Inches to Yards \u2013 Convert Inches to Yards instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.0277778},
|
||||
{"slug": "jansky-to-watts-per-square-meter-per-hertz", "name": "Jansky to Watts per sq meter per Hertz \u2013 Convert Jansky to Watts per square meter per Hertz instantly.", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1e-26},
|
||||
{"slug": "jiffies-to-seconds", "name": "Jiffies to Seconds \u2013 Convert Jiffies to Seconds instantly.", "category": "time", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.01},
|
||||
{"slug": "jiggers-to-milliliters", "name": "Jiggers to Milliliters \u2013 Convert Jiggers to Milliliters instantly.", "category": "volume", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 44.3603},
|
||||
{"slug": "joules-to-btu", "name": "Joules to BTU \u2013 Convert Joules to BTU instantly.", "category": "energy", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.000947817},
|
||||
{"slug": "joules-to-electron-volts", "name": "Joules to Electron-volts \u2013 Convert Joules to Electron-volts instantly.", "category": "energy", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 6.24151e+18},
|
||||
{"slug": "joules-to-foot-pounds", "name": "Joules to Foot-pounds \u2013 Convert Joules to Foot-pounds instantly.", "category": "weight", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 0.737562},
|
||||
{"slug": "joules-to-kilowatt-hours", "name": "Joules to Kilowatt-hours \u2013 Convert Joules to Kilowatt-hours instantly.", "category": "energy", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 2.77778e-07},
|
||||
{"slug": "gsm-to-ounces-per-sq-yard", "name": "GSM to Ounces per sq yard \u2013 Convert GSM to Ounces per sq yard instantly.", "category": "length", "type": "standard", "labels": {"in1": "GSM", "in2": "Ounces per sq yard \u2013 Convert GSM to Ounces per sq yard instantly."}, "factor": 0.02952},
|
||||
{"slug": "hands-to-centimeters", "name": "Hands to Centimeters \u2013 Convert Hands to Centimeters instantly.", "category": "length", "type": "standard", "labels": {"in1": "Hands", "in2": "Centimeters \u2013 Convert Hands to Centimeters instantly."}, "factor": 10.16},
|
||||
{"slug": "hands-to-inches", "name": "Hands to Inches \u2013 Convert Hands to Inches instantly.", "category": "length", "type": "standard", "labels": {"in1": "Hands", "in2": "Inches \u2013 Convert Hands to Inches instantly."}, "factor": 4.0},
|
||||
{"slug": "hartree-to-electron-volts", "name": "Hartree to Electron-volts \u2013 Convert Hartree to Electron-volts instantly.", "category": "energy", "type": "standard", "labels": {"in1": "Hartree", "in2": "Electron-volts \u2013 Convert Hartree to Electron-volts instantly."}, "factor": 27.2114},
|
||||
{"slug": "hectares-to-ares", "name": "Hectares to Ares \u2013 Convert Hectares to Ares instantly.", "category": "area", "type": "standard", "labels": {"in1": "Hectares", "in2": "Ares \u2013 Convert Hectares to Ares instantly."}, "factor": 100.0},
|
||||
{"slug": "hectares-to-square-feet", "name": "Hectares to Square Feet \u2013 Convert Hectares to Square Feet instantly.", "category": "length", "type": "standard", "labels": {"in1": "Hectares", "in2": "Square Feet \u2013 Convert Hectares to Square Feet instantly."}, "factor": 107639.0},
|
||||
{"slug": "hectares-to-square-kilometers", "name": "Hectares to Square Kilometers \u2013 Convert Hectares to Square Kilometers instantly.", "category": "length", "type": "standard", "labels": {"in1": "Hectares", "in2": "Square Kilometers \u2013 Convert Hectares to Square Kilometers instantly."}, "factor": 0.01},
|
||||
{"slug": "hectares-to-square-meters", "name": "Hectares to Square Meters \u2013 Convert Hectares to Square Meters instantly.", "category": "length", "type": "standard", "labels": {"in1": "Hectares", "in2": "Square Meters \u2013 Convert Hectares to Square Meters instantly."}, "factor": 10000.0},
|
||||
{"slug": "hectopascals-to-atmosphere", "name": "Hectopascals to Atmosphere \u2013 Convert Hectopascals to Atmosphere instantly.", "category": "pressure", "type": "standard", "labels": {"in1": "Hectopascals", "in2": "Atmosphere \u2013 Convert Hectopascals to Atmosphere instantly."}, "factor": 0.000986923},
|
||||
{"slug": "hectopascals-to-bar", "name": "Hectopascals to Bar \u2013 Convert Hectopascals to Bar instantly.", "category": "pressure", "type": "standard", "labels": {"in1": "Hectopascals", "in2": "Bar \u2013 Convert Hectopascals to Bar instantly."}, "factor": 0.001},
|
||||
{"slug": "hectopascals-to-psi", "name": "Hectopascals to PSI \u2013 Convert Hectopascals to PSI instantly.", "category": "pressure", "type": "standard", "labels": {"in1": "Hectopascals", "in2": "PSI \u2013 Convert Hectopascals to PSI instantly."}, "factor": 0.0145038},
|
||||
{"slug": "henries-to-millihenries", "name": "Henries to Millihenries \u2013 Convert Henries to Millihenries instantly.", "category": "other", "type": "standard", "labels": {"in1": "Henries", "in2": "Millihenries \u2013 Convert Henries to Millihenries instantly."}, "factor": 1000.0},
|
||||
{"slug": "hertz-to-kilohertz", "name": "Hertz to Kilohertz \u2013 Convert Hertz to Kilohertz instantly.", "category": "other", "type": "standard", "labels": {"in1": "Hertz", "in2": "Kilohertz \u2013 Convert Hertz to Kilohertz instantly."}, "factor": 0.001},
|
||||
{"slug": "hertz-to-rpm", "name": "Hertz to RPM \u2013 Convert Hertz to RPM instantly.", "category": "speed", "type": "standard", "labels": {"in1": "Hertz", "in2": "RPM \u2013 Convert Hertz to RPM instantly."}, "factor": 60.0},
|
||||
{"slug": "hex-to-octal", "name": "Hex to Octal \u2013 Convert Hex to Octal instantly.", "category": "number-systems", "type": "base", "labels": {"in1": "Hex", "in2": "Octal \u2013 Convert Hex to Octal instantly."}, "fromBase": 16, "toBase": 8},
|
||||
{"slug": "hogshead-to-liters", "name": "Hogshead to Liters \u2013 Convert Hogshead (US) to Liters instantly.", "category": "volume", "type": "standard", "labels": {"in1": "Hogshead", "in2": "Liters \u2013 Convert Hogshead (US) to Liters instantly."}, "factor": 238.481},
|
||||
{"slug": "horsepower-to-btuhour", "name": "Horsepower to BTU/hour \u2013 Convert Horsepower to BTU/hour instantly.", "category": "energy", "type": "standard", "labels": {"in1": "Horsepower", "in2": "BTU/hour \u2013 Convert Horsepower to BTU/hour instantly."}, "factor": 2544.43},
|
||||
{"slug": "horsepower-to-tons-of-refrigeration", "name": "Horsepower to Tons of Refrigeration \u2013 Convert Horsepower to Tons of Refrigeration instantly.", "category": "weight", "type": "standard", "labels": {"in1": "Horsepower", "in2": "Tons of Refrigeration \u2013 Convert Horsepower to Tons of Refrigeration instantly."}, "factor": 0.284345},
|
||||
{"slug": "horsepower-to-watts", "name": "Horsepower to Watts \u2013 Convert Horsepower to Watts instantly.", "category": "power", "type": "standard", "labels": {"in1": "Horsepower", "in2": "Watts \u2013 Convert Horsepower to Watts instantly."}, "factor": 745.7},
|
||||
{"slug": "hours-to-seconds", "name": "Hours to Seconds \u2013 Convert Hours to Seconds instantly.", "category": "time", "type": "standard", "labels": {"in1": "Hours", "in2": "Seconds \u2013 Convert Hours to Seconds instantly."}, "factor": 3600.0},
|
||||
{"slug": "hours-to-weeks", "name": "Hours to Weeks \u2013 Convert Hours to Weeks instantly.", "category": "time", "type": "standard", "labels": {"in1": "Hours", "in2": "Weeks \u2013 Convert Hours to Weeks instantly."}, "factor": 0.00595238},
|
||||
{"slug": "hundredweight-to-kilograms", "name": "Hundredweight (cwt) to Kilograms \u2013 Convert Hundredweight (cwt) to Kilograms instantly.", "category": "weight", "type": "standard", "labels": {"in1": "Hundredweight (cwt)", "in2": "Kilograms \u2013 Convert Hundredweight (cwt) to Kilograms instantly."}, "factor": 45.3592},
|
||||
{"slug": "imperial-fl-oz-to-us-fl-oz", "name": "Imperial fl oz to US fl oz \u2013 Convert Imperial fl oz to US fl oz instantly.", "category": "other", "type": "standard", "labels": {"in1": "Imperial fl oz", "in2": "US fl oz \u2013 Convert Imperial fl oz to US fl oz instantly."}, "factor": 1.20095},
|
||||
{"slug": "imperial-gallons-to-liters", "name": "Imperial gallons to Liters \u2013 Convert Imperial gallons to Liters instantly.", "category": "volume", "type": "standard", "labels": {"in1": "Imperial gallons", "in2": "Liters \u2013 Convert Imperial gallons to Liters instantly."}, "factor": 4.54609},
|
||||
{"slug": "imperial-gallons-to-us-gallons", "name": "Imperial gallons to US gallons \u2013 Convert Imperial gallons to US gallons instantly.", "category": "volume", "type": "standard", "labels": {"in1": "Imperial gallons", "in2": "US gallons \u2013 Convert Imperial gallons to US gallons instantly."}, "factor": 1.20095},
|
||||
{"slug": "imperial-pints-to-us-pints", "name": "Imperial pints to US pints \u2013 Convert Imperial pints to US pints instantly.", "category": "volume", "type": "standard", "labels": {"in1": "Imperial pints", "in2": "US pints \u2013 Convert Imperial pints to US pints instantly."}, "factor": 1.20095},
|
||||
{"slug": "inch-pounds-to-foot-pounds", "name": "Inch-Pounds to Foot-Pounds \u2013 Convert Inch-Pounds to Foot-Pounds instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inch-Pounds", "in2": "Foot-Pounds \u2013 Convert Inch-Pounds to Foot-Pounds instantly."}, "factor": 0.0833333},
|
||||
{"slug": "inch-pounds-to-newton-meters", "name": "Inch-Pounds to Newton-Meters \u2013 Convert Inch-Pounds to Newton-Meters instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inch-Pounds", "in2": "Newton-Meters \u2013 Convert Inch-Pounds to Newton-Meters instantly."}, "factor": 0.112985},
|
||||
{"slug": "inches-of-water-to-psi", "name": "Inches of Water to PSI \u2013 Convert Inches of Water to PSI instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inches of Water", "in2": "PSI \u2013 Convert Inches of Water to PSI instantly."}, "factor": 0.0360912},
|
||||
{"slug": "inches-per-second-to-cm-per-second", "name": "Inches per second to cm per second \u2013 Convert Inches per second to Centimeters per second instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inches per second", "in2": "cm per second \u2013 Convert Inches per second to Centimeters per second instantly."}, "factor": 2.54},
|
||||
{"slug": "inches-to-meters", "name": "Inches to Meters \u2013 Convert Inches to Meters instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inches", "in2": "Meters \u2013 Convert Inches to Meters instantly."}, "factor": 0.0254},
|
||||
{"slug": "inches-to-points", "name": "Inches to Points \u2013 Convert Inches to Points instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inches", "in2": "Points \u2013 Convert Inches to Points instantly."}, "factor": 72.0},
|
||||
{"slug": "inches-to-yards", "name": "Inches to Yards \u2013 Convert Inches to Yards instantly.", "category": "length", "type": "standard", "labels": {"in1": "Inches", "in2": "Yards \u2013 Convert Inches to Yards instantly."}, "factor": 0.0277778},
|
||||
{"slug": "jansky-to-watts-per-square-meter-per-hertz", "name": "Jansky to Watts per sq meter per Hertz \u2013 Convert Jansky to Watts per square meter per Hertz instantly.", "category": "length", "type": "standard", "labels": {"in1": "Jansky", "in2": "Watts per sq meter per Hertz \u2013 Convert Jansky to Watts per square meter per Hertz instantly."}, "factor": 1e-26},
|
||||
{"slug": "jiffies-to-seconds", "name": "Jiffies to Seconds \u2013 Convert Jiffies to Seconds instantly.", "category": "time", "type": "standard", "labels": {"in1": "Jiffies", "in2": "Seconds \u2013 Convert Jiffies to Seconds instantly."}, "factor": 0.01},
|
||||
{"slug": "jiggers-to-milliliters", "name": "Jiggers to Milliliters \u2013 Convert Jiggers to Milliliters instantly.", "category": "volume", "type": "standard", "labels": {"in1": "Jiggers", "in2": "Milliliters \u2013 Convert Jiggers to Milliliters instantly."}, "factor": 44.3603},
|
||||
{"slug": "joules-to-btu", "name": "Joules to BTU \u2013 Convert Joules to BTU instantly.", "category": "energy", "type": "standard", "labels": {"in1": "Joules", "in2": "BTU \u2013 Convert Joules to BTU instantly."}, "factor": 0.000947817},
|
||||
{"slug": "joules-to-electron-volts", "name": "Joules to Electron-volts \u2013 Convert Joules to Electron-volts instantly.", "category": "energy", "type": "standard", "labels": {"in1": "Joules", "in2": "Electron-volts \u2013 Convert Joules to Electron-volts instantly."}, "factor": 6.24151e+18},
|
||||
{"slug": "joules-to-foot-pounds", "name": "Joules to Foot-pounds \u2013 Convert Joules to Foot-pounds instantly.", "category": "weight", "type": "standard", "labels": {"in1": "Joules", "in2": "Foot-pounds \u2013 Convert Joules to Foot-pounds instantly."}, "factor": 0.737562},
|
||||
{"slug": "joules-to-kilowatt-hours", "name": "Joules to Kilowatt-hours \u2013 Convert Joules to Kilowatt-hours instantly.", "category": "energy", "type": "standard", "labels": {"in1": "Joules", "in2": "Kilowatt-hours \u2013 Convert Joules to Kilowatt-hours instantly."}, "factor": 2.77778e-07},
|
||||
{"slug": "cubic-feet-to-gallons", "name": "Cubic Feet to Gallons \u2013 If a cistern volume reads three cubic feet, how many US gallons does that store?", "category": "length", "type": "standard", "labels": {"in1": "Cubic Feet", "in2": "Gallons \u2013 If a cistern volume reads three cubic feet, how many US gallons does that store?"}, "factor": 7.48052},
|
||||
{"slug": "cubic-meters-to-cubic-feet", "name": "Cubic Meters to Cubic Feet \u2013 A freight crate is two cubic meters; how many cubic feet of cargo space is that?", "category": "length", "type": "standard", "labels": {"in1": "Cubic Meters", "in2": "Cubic Feet \u2013 A freight crate is two cubic meters; how many cubic feet of cargo space is that?"}, "factor": 35.3147},
|
||||
{"slug": "foot-candles-to-lux", "name": "Foot-candles to Lux \u2013 Gallery staff want to match 150 foot-candles; what does that translate to in lux?", "category": "light", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 10.7639},
|
||||
{"slug": "foot-candles-to-lux", "name": "Foot-candles to Lux \u2013 Gallery staff want to match 150 foot-candles; what does that translate to in lux?", "category": "light", "type": "standard", "labels": {"in1": "Foot-candles", "in2": "Lux \u2013 Gallery staff want to match 150 foot-candles; what does that translate to in lux?"}, "factor": 10.7639},
|
||||
{"slug": "foot-pounds-energy-to-joules", "name": "Foot-pounds (energy) to Joules \u2013 The engine produces five foot-pounds of work; how many joules is that?", "category": "length", "type": "standard", "labels": {"in1": "Foot-pounds (energy)", "in2": "Joules \u2013 The engine produces five foot-pounds of work; how many joules is that?"}, "factor": 1.35581795},
|
||||
{"slug": "foot-pounds-to-inch-pounds", "name": "Foot-Pounds to Inch-Pounds \u2013 A torque spec calls for two foot-pounds; how many inch-pounds is that?", "category": "length", "type": "standard", "labels": {"in1": "Foot-Pounds", "in2": "Inch-Pounds \u2013 A torque spec calls for two foot-pounds; how many inch-pounds is that?"}, "factor": 12.0},
|
||||
{"slug": "fortnights-to-days", "name": "Fortnights to Days \u2013 The rental period lasts three fortnights; how many days will be billed?", "category": "time", "type": "standard", "labels": {"in1": "Fortnights", "in2": "Days \u2013 The rental period lasts three fortnights; how many days will be billed?"}, "factor": 14.0},
|
||||
@@ -315,7 +315,7 @@ export const calculators: CalculatorDef[] = [
|
||||
{"slug": "gallons-to-cups", "name": "Gallons to Cups \u2013 A recipe needs two gallons; how many cups should you measure?", "category": "volume", "type": "standard", "labels": {"in1": "Gallons", "in2": "Cups \u2013 A recipe needs two gallons; how many cups should you measure?"}, "factor": 16.0},
|
||||
{"slug": "gallons-to-fluid-ounces", "name": "Gallons to Fluid Ounces \u2013 A pitcher pours three gallons; how many fluid ounces is that?", "category": "weight", "type": "standard", "labels": {"in1": "Gallons", "in2": "Fluid Ounces \u2013 A pitcher pours three gallons; how many fluid ounces is that?"}, "factor": 128.0},
|
||||
{"slug": "gallons-to-pints", "name": "Gallons to Pints \u2013 Pouring one gallon equals how many pints for serving?", "category": "volume", "type": "standard", "labels": {"in1": "Gallons", "in2": "Pints \u2013 Pouring one gallon equals how many pints for serving?"}, "factor": 8.0},
|
||||
{"slug": "gallons-to-quarts", "name": "Gallons to Quarts \u2013 Four gallons convert to how many quarts for canning?", "category": "volume", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 4.0},
|
||||
{"slug": "gallons-to-quarts", "name": "Gallons to Quarts \u2013 Four gallons convert to how many quarts for canning?", "category": "volume", "type": "standard", "labels": {"in1": "Gallons", "in2": "Quarts \u2013 Four gallons convert to how many quarts for canning?"}, "factor": 4.0},
|
||||
{"slug": "gamma-mass-to-micrograms", "name": "Gamma (mass) to Micrograms \u2013 A lab note shows gamma units; what is that in micrograms?", "category": "weight", "type": "standard", "labels": {"in1": "Gamma (mass)", "in2": "Micrograms \u2013 A lab note shows gamma units; what is that in micrograms?"}},
|
||||
{"slug": "gauss-to-tesla", "name": "Gauss to Tesla \u2013 A field reads five thousand gauss; what is that in tesla?", "category": "other", "type": "standard", "labels": {"in1": "Gauss", "in2": "Tesla \u2013 A field reads five thousand gauss; what is that in tesla?"}, "factor": 0.0001},
|
||||
{"slug": "gbps-to-mbps", "name": "Gbps to Mbps \u2013 A fiber uplink reports 10 Gbps; how many megabits per second of capacity is that?", "category": "speed", "type": "standard", "labels": {"in1": "Gbps", "in2": "Mbps \u2013 A fiber uplink reports 10 Gbps; how many megabits per second of capacity is that?"}, "factor": 1000.0},
|
||||
@@ -330,7 +330,7 @@ export const calculators: CalculatorDef[] = [
|
||||
{"slug": "gradians-to-radians", "name": "Gradians to Radians \u2013 A control dial sweeps 200 gradians; what is that rotation in radians?", "category": "angle", "type": "standard", "labels": {"in1": "Gradians", "in2": "Radians \u2013 A control dial sweeps 200 gradians; what is that rotation in radians?"}, "factor": 0.01570796},
|
||||
{"slug": "grains-to-ounces", "name": "Grains to Ounces \u2013 A jewelry batch weighs 100 grains; how many ounces is that?", "category": "weight", "type": "standard", "labels": {"in1": "Grains", "in2": "Ounces \u2013 A jewelry batch weighs 100 grains; how many ounces is that?"}, "factor": 0.002285714},
|
||||
{"slug": "grams-per-cubic-centimeter-to-kilograms-per-liter", "name": "Grams per cubic centimeter to Kilograms per liter \u2013 A fluid density of 1 g/cm\u00b3 equals how many kg/L?", "category": "length", "type": "standard", "labels": {"in1": "Grams per cubic centimeter", "in2": "Kilograms per liter \u2013 A fluid density of 1 g/cm\u00b3 equals how many kg/L?"}},
|
||||
{"slug": "grams-per-milliliter-to-kilograms-per-cubic-meter", "name": "Grams per milliliter to Kilograms per cubic meter \u2013 A solution at 1.2 g/mL corresponds to how many kg/m\u00b3?", "category": "length", "type": "standard", "labels": {"in1": "From", "in2": "To"}, "factor": 1000.0},
|
||||
{"slug": "grams-per-milliliter-to-kilograms-per-cubic-meter", "name": "Grams per milliliter to Kilograms per cubic meter \u2013 A solution at 1.2 g/mL corresponds to how many kg/m\u00b3?", "category": "length", "type": "standard", "labels": {"in1": "Grams per milliliter", "in2": "Kilograms per cubic meter \u2013 A solution at 1.2 g/mL corresponds to how many kg/m\u00b3?"}, "factor": 1000.0},
|
||||
{"slug": "grams-to-drams", "name": "Grams to Drams \u2013 A tea blend calls for 2 grams; how many drams should you measure?", "category": "weight", "type": "standard", "labels": {"in1": "Grams", "in2": "Drams \u2013 A tea blend calls for 2 grams; how many drams should you measure?"}, "factor": 0.564383},
|
||||
{"slug": "grams-to-kilograms", "name": "Grams to Kilograms \u2013 A parcel weighs 3,000 grams; how many kilograms is that weight?", "category": "weight", "type": "standard", "labels": {"in1": "Grams", "in2": "Kilograms \u2013 A parcel weighs 3,000 grams; how many kilograms is that weight?"}, "factor": 0.001},
|
||||
{"slug": "grams-to-momme", "name": "Grams to Momme \u2013 A silk roll weighs 20 grams; how many momme does that equal?", "category": "weight", "type": "standard", "labels": {"in1": "Grams", "in2": "Momme \u2013 A silk roll weighs 20 grams; how many momme does that equal?"}, "factor": 0.2666667},
|
||||
|
||||
25
migrate.py
25
migrate.py
@@ -1,7 +1,10 @@
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
CALCLIST = '/home/ben/Seafile/Storage/Docs/howdoyouconvert/calculators_list.md'
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
CALCLIST = BASE_DIR / 'calculators_list.md'
|
||||
OUTPUT_FILE = BASE_DIR / 'hdyc-svelte/src/lib/data/calculators.ts'
|
||||
|
||||
def load_external_descriptions():
|
||||
# Placeholder for future enrichment sources.
|
||||
@@ -31,6 +34,12 @@ def parse_calculators_list():
|
||||
|
||||
return active_calcs
|
||||
|
||||
def split_conversion_name(name):
|
||||
parts = re.split(r'\s+to\s+', name, maxsplit=1, flags=re.IGNORECASE)
|
||||
if len(parts) == 2:
|
||||
return parts[0].strip(), parts[1].strip()
|
||||
return None
|
||||
|
||||
def guess_category(name):
|
||||
name_l = name.lower()
|
||||
if any(x in name_l for x in ['meter', 'inch', 'feet', 'yard', 'mile', 'cable', 'fathom', 'rod', 'chain', 'nautical', 'league']): return 'length'
|
||||
@@ -62,9 +71,9 @@ def process():
|
||||
if name == 'Calculator Name' or not slug: continue
|
||||
|
||||
# Name splitting
|
||||
parts = name.split(' to ')
|
||||
if len(parts) == 2:
|
||||
in1, in2 = parts[0].strip(), parts[1].strip()
|
||||
parsed = split_conversion_name(name)
|
||||
if parsed:
|
||||
in1, in2 = parsed
|
||||
else:
|
||||
in1, in2 = "From", "To"
|
||||
|
||||
@@ -219,9 +228,9 @@ def process():
|
||||
for e in calculators_ts_entries:
|
||||
# Check if inverse exists. We hide the one with the smaller factor (usually < 1) or hide alphabetical later one.
|
||||
# But a better heuristic: reverse of split(' to ')
|
||||
parts = e['name'].split(' to ')
|
||||
if len(parts) == 2:
|
||||
rev_name = f"{parts[1]} to {parts[0]}"
|
||||
parsed = split_conversion_name(e['name'])
|
||||
if parsed:
|
||||
rev_name = f"{parsed[1]} to {parsed[0]}"
|
||||
rev_slug = rev_name.lower().replace(' ', '-')
|
||||
if rev_slug in existing_slugs and e['slug'] != rev_slug:
|
||||
# hide one of them. We'll hide the one where factor < 1, or if both 1, arbitrarily
|
||||
@@ -314,7 +323,7 @@ export function searchCalculators(query: string): CalculatorDef[] {
|
||||
);
|
||||
}
|
||||
"""
|
||||
with open('/home/ben/Seafile/Storage/Docs/howdoyouconvert/hdyc-svelte/src/lib/data/calculators.ts', 'w') as f:
|
||||
with open(OUTPUT_FILE, 'w', encoding='utf-8') as f:
|
||||
f.write(out)
|
||||
|
||||
print(f"Generated {len(calculators_ts_entries)} calculators into calculators.ts")
|
||||
|
||||
Reference in New Issue
Block a user