Download spidey.html from SANDDIDIT/ghost: direct link, hf CLI and curl.
- Browser
- Download file 2.92 kB
-
https://huggingface.co/spaces/SANDDIDIT/ghost/resolve/main/spidey.html
- Command line
-
hf download hf://spaces/SANDDIDIT/ghost/spidey.html
-
curl -L -o spidey.html https://huggingface.co/spaces/SANDDIDIT/ghost/resolve/main/spidey.html
2.92 kB
| <html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <title>SPIDEY · mirror search</title> | |
| <style> | |
| body{margin:0;background:#05070d;color:#e8f0ff;font:15px system-ui} | |
| header{padding:14px 16px;border-bottom:1px solid #1d2a44} | |
| h1{margin:0;font-size:18px;letter-spacing:2px}h1 b{color:#ff3b3b} | |
| #q{width:100%;box-sizing:border-box;margin-top:10px;padding:12px;font-size:17px;border-radius:10px;border:1px solid #2b3d63;background:#0b1222;color:#fff} | |
| #stat{font-size:12px;opacity:.7;margin-top:6px} | |
| .hit{padding:10px 16px;border-bottom:1px solid #111a2e} | |
| .hit a{color:#7fc4ff;text-decoration:none}.src{font-size:11px;opacity:.6} | |
| .m a{font-size:11px;margin-right:8px;color:#9fe39f} | |
| </style></head><body> | |
| <header><h1>🕸️🪞 <b>SPIDEY</b> · shoots the web at himself</h1> | |
| <input id="q" placeholder="search the mirror…" autofocus> | |
| <div id="stat">loading his own reflection…</div></header> | |
| <div id="out"></div> | |
| <script> | |
| const OWNER='autobahn247365', SELF='autobahn247365/ghost'; | |
| let web=[]; | |
| const mirrors=u=>`<span class="m"><a href="https://web.archive.org/web/*/${u}" target=_blank>WB</a><a href="https://archive.ph/${u}" target=_blank>AT</a></span>`; | |
| async function j(u){try{const r=await fetch(u);return r.ok?await r.json():[]}catch(e){return[]}} | |
| async function t(u){try{const r=await fetch(u);return r.ok?await r.text():''}catch(e){return''}} | |
| async function load(){ | |
| // 1. himself: his own Space files | |
| const self=await j(`https://huggingface.co/api/spaces/${SELF}/tree/main?recursive=1`); | |
| self.filter(f=>f.type==='file').forEach(f=>web.push({n:f.path,u:`https://huggingface.co/spaces/${SELF}/blob/main/${f.path}`,s:'self'})); | |
| // 2. his own CSV rows (ISIC spine etc.) | |
| for(const f of self.filter(f=>/\.csv$/.test(f.path))){ | |
| const txt=await t(`https://huggingface.co/spaces/${SELF}/resolve/main/${f.path}`); | |
| txt.split('\n').slice(1).forEach((l,i)=>{if(l.trim())web.push({n:l.slice(0,160),u:`https://huggingface.co/spaces/${SELF}/blob/main/${f.path}#L${i+2}`,s:'self · '+f.path})}); | |
| } | |
| // 3. bounce: every Space, model, dataset he owns | |
| for(const k of ['spaces','models','datasets']){ | |
| (await j(`https://huggingface.co/api/${k}?author=${OWNER}&limit=1000`)).forEach(r=>web.push({n:r.id,u:`https://huggingface.co/${k==='models'?'':k+'/'}${r.id}`,s:'bounce · '+k})); | |
| } | |
| document.getElementById('stat').textContent=`${web.length} mirrors on the web · searched offline in this page`; | |
| show(''); | |
| } | |
| function show(q){ | |
| q=q.toLowerCase().split(/\s+/).filter(Boolean); | |
| const hits=web.filter(w=>q.every(x=>(w.n+' '+w.s).toLowerCase().includes(x))).slice(0,300); | |
| document.getElementById('out').innerHTML=hits.map(h=>`<div class=hit><a href="${h.u}" target=_blank>${h.n.replace(/</g,'<')}</a> ${mirrors(h.u)}<div class=src>${h.s}</div></div>`).join(''); | |
| } | |
| document.getElementById('q').oninput=e=>show(e.target.value); | |
| load(); | |
| </script></body></html> |