@click.command(u'write-docs')
@pass_context
@click.argument(u'app')
@click.option(u'--target', default=None)
@click.option(u'--local', default=False, is_flag=True, help=u'Run app locally')
def write_docs(context, app, target=None, local=False):
 from frappe.utils.setup_docs import setup_docs
 if (not target):
  target = os.path.abspath(os.path.join(u'..', u'docs', app))
 for site in context.sites:
  try:
   frappe.init(site=site)
   frappe.connect()
   make = setup_docs(app)
   make.make_docs(target, local)
  finally:
   frappe.destroy()

@ click . command ( u'write-docs' ) @ pass_context @ click . argument ( u'app' ) @ click . option ( u'--target' , default = None ) @ click . option ( u'--local' , default = False , is_flag = True , help = u'Run app locally' ) def write_docs ( context , app , target = None , local = False ) : from frappe . utils . setup_docs import setup_docs if ( not target ) : target = os . path . abspath ( os . path . join ( u'..' , u'docs' , app ) ) for site in context . sites : try : frappe . init ( site = site ) frappe . connect ( ) make = setup_docs ( app ) make . make_docs ( target , local ) finally : frappe . destroy ( )
setup docs in target folder of target app .