# Output file name
output_file="index.txt"

# Create/overwrite index.txt
> "$output_file"

# List of files to exclude
exclude_files=("index.txt" "LICENSE" "README.md")

for file in *; do
    skip=false
    for ex in "${exclude_files[@]}"; do
        if [[ "$file" == "$ex" ]]; then
            skip=true
            break
        fi
    done

    # Only include files not in the exclude list
    if [[ "$skip" == false ]]; then
        echo "$file" >> "$output_file"
    fi
done

echo "index.txt has been generated, excluding specified files."

