Python script to generate HTML and JSON content