Import DevExpert testimonials from Google Sheets (gog) or pasted TSV lists, format text with line breaks, crop profile images to 400x400, copy them to src/assets/testimonials, update src/data/testimonials.json, and optionally update AI Expert IDs in src/pages/cursos/expert/ai.astro. Use when adding new testimonials or processing images.
Automates testimonial import, profile image cropping, and AI Expert section management.
python -m pip install -r scripts/requirements.txt
gog auth login or gog auth manage.python scripts/sync_testimonials_from_sheet.py \
--ai-auto
gog drive download.src/data/testimonials.json.src/pages/cursos/expert/ai.astro.x.tmp/testimonials-sync.python scripts/import_testimonials.py \
--input /ruta/testimonios.txt
Prefer TSV (tab-separated) with columns in this order:
fecha \t nombre \t posicion \t titulo \t texto \t rating \t ruta_imagen
YYYY-MM-DD HH:MM:SS when recognized.nombre + titulo (slug), e.g.:
Santiago Perez Barber + AI Expert -> santiago-perez-barber-ai-expert.jpg--image-size.--overwrite-images is passed.references/sheet-schema.md.~/.config/skills/config.json under devexpert_testimonials:
accountsheet_idgid (optional)Example:
{
"devexpert_testimonials": {
"account": "[email protected]",
"sheet_id": "spreadsheet_id_here",
"gid": 123456789
}
}
ai.astro and the new ones detected by title.python scripts/import_testimonials.py \
--input /ruta/testimonios.txt \
--ai-ids "35051,42724,42725"
--ai-ids is omitted, the script prompts for IDs (interactive stdin only).python scripts/import_testimonials.py \
--input /ruta/testimonios.txt \
--ai-auto
--testimonials-json change the testimonials.json path.--images-dir change the destination images folder.--ai-astro change the AI Expert page path.--dry-run show what would change without writing.--ai-auto automatically adds new AI Expert IDs.scripts/import_testimonials.py Imports testimonials, processes images, and proposes/updates AI Expert IDs.scripts/sync_testimonials_from_sheet.py Syncs from Google Sheets, downloads Drive images, and marks "Publicado en web".