Пример #1
0
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()
Пример #3
0
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()
Пример #4
0
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()
Пример #5
0
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()
Пример #6
0
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()
Пример #7
0
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()
Пример #8
0
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()
Пример #9
0
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()