skill
Publish a Hardware Component to the Adom Wiki
Public Made by Adomby adom
The one-stop-shop for publishing a hardware component (or molecule/board) to the Adom Wiki. The whole lifecycle: page anatomy, the clone→edit→preview→push loop and its hard rules, making a great hero image (Hero Component Studio — 16:10, overlay-safe, datasheet-backed), the animated 3D composite, the interactive 3D viewer, ct thumbnails, the datasheet-accuracy audit, and every wiki push/pull gotcha we've hit. Now includes the worked Path B (board) pipeline: STEP-to-GLB, refdes tagging, layer de-
import http.server, socketserver, functools, sys
class H(http.server.SimpleHTTPRequestHandler):
def log_message(self, *a): pass
def end_headers(self):
self.send_header('Cache-Control', 'no-store')
# The README embeds the viewer as a srcdoc iframe sandboxed WITHOUT allow-same-origin,
# so it runs at an opaque origin and every fetch it makes is cross-origin. The wiki's
# blob host sends permissive CORS; mirror that here or the bundle fetch ERR_FAILEDs.
self.send_header('Access-Control-Allow-Origin', '*')
super().end_headers()
socketserver.ThreadingTCPServer.allow_reuse_address = True
d = sys.argv[1]; p = int(sys.argv[2])
with socketserver.ThreadingTCPServer(('127.0.0.1', p), functools.partial(H, directory=d)) as s:
print('serving', d, 'on', p, flush=True)
s.serve_forever()