#!/bin/bash


for d in $(find $1 -maxdepth 8 -type d)
do
  python3 generate.py $d > $d/index.html
  #Do something, the directory is accessible with $d:
  echo $d
done