def setup_docs(context,app, docs_app, path): "Setup docs in target folder of target app" from frappe.utils.setup_docs import setup_docs for site in context.sites: try: frappe.init(site=site) frappe.connect() setup_docs(app, docs_app, path) finally: frappe.destroy()
def setup_docs(context): "Setup docs in target folder of target app" from frappe.utils.setup_docs import setup_docs from frappe.website import statics for site in context.sites: try: frappe.init(site=site) frappe.connect() setup_docs() statics.sync_statics(rebuild=True) finally: frappe.destroy()
def write_docs(context, app, target, local=False): "Setup docs in target folder of target app" from frappe.utils.setup_docs import setup_docs for site in context.sites: try: frappe.init(site=site) frappe.connect() make = setup_docs(app) make.make_docs(target, local) finally: frappe.destroy()
def sync_docs(context, app): "Sync docs from /docs folder into the database (Web Page)" from frappe.utils.setup_docs import setup_docs for site in context.sites: try: frappe.init(site=site) frappe.connect() make = setup_docs(app) make.sync_docs() finally: frappe.destroy()
def make_docs(context, app, docs_version): "Setup docs in target folder of target app" from frappe.utils.setup_docs import setup_docs for site in context.sites: try: frappe.init(site=site) frappe.connect() make = setup_docs(app) make.build(docs_version) finally: frappe.destroy()
def write_docs(context, app, target=None, local=False): "Setup docs in target folder of target app" from frappe.utils.setup_docs import setup_docs if not target: target = os.path.abspath(os.path.join("..", "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()
def _build_docs_once(site, app, docs_version, target, local, only_content_updated=False): from frappe.utils.setup_docs import setup_docs try: frappe.init(site=site) frappe.connect() make = setup_docs(app) if not only_content_updated: make.build(docs_version) make.make_docs(target, local) finally: frappe.destroy()
def _build_docs_once(site, app, docs_version, target, local, only_content_updated=False): from frappe.utils.setup_docs import setup_docs try: frappe.init(site=site) frappe.connect() make = setup_docs(app) if not only_content_updated: make.build(docs_version) make.sync_docs() make.make_docs(target, local) finally: frappe.destroy()
def setup_docs(app, docs_app, path): from frappe.utils.setup_docs import setup_docs frappe.connect() setup_docs(app, docs_app, path) frappe.destroy()