Sync: guardar en el historial el trabajo de las ultimas semanas que solo vivia en el disco
Este repo local tenia origin apuntando al Gitea local (localhost:3000), que Rafa
declaro archivado el 2026-06-28 (commit 962f33a, desarrollo movido a
gitea.feadulta.com). Ese memo nunca llego a este checkout: main quedo congelado
y todo el trabajo real de las ultimas 3+ semanas se fue commiteando solo en la
rama fix/multiidioma-portada-132 (ya fusionada a main sin perdida, commit
2504666), mientras que ademas se acumulaban 78 cambios sin commitear en el
working tree que nunca llegaron a NINGUN historial de git.
Este commit consolida esos cambios sueltos: TTS multi-voz (tts_*.py), scripts
de traduccion (translate_haiku.py, pretranslate_en_haiku.py, sync_translations_to_prod.py),
mu-plugins nuevos desplegados a prod (fea-beta-feedback, fea-cloudflare-realip,
fea-legacy-redirect, fea-gsc-verification, fea-support-campaign, fea-ui, etc.),
scripts de mantenimiento de enlaces/cartas, capturas E2E (tools/e2e/shot_*.cjs)
y documentacion de sesiones recientes.
Excluido deliberadamente (no es codigo versionable): tts-voices/ (3.3GB de
muestras de audio para clonacion de voz, anadido a .gitignore), logs/ (logs de
ejecucion, anadido a .gitignore), y 2 ficheros vacios accidentales + 2 copias
duplicadas sueltas en la raiz que ya existen en su ubicacion correcta.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch();
|
||||
const p = await b.newPage({ viewport: { width: 1200, height: 2200 } });
|
||||
// portada
|
||||
await p.goto('http://localhost:8081/', { waitUntil: 'networkidle' });
|
||||
// primer avatar (Fray Marcos suele estar entre los primeros). Capturamos rejilla.
|
||||
const grid = await p.$('.fea-grid, .fea-section');
|
||||
await p.screenshot({ path: '/tmp/shot_portada.png', fullPage: true });
|
||||
// recorte de cada card avatar
|
||||
const avs = await p.$$('.fea-card-avatar');
|
||||
let i = 0;
|
||||
for (const a of avs.slice(0, 12)) {
|
||||
await a.screenshot({ path: `/tmp/av_${i}.png` }).catch(()=>{});
|
||||
i++;
|
||||
}
|
||||
console.log('avatars capturados:', i);
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,11 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch();
|
||||
const p = await b.newPage({ viewport: { width: 1100, height: 1600 }, deviceScaleFactor: 2 });
|
||||
await p.goto('http://localhost:8081/colaboradores/', { waitUntil: 'networkidle' });
|
||||
const img = p.locator('img[src*="marcos_1"]').first();
|
||||
await img.scrollIntoViewIfNeeded();
|
||||
await img.screenshot({ path: '/tmp/colab_marcos.png' }).catch(e=>console.log('err',e.message));
|
||||
console.log('ok');
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,21 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1200, height: 1400 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto('https://farmer.taild3aaf6.ts.net/fea/evangelio-de-cada-dia/', { waitUntil: 'networkidle' });
|
||||
const m = await p.evaluate(() => ({
|
||||
date: document.querySelector('.fea-eed-date')?.textContent,
|
||||
tabs: [...document.querySelectorAll('.fea-eed-labels label')].map(l=>l.textContent),
|
||||
nav: [...document.querySelectorAll('.fea-eed-nav')].map(a=>a.textContent.trim()),
|
||||
textoVisible: getComputedStyle(document.querySelector('.fea-eed-panel-texto')).display,
|
||||
videoVisible: getComputedStyle(document.querySelector('.fea-eed-panel-video')).display,
|
||||
hasIframe: !!document.querySelector('.fea-eed-panel-video iframe'),
|
||||
}));
|
||||
console.log(JSON.stringify(m,null,2));
|
||||
await p.screenshot({ path: '/tmp/eed_texto.png', fullPage: false });
|
||||
// click video tab
|
||||
await p.click('label[for=fed-video]');
|
||||
await p.waitForTimeout(300);
|
||||
await p.screenshot({ path: '/tmp/eed_video.png', fullPage: false });
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1440, height: 1500 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto('https://farmer.taild3aaf6.ts.net/fea/en/numeros-en/', { waitUntil: 'networkidle' });
|
||||
await p.evaluate(() => document.querySelectorAll('details.fea-don').forEach(d => d.open = true));
|
||||
await p.waitForTimeout(200);
|
||||
await p.screenshot({ path: '/tmp/numeros_en.png', fullPage: false });
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,12 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch();
|
||||
const p = await b.newPage({ viewport: { width: 1100, height: 1600 }, deviceScaleFactor: 2 });
|
||||
await p.goto('http://localhost:8081/', { waitUntil: 'networkidle' });
|
||||
// primera sección de tarjetas (artículos de la semana)
|
||||
const sec = p.locator('.fea-grid').first();
|
||||
await sec.scrollIntoViewIfNeeded();
|
||||
await sec.screenshot({ path: '/tmp/portada_grid.png' });
|
||||
console.log('ok');
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,48 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const url = 'https://farmer.taild3aaf6.ts.net/fea/primeras-lecturas/';
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1440, height: 1600 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto(url, { waitUntil: 'networkidle' });
|
||||
|
||||
// medidas: ancho del contenedor, ancho del viewport, alineación del título
|
||||
const m1 = await p.evaluate(() => {
|
||||
const lect = document.querySelector('.fea-lect');
|
||||
const title = document.querySelector('.wp-block-post-title');
|
||||
const ec = document.querySelector('.entry-content');
|
||||
return {
|
||||
viewport: window.innerWidth,
|
||||
fea_lect_width: lect ? Math.round(lect.getBoundingClientRect().width) : null,
|
||||
entry_content_width: ec ? Math.round(ec.getBoundingClientRect().width) : null,
|
||||
title_text: title ? title.textContent.trim() : null,
|
||||
title_align: title ? getComputedStyle(title).textAlign : null,
|
||||
title_centered_box: title ? (Math.abs((title.getBoundingClientRect().left) - (window.innerWidth - title.getBoundingClientRect().right)) < 8) : null,
|
||||
};
|
||||
});
|
||||
console.log('COLAPSADO:', JSON.stringify(m1, null, 2));
|
||||
await p.screenshot({ path: '/tmp/lecturas_collapsed.png', fullPage: false });
|
||||
|
||||
// abrir la 1ª sección (1ª lectura) y el primer libro
|
||||
await p.evaluate(() => {
|
||||
const tops = document.querySelectorAll('.fea-lect > details.fea-lect-top');
|
||||
if (tops[0]) tops[0].open = true;
|
||||
});
|
||||
await p.waitForTimeout(150);
|
||||
await p.evaluate(() => {
|
||||
const first = document.querySelector('.fea-lect > details.fea-lect-top details');
|
||||
if (first) first.open = true;
|
||||
});
|
||||
await p.waitForTimeout(150);
|
||||
|
||||
const m2 = await p.evaluate(() => {
|
||||
const ul = document.querySelector('.fea-lect details details[open] ul');
|
||||
return {
|
||||
ul_columns: ul ? getComputedStyle(ul).columnWidth + ' / count ' + getComputedStyle(ul).columnCount : null,
|
||||
ul_width: ul ? Math.round(ul.getBoundingClientRect().width) : null,
|
||||
};
|
||||
});
|
||||
console.log('EXPANDIDO:', JSON.stringify(m2, null, 2));
|
||||
await p.screenshot({ path: '/tmp/lecturas_expanded.png', fullPage: false });
|
||||
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1440, height: 1100 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto('https://farmer.taild3aaf6.ts.net/fea/numeros/', { waitUntil: 'networkidle' });
|
||||
await p.evaluate(() => document.querySelector('.fea-ledger-title').scrollIntoView());
|
||||
await p.waitForTimeout(300);
|
||||
await p.screenshot({ path: '/tmp/numeros_ledger.png', fullPage: false });
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,33 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const url = 'https://farmer.taild3aaf6.ts.net/fea/numeros/';
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1440, height: 1700 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto(url, { waitUntil: 'networkidle' });
|
||||
await p.screenshot({ path: '/tmp/numeros_top.png', fullPage: false });
|
||||
|
||||
// abrir las 3 cards
|
||||
await p.evaluate(() => { document.querySelectorAll('details.fea-don').forEach(d => d.open = true); });
|
||||
await p.waitForTimeout(200);
|
||||
await p.screenshot({ path: '/tmp/numeros_open.png', fullPage: false });
|
||||
|
||||
const m = await p.evaluate(() => {
|
||||
const wrap = document.querySelector('.fea-don-wrap');
|
||||
const led = document.querySelector('.fea-ledger');
|
||||
const rec = document.querySelector('.fea-opt-rec');
|
||||
const rows = document.querySelectorAll('.fea-ledger tr');
|
||||
// detectar fechas que parten en 2 lineas en la primera columna
|
||||
let wrappedDates = 0;
|
||||
rows.forEach(r => { const td = r.querySelector('td'); if (td && td.getClientRects().length > 1) wrappedDates++; });
|
||||
return {
|
||||
viewport: window.innerWidth,
|
||||
wrap_width: wrap ? Math.round(wrap.getBoundingClientRect().width) : null,
|
||||
ledger_width: led ? Math.round(led.getBoundingClientRect().width) : null,
|
||||
ledger_rows: rows.length,
|
||||
rec_btns: document.querySelectorAll('.fea-rec-btns a').length,
|
||||
wrapped_date_cells: wrappedDates,
|
||||
};
|
||||
});
|
||||
console.log(JSON.stringify(m, null, 2));
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,29 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch();
|
||||
const p = await b.newPage({ viewport: { width: 1200, height: 2200 }, deviceScaleFactor: 3 });
|
||||
await p.goto('http://localhost:8081/', { waitUntil: 'networkidle' });
|
||||
// localizar card cuyo autor sea Fray Marcos
|
||||
const card = p.locator('.fea-card', { hasText: 'Fray Marcos' }).first();
|
||||
await card.scrollIntoViewIfNeeded();
|
||||
await card.screenshot({ path: '/tmp/card_fraymarcos.png' });
|
||||
// estilos calculados del span avatar y del img
|
||||
const info = await card.evaluate((el) => {
|
||||
const span = el.querySelector('.fea-card-avatar');
|
||||
const img = el.querySelector('img');
|
||||
const cs = getComputedStyle(span);
|
||||
const ci = getComputedStyle(img);
|
||||
return {
|
||||
span_borderRadius: cs.borderRadius, span_overflow: cs.overflow,
|
||||
span_boxShadow: cs.boxShadow, span_bg: cs.backgroundColor,
|
||||
img_src: img.currentSrc, img_borderRadius: ci.borderRadius,
|
||||
img_bg: ci.backgroundColor, img_objectFit: ci.objectFit,
|
||||
img_natural: img.naturalWidth + 'x' + img.naturalHeight,
|
||||
};
|
||||
});
|
||||
console.log(JSON.stringify(info, null, 2));
|
||||
// tambien una card de iniciales para comparar
|
||||
const card2 = p.locator('.fea-card', { hasText: 'María Gómez' }).first();
|
||||
await card2.screenshot({ path: '/tmp/card_initials.png' }).catch(()=>{});
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,15 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1280, height: 1500 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto('https://farmer.taild3aaf6.ts.net/fea/', { waitUntil: 'networkidle' });
|
||||
const m = await p.evaluate(() => {
|
||||
const a = document.querySelector('.fea-eed-link a');
|
||||
return { found: !!a, text: a? a.textContent.replace(/\s+/g,' ').trim():null, href: a? a.getAttribute('href'):null };
|
||||
});
|
||||
console.log(JSON.stringify(m));
|
||||
const el = await p.$('.fea-eed-link');
|
||||
if (el) await el.scrollIntoViewIfNeeded();
|
||||
await p.screenshot({ path: '/tmp/portada_link.png', fullPage: false });
|
||||
await b.close();
|
||||
})();
|
||||
@@ -0,0 +1,14 @@
|
||||
const { chromium } = require('playwright');
|
||||
(async () => {
|
||||
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
||||
const p = await b.newPage({ viewport: { width: 1200, height: 1600 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
||||
await p.goto('https://farmer.taild3aaf6.ts.net/fea/category/tablon-de-anuncios/', { waitUntil: 'networkidle' });
|
||||
const m = await p.evaluate(() => {
|
||||
const arts = document.querySelectorAll('article, .fea-card, .wp-block-post');
|
||||
const titles = [...document.querySelectorAll('h2 a, h3 a, .entry-title a, article a')].map(a=>a.textContent.trim()).filter(Boolean).slice(0,30);
|
||||
return { articleNodes: arts.length, sampleTitles: titles.slice(0,12) };
|
||||
});
|
||||
console.log(JSON.stringify(m,null,2));
|
||||
await p.screenshot({ path: '/tmp/tablon.png', fullPage: false });
|
||||
await b.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user