Adom Wiki
Public Made by Adomby adom
How the Adom Wiki (wiki.adom.inc) works and how to drive it with the adom-wiki CLI: the two storage layers (git page repo vs package registry), hosting source by pushing files (not a tarball), making packages, cutting per-platform releases, and the three-tier skill layout (user skills ship, dev-skills/ and publish-skills/ stay source-only). adom-wiki is the current tool; adompkg is deprecated. Read this first before publishing or installing.
Show distributor part numbers by the MPN and add a stock widget (follow-on to #185)
Follow-on to #185 (the soft gate that asks every purchasable component for digikey, mouser and lcsc in component.distributor_links, shipping in adom-wiki-cli 1.7.32). Once the numbers are there, the page has to show them well. Colby's ask: put them in the metadata block at the top, next to the MPN, and consider widgets for the live parts (stock, price). @ray, you asked for a stock widget; this is the thread to shape it.
Where the page stands today
- The overview indexes
distributor_links.digikey,.mouserand.jlcpcbintodigikey_part/mouser_part/jlcpcb_partand renders them as a small "Distributors" link list in the sidebar (sidebar-distributors), each a plain outbound link with no part number visible. lcscis not indexed and not rendered at all, so the field the new gate asks for is invisible on the page. (JLCPCB assembles from LCSC C-numbers, sojlcpcbandlcscare the same identifier under two names; the page should treat them as one.)- An explicit
false("not carried there") renders as nothing, same as "unknown".
Proposal
- Metadata block, by the MPN. A row per distributor in the top metadata (the block that carries MPN, Manufacturer, Package):
DigiKey 296-1234-1-ND,Mouser 595-TPS7A0233DBVR,LCSC C12345, each the part number as copyable text plus the outbound link.falserenders as a muted "not stocked" so a reader can tell "opted out" from "unknown"; absent stays absent (the gate nudges the author). - Index
lcsc(aliasjlcpcb), keep the sidebar list as the compact form, and expose all three in the page API (component.distributor_linksverbatim, plus the derived flat fields) so the CLI, the bridges and Cloud Libraries can read them without parsing page.json. - Widgets, live data. A registered widget for the live side, e.g.
::adom-stock{mpn="..." digikey="..." mouser="..." lcsc="..."}(or reading the page's own metadata when the attrs are omitted) that shows stock and unit price per distributor with a freshness stamp. Data source is the question: the adom-parts-search quota is shared and daily-capped, so the widget backend should cache per part for hours, not fetch per view. This is where I want Ray's feedback: which numbers matter on a page (stock, price breaks, lead time, min qty), how stale is acceptable, and whether the widget should live on every component page by default or be opt-in via the README tag.
Open questions for Ray
- Stock per distributor, or a single "orderable now" badge with the best price?
- Should the widget also power a "buy" action (cart links carrying qty), or is display enough for v1?
- For the 2,500 basic parts: is a default placement in the metadata block acceptable (no README edit per page), with the widget only where an author adds the tag?
Server side (metadata rows, lcsc indexing, API fields) is mine and small; the widget follows the registry flow (adom/widgets) once the shape is agreed.