feat: unit conversion + random generators packs (7 new commands)
Two pure-Lua packs that don't need network or LLM — pure offline utilities.
unit_convert (resources/commands/unit_convert/, 4 commands)
- convert.length "переведи 100 метров в футы" / "сколько 5 миль в км"
meters↔feet, km↔miles. Pluralises russian unit names.
- convert.weight "переведи 70 кг в фунты"
kg↔lbs.
- convert.temperature "переведи 100 цельсий в фаренгейт" / "минус 40 в цельсий"
Handles negative numbers. C↔F formulas inline.
- convert.speed "переведи 100 км в час в мили в час"
km/h↔mph.
- All round results to 1-2 decimal places, speak with proper Russian
grammatical number (фут/фута/футов).
generators (resources/commands/generators/, 3 commands)
- gen.coin "подбрось монету" / "орёл или решка"
→ "Орёл!" or "Решка!" (math.random with time+minute seed)
- gen.password "сгенерируй пароль 16 символов"
→ cryptographically-ish 6..64-char password,
alphanumeric + !@#$%^&*-_=+, copies to clipboard,
SPEAKS LENGTH ONLY (never echoes the password).
Default 16 chars if no number in phrase.
- gen.uuid "сгенерируй uuid" / "юид"
→ v4 UUID, copies to clipboard, speaks last 4 chars
(confirmation without 32-char monologue).
Tests: 112/112 pass (commands::tests auto-validates).
Pack count: 62 → 64.
This commit is contained in:
parent
20b6b06b5d
commit
84d3b57ddc
9 changed files with 289 additions and 0 deletions
6
resources/commands/generators/coin.lua
Normal file
6
resources/commands/generators/coin.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
math.randomseed(os.time() + (jarvis.context.time.minute or 0) * 1000)
|
||||
local r = math.random(1, 2)
|
||||
if r == 1 then
|
||||
return jarvis.cmd.ok("Орёл!")
|
||||
end
|
||||
return jarvis.cmd.ok("Решка!")
|
||||
Loading…
Add table
Add a link
Reference in a new issue