MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / readModelFileHandler

Function readModelFileHandler

main.js:7474–7491  ·  view source on GitHub ↗
(event, filePath)

Source from the content-addressed store, hash-verified

7472
7473// Update the fetch-thangs-page handler
7474ipcMain.handle('fetch-thangs-page', async (event, url) => {
7475 try {
7476 if (!fetch) {
7477 throw new Error('Fetch not initialized');
7478 }
7479 console.log('Fetching Thangs page:', url);
7480
7481 const browser = await puppeteer.launch({
7482 headless: 'new' // Use new headless mode
7483 });
7484
7485 const page = await browser.newPage();
7486 await page.goto(url, { waitUntil: 'networkidle0' });
7487
7488 // Get and log the full HTML source
7489 const htmlContent = await page.content();
7490 console.log('Page HTML:', htmlContent);
7491
7492 // Extract the data
7493 const data = await page.evaluate(() => {
7494 // Get model title (which will be the parent model)

Callers

nothing calls this directly

Calls 3

isUrlModelFunction · 0.85
extractModelFromZipFunction · 0.85
parseZipPathFunction · 0.70

Tested by

no test coverage detected