def generate_app_doc(app, path=None):
    app_label = app.__name__.split('.')[-2]
    content = app_doc(app)
    filename = '%s/%s/index.rst' % (path or SIMPLEADMINDOC_PATH, app_label)
    write(filename, content)
dataset/ETHPy150Open bmihelac/django-simpleadmindoc/simpleadmindoc/generate.py/generate_app_doc/original