diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-15 12:34:32 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-15 12:34:32 +0200 |
| commit | 61577be5ebd1818030a0d61dad0abb07b8656f5d (patch) | |
| tree | 5d302c636e827b55fc6f33199ed3a8189e532969 /lib/data.lua | |
| parent | 3943e08dabe684b409a3ac99c9371fbeb5df5cdb (diff) | |
| download | conky-theme-udt-61577be5ebd1818030a0d61dad0abb07b8656f5d.tar.gz conky-theme-udt-61577be5ebd1818030a0d61dad0abb07b8656f5d.zip | |
The card was a copy of nvtable's table, where installed-behind and
repo-behind share a row and are told apart by colour, and it read
"shipped" from the .info rather than the binary repo. The drawer's
updates page replaces it: one row per package under the action it needs
next, Slackware included. Removed: the card, its sampler and the
nvchecker run it started every 30 minutes (the drawer runs nvchecker
when its result is older than that), nvtable_parse with its test and
fixture, and the package-up icon. The card's slot in the layout is left
open; rearranging the board is a separate decision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/data.lua')
| -rw-r--r-- | lib/data.lua | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/data.lua b/lib/data.lua index 804398e..6b32f07 100644 --- a/lib/data.lua +++ b/lib/data.lua @@ -303,43 +303,4 @@ function M.immich_parse(text) return out end --- nvtable's plain table (`nvtable -C -E`), as bin/updates-sample.sh caches it: --- --- [personal] foo-bin 1.14.9 -> 1.14.9 !! ~ 1.14.10 --- <repo> <name> <installed> -> <shipped> <marker> [~] [upstream] --- --- followed by a summary line with the counts. The marker is '!!' (installed --- behind upstream), 'ok' or '-' (not installed); '~' flags the shipped .info --- as behind. Upstream appears only when shipped does not already show it. --- --- Returns the rows as { repo, name, installed, shipped, upstream, behind, --- bump } with '--' turned into nil, plus .upgrade/.bump/.current/.missing --- counts, or nil when the text has neither rows nor a summary. -function M.nvtable_parse(text) - if type(text) ~= 'string' then return nil end - local out, seen = {}, false - local function v(s) return s ~= '--' and s or nil end - for line in text:gmatch('[^\n]+') do - local repo, name, inst, ship, rest = - line:match('^%s*%[(.-)%]%s+(%S+)%s+(%S+)%s+%->%s+(%S+)%s*(.*)$') - if repo then - local mark, tail = rest:match('^(%S*)%s*(.*)$') - local bump = tail:match('^~') ~= nil - if bump then tail = tail:gsub('^~%s*', '') end - out[#out + 1] = { - repo = v(repo), name = name, installed = v(inst), shipped = v(ship), - upstream = tail:match('^(%S+)'), behind = mark == '!!', bump = bump, - } - seen = true - elseif line:match('to upgrade') then - out.upgrade = tonumber(line:match('(%d+) to upgrade')) - out.bump = tonumber(line:match('(%d+) repos? to bump')) - out.current = tonumber(line:match('(%d+) current')) - out.missing = tonumber(line:match('(%d+) not installed')) or 0 - seen = true - end - end - return seen and out or nil -end - return M |
