Skip to content

Releases: TYEclipse/dsh-units

v0.4.0 — data transfer rate, acceleration & illumination (20 categories)

Choose a tag to compare

@TYEclipse TYEclipse released this 10 Sep 21:59

v0.4.0 — three new categories: data transfer rate, acceleration, illumination (now 20 total)

New / 新增:

  • data transfer rate — tbit/s…bit/s (decimal bits), tb/s…b/s (decimal bytes), tib/s…kib/s (binary bytes). The classic mix-up answered exactly: 100 Mbps = 12.5 MB/s. mb/s = megabyte/s (data-table rule), mbps/mbit/s = megabit/s.
  • acceleration — m/s2, g0 (standard gravity 9.80665 m/s²), ft/s2, mph/s. 1 g = 32.174049 ft/s², 60 mph/s = 26.8224 m/s². g stays the gram — gravity is g0 / gravity / g-force.
  • illumination — klx, lx (lux), fc (foot-candle, 1 fc = 10.76391 lx), ph (phot).
  • The old data size / transfer category is now data size (sizes only); rates live in data transfer rate.

Still zero runtime dependencies, pure arithmetic, all outputs anchored to an independent Python oracle. 49 tests green, coverage 93.65%.

中文:v0.4.0 新增三个类别——数据传输速率(100 Mbps = 12.5 MB/s 精确换算;mb/s 为兆字节、mbps/mbit/s 为兆比特)、加速度(标准重力 g0、g-force、ft/s2、mph/s)、照度(lux/klx/英尺烛光 fc/辐透 ph);原「数据大小/传输」类别更名为「数据大小」。共 20 个类别,零运行时依赖不变,锚点全部由独立 Python oracle 定值。

v0.3.0 — power, force & torque

Choose a tag to compare

@TYEclipse TYEclipse released this 22 Aug 21:51

v0.3.0 — power, force & torque (the mechanics trio)

Three new categories, still zero runtime dependencies and pure arithmetic — 17 categories in total.

What's new

  • power — mw, kw, w, hp (mechanical = 550 ft·lbf/s), hp(m) (metric PS), hp(e) (electric 746 W), btu/h (IT), ftlb/s. The three different horsepower definitions are kept strictly separate — a classic LLM error point.
  • force — kn, n, dyn, lbf, kgf (kp), gf. lbf/kgf are weight-based forces at standard gravity 9.80665 m/s².
  • torque — n.m, kgf.m, lbfft (pound-force foot), lbfin (pound-force inch). Force × length.

Symbol disambiguation

  • typed kn resolves to knot (speed); use the full name kilonewton for kN.
  • nm is the nanometer (length); the torque newton meter uses the symbol n.m (also n·m or full names).

Examples

convert_unit { value: 150, from: "kw", to: "hp" }    → 150 kw = 201.153313 hp
convert_unit { value: 1, from: "lbf", to: "n" }      → 1 lbf = 4.448222 n
convert_unit { value: 1, from: "lbfft", to: "n.m" }  → 1 lbfft = 1.355818 n.m

Install

dsh plugin --profile default add github:TYEclipse/dsh-units

41 tests green (independent closed-form anchors), oxlint clean, forbidden-word scan clean, install self-test passed.


v0.3.0 — 功率、力、扭矩(力学三件套)

新增 3 个类别,依旧零运行时依赖、纯算术——共 17 个类别。

  • 功率:mw/kw/w/hp(机械马力 = 550 ft·lbf/s)/hp(m)(公制 PS)/hp(e)(电动 746 W)/btu/h/ftlb/s——三种马力定义严格区分,正是大模型高频出错点。
  • :kn/n/dyn/lbf/kgf/gf——lbf/kgf 按标准重力 9.80665 m/s² 计算。
  • 扭矩:n.m/kgf.m/lbfft/lbfin——力×长度。

符号消歧:输入 kn 解析为"节"(速度),千牛请用全名 kilonewtonnm 是纳米(长度),扭矩牛米用 n.m(也支持 n·m 或全名)。

安装:dsh plugin --profile default add github:TYEclipse/dsh-units

41 个测试全绿(独立闭式锚点)、oxlint 零告警、违禁词扫描干净、安装自测通过。

v0.2.0

Choose a tag to compare

@TYEclipse TYEclipse released this 20 Aug 16:17

dsh-units v0.2.0

新增排版与油耗类别 Adds typography & fuel economy categories。

新增 New categories

  • typography:px / pt / pc / em / rem(16px 基准、96dpi)
  • fuel economy:l/100km、mpg(US / UK)、km/l —— 倒数换算(20 mpg = 11.76 l/100km)
  • 语义变更:pt 现指排版 point;pint 改用 symbol pint

安装 Install

dsh plugin --profile <name> add github:TYEclipse/dsh-units#v0.2.0

v0.1.0

Choose a tag to compare

@TYEclipse TYEclipse released this 20 Aug 16:15

dsh-units v0.1.0

单位换算工具箱 Unit conversion toolbox — 首发版本(历史发布补账 / historical release backfill)。

工具 Tools

  • convert_unit — 12 类别单位换算(长度/质量/温度/面积/体积/速度/时长/数据大小/压强/能量/角度/频率)
  • list_units — 列出全部支持单位

安装 Install

dsh plugin --profile <name> add github:TYEclipse/dsh-units#v0.1.0

零运行时依赖(zero runtime dependencies,纯算术)。