iksnae / actual-intelligence

A practical, non-technical guide to using AI tools like ChatGPT in everyday life
MIT License
0 stars 0 forks source link

Simple fix for Spanish book generation #52

Closed khaos-codi closed 3 months ago

khaos-codi commented 3 months ago

Simple fix for Spanish book generation

This PR addresses the issue with Spanish book generation failing to produce output files. The key change is to ensure all language output files are written directly to the root build/ directory instead of language-specific subdirectories.

Problem Identification

After examining the logs and code, I found that:

  1. The Spanish content exists in book/es/ directory
  2. The build process puts Spanish output files in build/es/ directory
  3. But the release process is looking for files directly in the build/ directory

Changes

This PR includes minimal, focused changes to fix this specific issue:

  1. Updated build-language.sh:

    • Changed output paths to always go to the build/ root directory for all languages
    • Added more checks to verify files are created
    • Added debugging output to show language directories
  2. Simplified setup.sh:

    • Added checks to verify language directories exist
    • Made image copying more straightforward
    • Added more diagnostics for debugging
  3. Improved workflow file:

    • Added a step to check source directories structure
    • Improved verification of output files
    • Made diagnostic output more clear

Testing

These changes were developed by examining how the successful Rise and Code project handles multi-language builds - it puts all language versions in the root build directory with different filenames, rather than in language-specific subdirectories.

The Spanish files should now be generated in the root directory alongside the English files, without changing the fundamental structure of the source content.