diff --git a/hdyc-svelte/src/lib/data/calculators.ts b/hdyc-svelte/src/lib/data/calculators.ts index 9e60de3..7c48901 100644 --- a/hdyc-svelte/src/lib/data/calculators.ts +++ b/hdyc-svelte/src/lib/data/calculators.ts @@ -43,7 +43,7 @@ export const calculators: CalculatorDef[] = [ {"slug": "miles-to-kilometers", "name": "Miles to Kilometers", "category": "length", "type": "standard", "teaser": "Planning a road trip, how many kilometers will 120 miles travel?", "labels": {"in1": "Miles", "in2": "Kilometers"}, "factor": 0.62137119, "hidden": true}, {"slug": "acres-to-hectares", "name": "Acres to Hectares", "category": "area", "type": "standard", "teaser": "A 50-acre farm prompts the question: how many hectares does it include?", "labels": {"in1": "Acres", "in2": "Hectares"}, "factor": 0.404686}, {"slug": "acres-to-square-feet", "name": "Acres to Square Feet", "category": "area", "type": "standard", "teaser": "For the listing, convert 2 acres into square feet to describe the lot size.", "labels": {"in1": "Acres", "in2": "Square Feet"}, "factor": 43560.0}, - {"slug": "acre-feet-to-liters", "name": "Acre-feet to Liters", "category": "area", "type": "standard", "teaser": "A lake holds 1 acre-foot; how many liters of water is that?", "labels": {"in1": "Acre-feet", "in2": "Liters"}, "factor": 1233481.8375476}, + {"slug": "acre-feet-to-liters", "name": "Acre-feet to Liters", "category": "volume", "type": "standard", "teaser": "A lake holds 1 acre-foot; how many liters of water is that?", "labels": {"in1": "Acre-feet", "in2": "Liters"}, "factor": 1233481.8375476}, {"slug": "acres-to-square-kilometers", "name": "Acres to Square Kilometers", "category": "area", "type": "standard", "teaser": "How many square kilometers cover one acre?", "labels": {"in1": "Acres", "in2": "Square Kilometers"}, "factor": 0.0040468564224, "hidden": true}, {"slug": "acres-to-square-meters", "name": "Acres to Square Meters", "category": "area", "type": "standard", "teaser": "Convert a single acre into square meters.", "labels": {"in1": "Acres", "in2": "Square Meters"}, "factor": 4046.8564224}, {"slug": "acres-to-square-miles", "name": "Acres to Square Miles", "category": "area", "type": "standard", "teaser": "See how many square miles equal one acre.", "labels": {"in1": "Acres", "in2": "Square Miles"}, "factor": 0.0015625, "hidden": true}, @@ -118,7 +118,7 @@ export const calculators: CalculatorDef[] = [ {"slug": "coulombs-to-ampere-hours", "name": "Coulombs to Ampere-hours", "category": "time", "type": "standard", "teaser": "Express a charge in coulombs as ampere-hours.", "labels": {"in1": "Coulombs", "in2": "Ampere-hours"}, "factor": 0.0002777777777777778, "hidden": true}, {"slug": "cups-to-milliliters", "name": "Cups to Milliliters", "category": "volume", "type": "standard", "labels": {"in1": "Cups", "in2": "Milliliters"}, "factor": 236.588237}, {"slug": "cups-to-ounces-weight", "name": "Cups to Ounces (weight)", "category": "weight", "type": "standard", "teaser": "Convert a cup\u2019s weight into ounces for baking measurements.", "labels": {"in1": "Cups", "in2": "Ounces (weight)"}, "factor": 8.0}, - {"slug": "cups-to-acre-feet", "name": "Cups to Acre-feet", "category": "area", "type": "standard", "teaser": "Translate kitchen cups into acre-feet when planning irrigation.", "labels": {"in1": "Cups", "in2": "Acre-feet"}, "factor": 1.918052048260257e-07, "hidden": true}, + {"slug": "cups-to-acre-feet", "name": "Cups to Acre-feet", "category": "volume", "type": "standard", "teaser": "Translate kitchen cups into acre-feet when planning irrigation.", "labels": {"in1": "Cups", "in2": "Acre-feet"}, "factor": 1.918052048260257e-07, "hidden": true}, {"slug": "cups-to-barrel-us-oil", "name": "Cups to Barrel (US oil)", "category": "volume", "type": "standard", "teaser": "Express cup volumes as US oil barrels.", "labels": {"in1": "Cups", "in2": "Barrel (US oil)"}, "factor": 0.001488095238095238}, {"slug": "cups-to-bushels", "name": "Cups to Bushels", "category": "volume", "type": "standard", "teaser": "Count how many cups sit inside a dry bushel.", "labels": {"in1": "Cups", "in2": "Bushels"}, "factor": 0.006713804745119558}, {"slug": "cups-to-centiliters", "name": "Cups to Centiliters", "category": "volume", "type": "standard", "teaser": "Convert cups into centiliters for precision cooking.", "labels": {"in1": "Cups", "in2": "Centiliters"}, "factor": 23.65882365}, @@ -901,7 +901,7 @@ export const calculators: CalculatorDef[] = [ {"slug": "liters-to-imperial-gallons", "name": "Liters to Imperial gallons", "category": "volume", "type": "standard", "teaser": "Convert liters to imperial gallons.", "labels": {"in1": "Liters", "in2": "Imperial gallons"}, "factor": 0.219969158, "hidden": true}, {"slug": "liters-to-milliliters", "name": "Liters to Milliliters", "category": "volume", "type": "standard", "teaser": "Convert liters to milliliters.", "labels": {"in1": "Liters", "in2": "Milliliters"}, "factor": 1000.0}, {"slug": "liters-to-pecks", "name": "Liters to Pecks", "category": "volume", "type": "standard", "teaser": "Convert liters into US dry pecks for bulk goods.", "labels": {"in1": "Liters", "in2": "Pecks"}, "factor": 0.1099846, "hidden": true}, - {"slug": "liters-to-acre-feet", "name": "Liters to Acre-feet", "category": "area", "type": "standard", "teaser": "Convert liters to acre-feet.", "labels": {"in1": "Liters", "in2": "Acre-feet"}, "factor": 8.107e-07, "hidden": true}, + {"slug": "liters-to-acre-feet", "name": "Liters to Acre-feet", "category": "volume", "type": "standard", "teaser": "Convert liters to acre-feet.", "labels": {"in1": "Liters", "in2": "Acre-feet"}, "factor": 8.107e-07, "hidden": true}, {"slug": "liters-to-barrel-us-oil", "name": "Liters to Barrel (US oil)", "category": "volume", "type": "standard", "teaser": "Convert liters to US oil barrels.", "labels": {"in1": "Liters", "in2": "Barrel (US oil)"}, "factor": 0.00628981077}, {"slug": "liters-to-bushels", "name": "Liters to Bushels", "category": "volume", "type": "standard", "teaser": "Convert liters to US dry bushels.", "labels": {"in1": "Liters", "in2": "Bushels"}, "factor": 0.0284130625, "hidden": true}, {"slug": "liters-to-centiliters", "name": "Liters to Centiliters", "category": "volume", "type": "standard", "teaser": "Convert liters to centiliters.", "labels": {"in1": "Liters", "in2": "Centiliters"}, "factor": 100.0}, @@ -973,32 +973,32 @@ export const calculators: CalculatorDef[] = [ {"slug": "short-tons-to-long-tons", "name": "Short Tons to Long Tons", "category": "weight", "type": "standard", "teaser": "Express short tons as long tons.", "labels": {"in1": "Short Tons", "in2": "Long Tons"}, "factor": 0.892857, "hidden": true}, {"slug": "short-tons-to-metric-tons", "name": "Short Tons to Metric Tons", "category": "weight", "type": "standard", "teaser": "Convert short tons into metric tons.", "labels": {"in1": "Short Tons", "in2": "Metric Tons"}, "factor": 0.90718474, "hidden": true}, {"slug": "sidereal-days-to-solar-days", "name": "Sidereal days to Solar days", "category": "time", "type": "standard", "teaser": "Compare a sidereal day with a solar day.", "labels": {"in1": "Sidereal days", "in2": "Solar days"}, "factor": 0.9972695669}, - {"slug": "acre-feet-to-barrel-us-oil", "name": "Acre-feet to Barrel (US oil)", "category": "area", "type": "standard", "teaser": "Express the acre-foot as barrels of oil for storage comparisons.", "labels": {"in1": "Acre-feet", "in2": "Barrel (US oil)"}, "factor": 7758.367346938776}, - {"slug": "acre-feet-to-bushels", "name": "Acre-feet to Bushels", "category": "area", "type": "standard", "teaser": "Convert the volume into bushels for agricultural planning.", "labels": {"in1": "Acre-feet", "in2": "Bushels"}, "factor": 35003.2458775495}, - {"slug": "acre-feet-to-cubic-centimeters", "name": "Acre-feet to Cubic Centimeters", "category": "area", "type": "standard", "teaser": "Translate the acre-foot into cubic centimeters for fine-grain units.", "labels": {"in1": "Acre-feet", "in2": "Cubic Centimeters"}, "factor": 1233481837.54752}, - {"slug": "acre-feet-to-cubic-feet", "name": "Acre-feet to Cubic Feet", "category": "area", "type": "standard", "teaser": "Express the acre-foot directly as cubic feet for reservoir math.", "labels": {"in1": "Acre-feet", "in2": "Cubic Feet"}, "factor": 43560.0}, - {"slug": "acre-feet-to-cubic-inches", "name": "Acre-feet to Cubic Inches", "category": "area", "type": "standard", "teaser": "Show the storage volume down in cubic inches.", "labels": {"in1": "Acre-feet", "in2": "Cubic Inches"}, "factor": 75271680.0}, - {"slug": "acre-feet-to-cubic-meters", "name": "Acre-feet to Cubic Meters", "category": "area", "type": "standard", "teaser": "Convert the irrigation volume into cubic meters.", "labels": {"in1": "Acre-feet", "in2": "Cubic Meters"}, "factor": 1233.48183754752}, - {"slug": "acre-feet-to-cubic-yards", "name": "Acre-feet to Cubic Yards", "category": "area", "type": "standard", "teaser": "Express the volume in cubic yards for earthwork.", "labels": {"in1": "Acre-feet", "in2": "Cubic Yards"}, "factor": 1613.3333333333333}, - {"slug": "acre-feet-to-cups", "name": "Acre-feet to Cups", "category": "area", "type": "standard", "teaser": "Break the acre-foot into cups for everyday comparison.", "labels": {"in1": "Acre-feet", "in2": "Cups"}, "factor": 5213622.857142857}, - {"slug": "acre-feet-to-drams-fluid", "name": "Acre-feet to Drams (fluid)", "category": "area", "type": "standard", "teaser": "Scale the volume into fluid drams for historical measures.", "labels": {"in1": "Acre-feet", "in2": "Drams (fluid)"}, "factor": 333671862.85714287}, - {"slug": "acre-feet-to-fluid-ounces", "name": "Acre-feet to Fluid Ounces", "category": "area", "type": "standard", "teaser": "Convert the acre-foot into fluid ounces to compare with kitchen volumes.", "labels": {"in1": "Acre-feet", "in2": "Fluid Ounces"}, "factor": 41708982.85714286}, - {"slug": "acre-feet-to-gallons", "name": "Acre-feet to Gallons", "category": "area", "type": "standard", "teaser": "Translate the acre-foot into gallons.", "labels": {"in1": "Acre-feet", "in2": "Gallons"}, "factor": 325851.4285714286}, - {"slug": "acre-feet-to-gill", "name": "Acre-feet to Gill", "category": "area", "type": "standard", "teaser": "Express the water quantity as gills.", "labels": {"in1": "Acre-feet", "in2": "Gill"}, "factor": 10427245.714285715}, - {"slug": "acre-feet-to-hogshead", "name": "Acre-feet to Hogshead", "category": "area", "type": "standard", "teaser": "Compare the acre-foot with brewer\u2019s hogsheads.", "labels": {"in1": "Acre-feet", "in2": "Hogshead"}, "factor": 5172.244897959184}, - {"slug": "acre-feet-to-imperial-fl-oz", "name": "Acre-feet to Imperial Fl Oz", "category": "area", "type": "standard", "teaser": "Use Imperial fluid ounces for Commonwealth measurement.", "labels": {"in1": "Acre-feet", "in2": "Imperial Fl Oz"}, "factor": 43412491.615344875}, - {"slug": "acre-feet-to-imperial-gallons", "name": "Acre-feet to Imperial Gallons", "category": "area", "type": "standard", "teaser": "Convert the volume into Imperial gallons.", "labels": {"in1": "Acre-feet", "in2": "Imperial Gallons"}, "factor": 271328.07259590545}, - {"slug": "acre-feet-to-imperial-pints", "name": "Acre-feet to Imperial Pints", "category": "area", "type": "standard", "teaser": "Express the volume as Imperial pints.", "labels": {"in1": "Acre-feet", "in2": "Imperial Pints"}, "factor": 2170624.5807672436}, - {"slug": "acre-feet-to-jiggers", "name": "Acre-feet to Jiggers", "category": "area", "type": "standard", "teaser": "Compare the volume to cocktail jiggers.", "labels": {"in1": "Acre-feet", "in2": "Jiggers"}, "factor": 27805988.571428567}, - {"slug": "acre-feet-to-milliliters", "name": "Acre-feet to Milliliters", "category": "area", "type": "standard", "teaser": "Break the acre-foot into milliliters for metric insight.", "labels": {"in1": "Acre-feet", "in2": "Milliliters"}, "factor": 1233481837.54752}, - {"slug": "acre-feet-to-minims", "name": "Acre-feet to Minims", "category": "area", "type": "standard", "teaser": "Scale the water volume down to pharmaceutical minims.", "labels": {"in1": "Acre-feet", "in2": "Minims"}, "factor": 20020310146.32624}, - {"slug": "acre-feet-to-pecks", "name": "Acre-feet to Pecks", "category": "area", "type": "standard", "teaser": "Translate the irrigation volume into pecks for crop planning.", "labels": {"in1": "Acre-feet", "in2": "Pecks"}, "factor": 135664.03629795273}, - {"slug": "acre-feet-to-pints", "name": "Acre-feet to Pints", "category": "area", "type": "standard", "teaser": "Express the volume as U.S. pints.", "labels": {"in1": "Acre-feet", "in2": "Pints"}, "factor": 2606811.4285714286}, - {"slug": "acre-feet-to-quarts", "name": "Acre-feet to Quarts", "category": "area", "type": "standard", "teaser": "Convert the acre-foot into quarts.", "labels": {"in1": "Acre-feet", "in2": "Quarts"}, "factor": 1303405.7142857143}, - {"slug": "acre-feet-to-tablespoons", "name": "Acre-feet to Tablespoons", "category": "area", "type": "standard", "teaser": "Show the volume in tablespoons.", "labels": {"in1": "Acre-feet", "in2": "Tablespoons"}, "factor": 83417965.71428572}, - {"slug": "acre-feet-to-teaspoons", "name": "Acre-feet to Teaspoons", "category": "area", "type": "standard", "teaser": "Break the volume into teaspoons.", "labels": {"in1": "Acre-feet", "in2": "Teaspoons"}, "factor": 250253897.14285713}, - {"slug": "acre-feet-to-us-gallons", "name": "Acre-feet to US Gallons", "category": "area", "type": "standard", "teaser": "Express the water quantity in U.S. gallons.", "labels": {"in1": "Acre-feet", "in2": "US Gallons"}, "factor": 325851.4285714286}, - {"slug": "acre-feet-to-us-pints", "name": "Acre-feet to US Pints", "category": "area", "type": "standard", "teaser": "Express the volume as U.S. pints.", "labels": {"in1": "Acre-feet", "in2": "US Pints"}, "factor": 2606811.4285714286}, + {"slug": "acre-feet-to-barrel-us-oil", "name": "Acre-feet to Barrel (US oil)", "category": "volume", "type": "standard", "teaser": "Express the acre-foot as barrels of oil for storage comparisons.", "labels": {"in1": "Acre-feet", "in2": "Barrel (US oil)"}, "factor": 7758.367346938776}, + {"slug": "acre-feet-to-bushels", "name": "Acre-feet to Bushels", "category": "volume", "type": "standard", "teaser": "Convert the volume into bushels for agricultural planning.", "labels": {"in1": "Acre-feet", "in2": "Bushels"}, "factor": 35003.2458775495}, + {"slug": "acre-feet-to-cubic-centimeters", "name": "Acre-feet to Cubic Centimeters", "category": "volume", "type": "standard", "teaser": "Translate the acre-foot into cubic centimeters for fine-grain units.", "labels": {"in1": "Acre-feet", "in2": "Cubic Centimeters"}, "factor": 1233481837.54752}, + {"slug": "acre-feet-to-cubic-feet", "name": "Acre-feet to Cubic Feet", "category": "volume", "type": "standard", "teaser": "Express the acre-foot directly as cubic feet for reservoir math.", "labels": {"in1": "Acre-feet", "in2": "Cubic Feet"}, "factor": 43560.0}, + {"slug": "acre-feet-to-cubic-inches", "name": "Acre-feet to Cubic Inches", "category": "volume", "type": "standard", "teaser": "Show the storage volume down in cubic inches.", "labels": {"in1": "Acre-feet", "in2": "Cubic Inches"}, "factor": 75271680.0}, + {"slug": "acre-feet-to-cubic-meters", "name": "Acre-feet to Cubic Meters", "category": "volume", "type": "standard", "teaser": "Convert the irrigation volume into cubic meters.", "labels": {"in1": "Acre-feet", "in2": "Cubic Meters"}, "factor": 1233.48183754752}, + {"slug": "acre-feet-to-cubic-yards", "name": "Acre-feet to Cubic Yards", "category": "volume", "type": "standard", "teaser": "Express the volume in cubic yards for earthwork.", "labels": {"in1": "Acre-feet", "in2": "Cubic Yards"}, "factor": 1613.3333333333333}, + {"slug": "acre-feet-to-cups", "name": "Acre-feet to Cups", "category": "volume", "type": "standard", "teaser": "Break the acre-foot into cups for everyday comparison.", "labels": {"in1": "Acre-feet", "in2": "Cups"}, "factor": 5213622.857142857}, + {"slug": "acre-feet-to-drams-fluid", "name": "Acre-feet to Drams (fluid)", "category": "volume", "type": "standard", "teaser": "Scale the volume into fluid drams for historical measures.", "labels": {"in1": "Acre-feet", "in2": "Drams (fluid)"}, "factor": 333671862.85714287}, + {"slug": "acre-feet-to-fluid-ounces", "name": "Acre-feet to Fluid Ounces", "category": "volume", "type": "standard", "teaser": "Convert the acre-foot into fluid ounces to compare with kitchen volumes.", "labels": {"in1": "Acre-feet", "in2": "Fluid Ounces"}, "factor": 41708982.85714286}, + {"slug": "acre-feet-to-gallons", "name": "Acre-feet to Gallons", "category": "volume", "type": "standard", "teaser": "Translate the acre-foot into gallons.", "labels": {"in1": "Acre-feet", "in2": "Gallons"}, "factor": 325851.4285714286}, + {"slug": "acre-feet-to-gill", "name": "Acre-feet to Gill", "category": "volume", "type": "standard", "teaser": "Express the water quantity as gills.", "labels": {"in1": "Acre-feet", "in2": "Gill"}, "factor": 10427245.714285715}, + {"slug": "acre-feet-to-hogshead", "name": "Acre-feet to Hogshead", "category": "volume", "type": "standard", "teaser": "Compare the acre-foot with brewer\u2019s hogsheads.", "labels": {"in1": "Acre-feet", "in2": "Hogshead"}, "factor": 5172.244897959184}, + {"slug": "acre-feet-to-imperial-fl-oz", "name": "Acre-feet to Imperial Fl Oz", "category": "volume", "type": "standard", "teaser": "Use Imperial fluid ounces for Commonwealth measurement.", "labels": {"in1": "Acre-feet", "in2": "Imperial Fl Oz"}, "factor": 43412491.615344875}, + {"slug": "acre-feet-to-imperial-gallons", "name": "Acre-feet to Imperial Gallons", "category": "volume", "type": "standard", "teaser": "Convert the volume into Imperial gallons.", "labels": {"in1": "Acre-feet", "in2": "Imperial Gallons"}, "factor": 271328.07259590545}, + {"slug": "acre-feet-to-imperial-pints", "name": "Acre-feet to Imperial Pints", "category": "volume", "type": "standard", "teaser": "Express the volume as Imperial pints.", "labels": {"in1": "Acre-feet", "in2": "Imperial Pints"}, "factor": 2170624.5807672436}, + {"slug": "acre-feet-to-jiggers", "name": "Acre-feet to Jiggers", "category": "volume", "type": "standard", "teaser": "Compare the volume to cocktail jiggers.", "labels": {"in1": "Acre-feet", "in2": "Jiggers"}, "factor": 27805988.571428567}, + {"slug": "acre-feet-to-milliliters", "name": "Acre-feet to Milliliters", "category": "volume", "type": "standard", "teaser": "Break the acre-foot into milliliters for metric insight.", "labels": {"in1": "Acre-feet", "in2": "Milliliters"}, "factor": 1233481837.54752}, + {"slug": "acre-feet-to-minims", "name": "Acre-feet to Minims", "category": "volume", "type": "standard", "teaser": "Scale the water volume down to pharmaceutical minims.", "labels": {"in1": "Acre-feet", "in2": "Minims"}, "factor": 20020310146.32624}, + {"slug": "acre-feet-to-pecks", "name": "Acre-feet to Pecks", "category": "volume", "type": "standard", "teaser": "Translate the irrigation volume into pecks for crop planning.", "labels": {"in1": "Acre-feet", "in2": "Pecks"}, "factor": 135664.03629795273}, + {"slug": "acre-feet-to-pints", "name": "Acre-feet to Pints", "category": "volume", "type": "standard", "teaser": "Express the volume as U.S. pints.", "labels": {"in1": "Acre-feet", "in2": "Pints"}, "factor": 2606811.4285714286}, + {"slug": "acre-feet-to-quarts", "name": "Acre-feet to Quarts", "category": "volume", "type": "standard", "teaser": "Convert the acre-foot into quarts.", "labels": {"in1": "Acre-feet", "in2": "Quarts"}, "factor": 1303405.7142857143}, + {"slug": "acre-feet-to-tablespoons", "name": "Acre-feet to Tablespoons", "category": "volume", "type": "standard", "teaser": "Show the volume in tablespoons.", "labels": {"in1": "Acre-feet", "in2": "Tablespoons"}, "factor": 83417965.71428572}, + {"slug": "acre-feet-to-teaspoons", "name": "Acre-feet to Teaspoons", "category": "volume", "type": "standard", "teaser": "Break the volume into teaspoons.", "labels": {"in1": "Acre-feet", "in2": "Teaspoons"}, "factor": 250253897.14285713}, + {"slug": "acre-feet-to-us-gallons", "name": "Acre-feet to US Gallons", "category": "volume", "type": "standard", "teaser": "Express the water quantity in U.S. gallons.", "labels": {"in1": "Acre-feet", "in2": "US Gallons"}, "factor": 325851.4285714286}, + {"slug": "acre-feet-to-us-pints", "name": "Acre-feet to US Pints", "category": "volume", "type": "standard", "teaser": "Express the volume as U.S. pints.", "labels": {"in1": "Acre-feet", "in2": "US Pints"}, "factor": 2606811.4285714286}, {"slug": "acres-to-ares", "name": "Acres to Ares", "category": "area", "type": "standard", "teaser": "Convert acres into ares for metric contexts.", "labels": {"in1": "Acres", "in2": "Ares"}, "factor": 100.0}, {"slug": "acres-to-barns", "name": "Acres to Barns", "category": "area", "type": "standard", "teaser": "Express an acre in barns for atomic-scale perspective.", "labels": {"in1": "Acres", "in2": "Barns"}, "factor": 4.0468564224e+31}, {"slug": "acres-to-circular-mils", "name": "Acres to Circular Mils", "category": "area", "type": "standard", "teaser": "Compare acreage with circular mil coverage used in wiring.", "labels": {"in1": "Acres", "in2": "Circular Mils"}, "factor": 7986573297887.571}, diff --git a/migrate.py b/migrate.py index c6fd7bc..7cc45c3 100644 --- a/migrate.py +++ b/migrate.py @@ -55,6 +55,8 @@ def split_conversion_name(name): def guess_category(name): name_l = name.lower() + if any(x in name_l for x in ['acre-foot', 'acre-feet', 'acrefoot', 'acre feet']): + return 'volume' if 'temp scale' in name_l or 'newton (temp' in name_l: return 'temperature' if any(x in name_l for x in ['force', 'torque', 'newton', 'dyne', 'foot-pound']): return 'force'