Penpot MCP: gotchas, template script, workflow documenté

This commit is contained in:
Nox
2026-02-28 14:13:10 +00:00
parent e4128f9788
commit e38b484496
14 changed files with 1974 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { chromium } from '/home/node/.openclaw/workspace/node_modules/playwright/index.mjs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const htmlPath = 'file://' + path.join(__dirname, 'affiche-soldes.html');
const outPath = path.join(__dirname, 'affiche-soldes.png');
const browser = await chromium.launch({
executablePath: '/home/node/.cache/ms-playwright/chromium-1208/chrome-linux64/chrome',
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
const page = await browser.newPage();
await page.setViewportSize({ width: 600, height: 900 });
await page.goto(htmlPath, { waitUntil: 'networkidle' });
// Petite pause pour le rendu des emojis
await page.waitForTimeout(500);
await page.screenshot({
path: outPath,
clip: { x: 0, y: 0, width: 600, height: 900 },
type: 'png',
});
await browser.close();
console.log('✅ Screenshot:', outPath);