// scripts/capture-forgejo-repo.js const { chromium } = require('@playwright/test'); const path = require('path'); const fs = require('fs'); const OUTPUT_DIR = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/git_server'; async function captureRepo() { if (!fs.existsSync(OUTPUT_DIR)) fs.mkdirSync(OUTPUT_DIR, { recursive: true }); const browser = await chromium.launch({ channel: 'msedge', headless: true }); const context = await browser.newContext({ viewport: { width: 1440, height: 960 }, }); const page = await context.newPage(); // Login to Forgejo console.log('Logging in to Forgejo git.chanpaca.net...'); await page.goto('https://git.chanpaca.net/user/login', { waitUntil: 'networkidle', timeout: 30000 }); await page.fill('input[name="user_name"]', 'yunchan'); await page.fill('input[name="password"]', 'ONVI2v4J#y'); await page.click('button:has-text("Sign in"), button:has-text("로그인"), button[type="submit"]'); await page.waitForTimeout(3000); // Navigate to d3ro-voice repository console.log('Navigating to https://git.chanpaca.net/yunchan/d3ro-voice...'); await page.goto('https://git.chanpaca.net/yunchan/d3ro-voice', { waitUntil: 'networkidle', timeout: 30000 }); await page.waitForTimeout(2000); const shotPath = path.join(OUTPUT_DIR, '01_forgejo_d3ro_voice_repo_live.png'); await page.screenshot({ path: shotPath, fullPage: false }); console.log('Screenshot saved to:', shotPath); // Navigate to releases / tags await page.goto('https://git.chanpaca.net/yunchan/d3ro-voice/releases', { waitUntil: 'networkidle', timeout: 30000 }); await page.waitForTimeout(2000); const tagShotPath = path.join(OUTPUT_DIR, '02_forgejo_d3ro_voice_releases_tags.png'); await page.screenshot({ path: tagShotPath, fullPage: false }); console.log('Releases screenshot saved to:', tagShotPath); await browser.close(); } captureRepo().catch(console.error);