From 3e317b235eeb0924d5df22f70633a50cb62ebdec Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 2 Dec 2015 17:06:49 +0530 Subject: [PATCH] [docs] css fixes, auto-rebuild of docs --- frappe/commands.py | 42 ++- frappe/config/docs.py | 7 + .../api/config/frappe.config.desk.html | 2 +- .../api/config/frappe.config.desktop.html | 2 +- .../api/config/frappe.config.docs.html | 2 +- .../current/api/config/frappe.config.html | 2 +- .../api/config/frappe.config.setup.html | 2 +- .../api/config/frappe.config.website.html | 2 +- frappe/docs/current/api/config/index.html | 2 +- frappe/docs/current/api/core/frappe.core.html | 2 +- .../api/core/frappe.core.notifications.html | 2 +- frappe/docs/current/api/core/index.html | 2 +- .../current/api/custom/frappe.custom.html | 2 +- frappe/docs/current/api/custom/index.html | 2 +- .../desk/form/frappe.desk.form.assign_to.html | 2 +- .../api/desk/form/frappe.desk.form.html | 2 +- .../form/frappe.desk.form.linked_with.html | 2 +- .../api/desk/form/frappe.desk.form.load.html | 2 +- .../api/desk/form/frappe.desk.form.meta.html | 2 +- .../form/frappe.desk.form.run_method.html | 2 +- .../api/desk/form/frappe.desk.form.save.html | 2 +- .../desk/form/frappe.desk.form.test_form.html | 2 +- .../api/desk/form/frappe.desk.form.utils.html | 2 +- frappe/docs/current/api/desk/form/index.html | 2 +- .../api/desk/frappe.desk.calendar.html | 2 +- .../api/desk/frappe.desk.desk_page.html | 2 +- frappe/docs/current/api/desk/frappe.desk.html | 2 +- .../api/desk/frappe.desk.moduleview.html | 2 +- .../api/desk/frappe.desk.notifications.html | 2 +- .../api/desk/frappe.desk.query_builder.html | 2 +- .../api/desk/frappe.desk.query_report.html | 2 +- .../api/desk/frappe.desk.report_dump.html | 2 +- .../api/desk/frappe.desk.reportview.html | 2 +- .../current/api/desk/frappe.desk.search.html | 2 +- .../current/api/desk/frappe.desk.star.html | 2 +- .../current/api/desk/frappe.desk.tags.html | 2 +- frappe/docs/current/api/desk/index.html | 2 +- .../current/api/email/frappe.email.bulk.html | 2 +- .../api/email/frappe.email.email_body.html | 2 +- .../docs/current/api/email/frappe.email.html | 2 +- .../api/email/frappe.email.receive.html | 258 ++++++++++++++---- .../current/api/email/frappe.email.smtp.html | 2 +- frappe/docs/current/api/email/index.html | 2 +- frappe/docs/current/api/frappe.__init__.html | 4 +- .../docs/current/api/frappe.__version__.html | 2 +- frappe/docs/current/api/frappe.api.html | 2 +- frappe/docs/current/api/frappe.app.html | 2 +- frappe/docs/current/api/frappe.async.html | 2 +- frappe/docs/current/api/frappe.auth.html | 2 +- frappe/docs/current/api/frappe.boot.html | 2 +- frappe/docs/current/api/frappe.build.html | 2 +- .../docs/current/api/frappe.celery_app.html | 2 +- frappe/docs/current/api/frappe.client.html | 2 +- frappe/docs/current/api/frappe.commands.html | 18 +- frappe/docs/current/api/frappe.database.html | 2 +- frappe/docs/current/api/frappe.defaults.html | 2 +- .../docs/current/api/frappe.exceptions.html | 2 +- .../docs/current/api/frappe.frappeclient.html | 2 +- frappe/docs/current/api/frappe.handler.html | 2 +- frappe/docs/current/api/frappe.hooks.html | 2 +- frappe/docs/current/api/frappe.installer.html | 2 +- .../docs/current/api/frappe.middlewares.html | 2 +- .../docs/current/api/frappe.permissions.html | 2 +- frappe/docs/current/api/frappe.pythonrc.html | 2 +- frappe/docs/current/api/frappe.sessions.html | 2 +- .../current/api/frappe.setup_logging.html | 2 +- frappe/docs/current/api/frappe.share.html | 2 +- frappe/docs/current/api/frappe.tasks.html | 2 +- .../docs/current/api/frappe.test_runner.html | 2 +- frappe/docs/current/api/frappe.translate.html | 2 +- .../api/geo/frappe.geo.country_info.html | 2 +- frappe/docs/current/api/geo/frappe.geo.html | 2 +- frappe/docs/current/api/geo/index.html | 2 +- frappe/docs/current/api/index.html | 2 +- .../api/integrations/frappe.integrations.html | 2 +- .../docs/current/api/integrations/index.html | 2 +- .../api/model/frappe.model.base_document.html | 2 +- .../api/model/frappe.model.create_new.html | 2 +- .../api/model/frappe.model.db_query.html | 2 +- .../api/model/frappe.model.db_schema.html | 2 +- .../api/model/frappe.model.delete_doc.html | 2 +- .../api/model/frappe.model.docfield.html | 2 +- .../api/model/frappe.model.document.html | 2 +- .../docs/current/api/model/frappe.model.html | 2 +- .../api/model/frappe.model.mapper.html | 2 +- .../current/api/model/frappe.model.meta.html | 2 +- .../api/model/frappe.model.naming.html | 2 +- .../api/model/frappe.model.rename_doc.html | 2 +- .../current/api/model/frappe.model.sync.html | 2 +- .../api/model/frappe.model.workflow.html | 2 +- frappe/docs/current/api/model/index.html | 2 +- .../api/model/utils/frappe.model.utils.html | 2 +- .../frappe.model.utils.rename_field.html | 2 +- .../docs/current/api/model/utils/index.html | 2 +- .../modules/frappe.modules.export_file.html | 2 +- .../current/api/modules/frappe.modules.html | 2 +- .../modules/frappe.modules.import_file.html | 2 +- .../modules/frappe.modules.patch_handler.html | 2 +- .../api/modules/frappe.modules.utils.html | 2 +- frappe/docs/current/api/modules/index.html | 2 +- .../docs/current/api/print/frappe.print.html | 2 +- frappe/docs/current/api/print/index.html | 2 +- .../api/utils/frappe.utils.autodoc.html | 2 +- .../api/utils/frappe.utils.backups.html | 2 +- .../api/utils/frappe.utils.bench_helper.html | 2 +- .../api/utils/frappe.utils.boilerplate.html | 2 +- .../api/utils/frappe.utils.change_log.html | 2 +- .../api/utils/frappe.utils.csvutils.html | 2 +- .../current/api/utils/frappe.utils.data.html | 2 +- .../api/utils/frappe.utils.dateutils.html | 2 +- .../api/utils/frappe.utils.doctor.html | 2 +- .../api/utils/frappe.utils.file_lock.html | 2 +- .../api/utils/frappe.utils.file_manager.html | 2 +- .../api/utils/frappe.utils.fixtures.html | 2 +- .../api/utils/frappe.utils.formatters.html | 2 +- .../docs/current/api/utils/frappe.utils.html | 20 +- .../current/api/utils/frappe.utils.image.html | 2 +- .../api/utils/frappe.utils.install.html | 2 +- .../current/api/utils/frappe.utils.jinja.html | 2 +- .../api/utils/frappe.utils.make_random.html | 2 +- .../api/utils/frappe.utils.minify.html | 2 +- .../api/utils/frappe.utils.momentjs.html | 2 +- .../api/utils/frappe.utils.nestedset.html | 2 +- .../current/api/utils/frappe.utils.pdf.html | 2 +- .../api/utils/frappe.utils.redis_wrapper.html | 2 +- .../api/utils/frappe.utils.response.html | 2 +- .../api/utils/frappe.utils.scheduler.html | 2 +- .../current/api/utils/frappe.utils.sel.html | 2 +- .../api/utils/frappe.utils.setup_docs.html | 2 +- .../current/api/utils/frappe.utils.user.html | 2 +- .../utils/frappe.utils.verified_command.html | 2 +- frappe/docs/current/api/utils/index.html | 2 +- .../api/website/frappe.website.context.html | 2 +- .../current/api/website/frappe.website.html | 2 +- .../api/website/frappe.website.render.html | 2 +- .../api/website/frappe.website.router.html | 2 +- .../api/website/frappe.website.statics.html | 2 +- .../api/website/frappe.website.template.html | 2 +- .../api/website/frappe.website.utils.html | 2 +- .../frappe.website.website_generator.html | 2 +- frappe/docs/current/api/website/index.html | 2 +- .../frappe.website.website_theme.html | 2 +- .../api/website/website_theme/index.html | 2 +- ...frappe.website.website_theme.standard.html | 2 +- .../website/website_theme/standard/index.html | 2 +- .../current/api/workflow/frappe.workflow.html | 2 +- frappe/docs/current/api/workflow/index.html | 2 +- frappe/docs/current/index.html | 2 +- .../docs/current/models/core/async_task.html | 2 +- .../current/models/core/block_module.html | 2 +- frappe/docs/current/models/core/comment.html | 2 +- .../current/models/core/communication.html | 20 +- .../current/models/core/defaultvalue.html | 2 +- frappe/docs/current/models/core/docfield.html | 2 +- frappe/docs/current/models/core/docperm.html | 2 +- frappe/docs/current/models/core/docshare.html | 2 +- frappe/docs/current/models/core/file.html | 2 +- frappe/docs/current/models/core/index.html | 2 +- .../docs/current/models/core/module_def.html | 2 +- frappe/docs/current/models/core/page.html | 2 +- .../docs/current/models/core/page_role.html | 2 +- .../docs/current/models/core/patch_log.html | 2 +- frappe/docs/current/models/core/report.html | 2 +- frappe/docs/current/models/core/role.html | 8 +- .../current/models/core/scheduler_log.html | 2 +- .../current/models/core/system_settings.html | 2 +- frappe/docs/current/models/core/user.html | 28 +- frappe/docs/current/models/core/userrole.html | 2 +- frappe/docs/current/models/core/version.html | 2 +- .../current/models/custom/custom_field.html | 2 +- .../current/models/custom/custom_script.html | 2 +- .../current/models/custom/customize_form.html | 2 +- .../models/custom/customize_form_field.html | 2 +- frappe/docs/current/models/custom/index.html | 2 +- .../models/custom/property_setter.html | 2 +- frappe/docs/current/models/desk/event.html | 2 +- .../docs/current/models/desk/event_role.html | 2 +- frappe/docs/current/models/desk/feed.html | 2 +- frappe/docs/current/models/desk/index.html | 2 +- frappe/docs/current/models/desk/note.html | 2 +- frappe/docs/current/models/desk/todo.html | 2 +- frappe/docs/current/models/doctype/index.html | 2 +- .../docs/current/models/email/bulk_email.html | 2 +- .../current/models/email/email_account.html | 14 +- .../current/models/email/email_alert.html | 2 +- .../models/email/email_alert_recipient.html | 2 +- .../models/email/email_unsubscribe.html | 2 +- frappe/docs/current/models/email/index.html | 2 +- .../current/models/email/standard_reply.html | 2 +- frappe/docs/current/models/geo/country.html | 23 +- frappe/docs/current/models/geo/currency.html | 49 +++- frappe/docs/current/models/geo/index.html | 2 +- frappe/docs/current/models/index.html | 2 +- .../models/integrations/dropbox_backup.html | 2 +- .../current/models/integrations/index.html | 2 +- .../integrations/social_login_keys.html | 2 +- frappe/docs/current/models/models/index.html | 2 +- frappe/docs/current/models/print/index.html | 2 +- .../current/models/print/letter_head.html | 39 ++- .../current/models/print/print_format.html | 12 +- .../current/models/print/print_settings.html | 2 +- .../models/website/about_us_settings.html | 2 +- .../models/website/about_us_team_member.html | 2 +- .../current/models/website/blog_category.html | 2 +- .../current/models/website/blog_post.html | 2 +- .../current/models/website/blog_settings.html | 2 +- .../docs/current/models/website/blogger.html | 2 +- .../models/website/company_history.html | 2 +- .../models/website/contact_us_settings.html | 2 +- frappe/docs/current/models/website/index.html | 2 +- .../current/models/website/top_bar_item.html | 2 +- .../docs/current/models/website/web_form.html | 2 +- .../models/website/web_form_field.html | 2 +- .../docs/current/models/website/web_page.html | 2 +- .../models/website/website_script.html | 2 +- .../models/website/website_settings.html | 2 +- .../models/website/website_slideshow.html | 6 +- .../website/website_slideshow_item.html | 2 +- .../current/models/website/website_theme.html | 2 +- .../docs/current/models/workflow/index.html | 2 +- .../current/models/workflow/workflow.html | 2 +- .../models/workflow/workflow_action.html | 2 +- .../workflow/workflow_document_state.html | 2 +- .../models/workflow/workflow_state.html | 2 +- .../models/workflow/workflow_transition.html | 2 +- frappe/docs/index.html | 11 + frappe/public/css/docs.css | 61 +++-- frappe/public/less/docs.less | 103 ++++--- frappe/templates/autodoc/base_template.html | 12 +- frappe/templates/autodoc/docs_home.html | 6 + frappe/utils/__init__.py | 28 ++ frappe/utils/setup_docs.py | 4 +- 232 files changed, 817 insertions(+), 376 deletions(-) diff --git a/frappe/commands.py b/frappe/commands.py index a685107cc3..d5bd38575e 100644 --- a/frappe/commands.py +++ b/frappe/commands.py @@ -404,19 +404,43 @@ def write_docs(context, app, target, local=False): @click.argument('docs_version') @click.argument('target') @click.option('--local', default=False, is_flag=True, help='Run app locally') -def build_docs(context, app, docs_version, target, local=False): +@click.option('--watch', default=False, is_flag=True, help='Watch for changes and rewrite') +def build_docs(context, app, docs_version, target, local=False, watch=False): "Setup docs in target folder of target app" - from frappe.utils.setup_docs import setup_docs + from frappe.utils import watch for site in context.sites: - try: - frappe.init(site=site) - frappe.connect() - make = setup_docs(app) + _build_docs_once(site, app, docs_version, target, local) + + if watch: + def trigger_make(source_path, event_type): + if "/templates/autodoc/" in source_path: + _build_docs_once(site, app, docs_version, target, local) + + elif ("/docs.css" in source_path + or "/docs/" in source_path + or "docs.py" in source_path): + _build_docs_once(site, app, docs_version, target, local, only_content_updated=True) + + apps_path = frappe.get_app_path("frappe", "..", "..") + watch(apps_path, handler=trigger_make) + +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() + + make.make_docs(target, local) + + finally: + frappe.destroy() @click.command('reset-perms') diff --git a/frappe/config/docs.py b/frappe/config/docs.py index 33c30bdb75..b673702251 100644 --- a/frappe/config/docs.py +++ b/frappe/config/docs.py @@ -21,5 +21,12 @@ Frappe Framework was designed to build [ERPNext](https://erpnext.com), open sour ERP for managing small and medium sized businesses. """ +style = """ +.splash .jumbotron h1 { + font-weight: 200; + font-size: 48px; +} +""" + def get_context(context): pass diff --git a/frappe/docs/current/api/config/frappe.config.desk.html b/frappe/docs/current/api/config/frappe.config.desk.html index fe15d9887c..047f70e11f 100644 --- a/frappe/docs/current/api/config/frappe.config.desk.html +++ b/frappe/docs/current/api/config/frappe.config.desk.html @@ -1,7 +1,7 @@
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 Class EmailSizeExceededError - -

Inherits from frappe.exceptions.ValidationError - -

-
-
- -
-
- - - - - -

Class EmailTimeoutError

- -

Inherits from frappe.exceptions.ValidationError - -

-
-
- -
-
- - - - - -

Class LoginLimitExceeded

- -

Inherits from frappe.exceptions.ValidationError - -

-
-
- -
-
- - - - - -

Class POP3Server

+

Class EmailServer

Wrapper for POP server to pull emails.

@@ -270,6 +225,34 @@ +

+ + + connect_imap + (self) +

+

Connect to IMAP

+
+
+ + + + + +

+ + + connect_pop + (self) +

+

No docs

+
+
+ + + + +

@@ -284,6 +267,20 @@ +

+ + + get_new_mails + (self) +

+

Return list of new mails

+
+
+ + + + +

@@ -344,7 +341,7 @@ retrieve_message - (self, pop_meta, msg_num) + (self, message_meta, msg_num=None)

No docs

@@ -369,10 +366,169 @@

- + - validate_pop - (self, pop_meta) + validate_message_limits + (self, message_meta) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class EmailSizeExceededError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class EmailTimeoutError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class LoginLimitExceeded

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class Timed_IMAP4

+ +

Inherits from frappe.email.receive.TimerMixin, imaplib.IMAP4 + +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + _getline + (self) +

+

No docs

+
+
+ + + + + +

+ + + quit + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class Timed_IMAP4_SSL

+ +

Inherits from frappe.email.receive.TimerMixin, imaplib.IMAP4_SSL + +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + _getline + (self) +

+

No docs

+
+
+ + + + + +

+ + + quit + (self)

No docs

diff --git a/frappe/docs/current/api/email/frappe.email.smtp.html b/frappe/docs/current/api/email/frappe.email.smtp.html index f10756a52e..6706c50fab 100644 --- a/frappe/docs/current/api/email/frappe.email.smtp.html +++ b/frappe/docs/current/api/email/frappe.email.smtp.html @@ -1,7 +1,7 @@
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 frappe.__init__.has_permission - (doctype, ptype=read, doc=None, user=None, verbose=False) + (doctype, ptype=read, doc=None, user=None, verbose=False, throw=False)

Raises frappe.PermissionError if not permitted.

diff --git a/frappe/docs/current/api/frappe.__version__.html b/frappe/docs/current/api/frappe.__version__.html index 72304ab01c..76f5c7adc2 100644 --- a/frappe/docs/current/api/frappe.__version__.html +++ b/frappe/docs/current/api/frappe.__version__.html @@ -1,7 +1,7 @@
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 + + + frappe.commands._build_docs_once + (site, app, docs_version, target, local, only_content_updated=False) +

+

No docs

+
+
+ + + + + + +

diff --git a/frappe/docs/current/api/frappe.database.html b/frappe/docs/current/api/frappe.database.html index eee152e6be..91f9d7741c 100644 --- a/frappe/docs/current/api/frappe.database.html +++ b/frappe/docs/current/api/frappe.database.html @@ -1,7 +1,7 @@

- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 get_formatted_email (user)

-

get email id of user formatted as: John Doe johndoe@example.com

+

get email id of user formatted as: John Doe johndoe@example.com


@@ -722,6 +722,22 @@ + + + + +

+ + + frappe.utils.watch + (path, handler=None, debug=True) +

+

No docs

+
+
+ + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.image.html b/frappe/docs/current/api/utils/frappe.utils.image.html index 2c8eb83cc3..24b5679aa7 100644 --- a/frappe/docs/current/api/utils/frappe.utils.image.html +++ b/frappe/docs/current/api/utils/frappe.utils.image.html @@ -1,7 +1,7 @@
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 -

Public API -
/api/method/frappe.core.doctype.communication.communication.get_convert_to -

-

- - - frappe.core.doctype.communication.communication.get_convert_to - () -

-

No docs

-
-
- - - - - -

Public API
/api/method/frappe.core.doctype.communication.communication.make

diff --git a/frappe/docs/current/models/core/defaultvalue.html b/frappe/docs/current/models/core/defaultvalue.html index 9257891d8f..dcd25f5693 100644 --- a/frappe/docs/current/models/core/defaultvalue.html +++ b/frappe/docs/current/models/core/defaultvalue.html @@ -7,7 +7,7 @@
- Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 + + + +
  • @@ -125,6 +129,8 @@ + +
  • diff --git a/frappe/docs/current/models/core/scheduler_log.html b/frappe/docs/current/models/core/scheduler_log.html index a70c75dd5f..9d7ae74f60 100644 --- a/frappe/docs/current/models/core/scheduler_log.html +++ b/frappe/docs/current/models/core/scheduler_log.html @@ -7,7 +7,7 @@
    - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 diff --git a/frappe/docs/current/models/core/userrole.html b/frappe/docs/current/models/core/userrole.html index 9ced7b4068..ad7d2e2341 100644 --- a/frappe/docs/current/models/core/userrole.html +++ b/frappe/docs/current/models/core/userrole.html @@ -7,7 +7,7 @@
    - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0

    - + - get_pop3 + get_server (self, in_receive=False)

    Returns logged in POP3 connection object.

    @@ -607,7 +607,7 @@ Yandex.Mail receive (self, test_mails=None)

    -

    Called by scheduler to receive emails from this EMail account using POP3.

    +

    Called by scheduler to receive emails from this EMail account using POP3/IMAP.


    @@ -668,7 +668,7 @@ it will create a new parent transaction (e.g. Issue)

    validate (self)

    -

    Validate email id and check POP3 and SMTP connections is enabled.

    +

    Validate email id and check POP3/IMAP and SMTP connections is enabled.


    @@ -736,9 +736,9 @@ and notify_if_unreplied is set as true.

    frappe.email.doctype.email_account.email_account.pull - (now=False) + (now=True)

    -

    Will be called via scheduler, pull emails from all enabled POP3 email accounts.

    +

    Will be called via scheduler, pull emails from all enabled Email accounts.


    diff --git a/frappe/docs/current/models/email/email_alert.html b/frappe/docs/current/models/email/email_alert.html index 2fcd4b5555..251580f706 100644 --- a/frappe/docs/current/models/email/email_alert.html +++ b/frappe/docs/current/models/email/email_alert.html @@ -7,7 +7,7 @@
    - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 Linked In: +
      + + + + + + + + + + + + + + + + + +
    + diff --git a/frappe/docs/current/models/geo/currency.html b/frappe/docs/current/models/geo/currency.html index 96dd1c6013..95e8d927e7 100644 --- a/frappe/docs/current/models/geo/currency.html +++ b/frappe/docs/current/models/geo/currency.html @@ -7,7 +7,7 @@
  • + + + + + + + + + + diff --git a/frappe/docs/current/models/print/print_settings.html b/frappe/docs/current/models/print/print_settings.html index 91e538f1af..3b0b7c1996 100644 --- a/frappe/docs/current/models/print/print_settings.html +++ b/frappe/docs/current/models/print/print_settings.html @@ -7,7 +7,7 @@
    - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 + + + +
  • diff --git a/frappe/docs/current/models/website/website_slideshow_item.html b/frappe/docs/current/models/website/website_slideshow_item.html index 1717bb7a78..ff1b1d30f0 100644 --- a/frappe/docs/current/models/website/website_slideshow_item.html +++ b/frappe/docs/current/models/website/website_slideshow_item.html @@ -7,7 +7,7 @@
    - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 - Version 6.10.1 + Version 6.11.0 + +
    @@ -29,6 +38,8 @@
    + +
    diff --git a/frappe/public/css/docs.css b/frappe/public/css/docs.css index 24c45c7d74..5a3300ab14 100644 --- a/frappe/public/css/docs.css +++ b/frappe/public/css/docs.css @@ -238,17 +238,17 @@ body { font-size: 16px; line-height: 1.65em; color: #454e57; - position: relative; -webkit-font-smoothing: antialiased; } .container { max-width: 870px; } .splash { - background-color: #383851; + background-color: #36414C; background-image: url('/assets/img/background.png'); color: #ffffff; padding-top: 128px; + margin-top: -92px; } .splash .jumbotron { background-color: transparent; @@ -274,13 +274,9 @@ body { padding: 30px 0 0 0; } .page-container { - padding-top: 128px; - margin: 0 auto; - width: 870px; -} -.page-container .page-content { - width: 83%; + padding-top: 38px; margin: 0 auto; + max-width: 870px; } .page-container .webpage-content ol > li, .page-container .webpage-content ul > li { @@ -297,6 +293,12 @@ body { .page-container .webpage-content ol { margin-bottom: 32px; } +@media (min-width: 768px) { + .page-container .page-content { + width: 83%; + margin: 0 auto; + } +} #page-index { padding-top: 0; width: 100%; @@ -306,6 +308,9 @@ body { width: 100%; margin: 0; } +body[data-path="index"] .navbar .toggle-sidebar i { + color: #fff; +} code { color: #e66a12; background: #fff6df; @@ -389,12 +394,9 @@ pre { color: #4f4fa4; } .navbar { - position: absolute; - top: 0; - right: 0; - left: 0; - width: 870px; - margin: 0 auto; + max-width: 870px; + margin-left: auto; + margin-right: auto; } .navbar a { font-size: 16px; @@ -403,6 +405,14 @@ pre { .navbar a.navbar-brand { font-weight: bold; } +.navbar a.toggle-sidebar { + margin-top: 8px; +} +.sidebar a { + font-size: 14px; + padding-top: 14px !important; + padding-bottom: 14px !important; +} .breadcrumb { line-height: 1em; color: #8D99A6; @@ -422,12 +432,15 @@ pre { color: #7575ff; font-size: 16px; } -a, -a:hover, -a:focus, -a:visited { +.hero-and-content a, +.hero-and-content a:hover, +.hero-and-content a:focus, +.hero-and-content a:visited { color: #5E64FF; } +.hero-and-content a.btn { + color: inherit; +} a.btn-primary { color: #fff; } @@ -470,7 +483,7 @@ p { .docs-footer { padding: 30px 0px 60px 0px; border-top: 1px solid #d1d8dd; - width: 870px; + max-width: 870px; margin: 0 auto; margin-top: 80px; font-size: 14px; @@ -497,7 +510,7 @@ p { margin-top: -50px; } .browser-image { - min-height: 300px; + min-height: 200px; border: 1px solid #d1d8dd; } .fake-browser-frame { @@ -588,11 +601,3 @@ a.edit:visited { color: #454e57; font-size: 16px; } -@media (max-width: 767px) { - .offcanvas-container, - .offcanvas, - .offcanvas-main-section { - position: relative; - width: 50%; - } -} diff --git a/frappe/public/less/docs.less b/frappe/public/less/docs.less index af97c38370..04470a0810 100644 --- a/frappe/public/less/docs.less +++ b/frappe/public/less/docs.less @@ -6,7 +6,7 @@ body { font-size: 16px; line-height: 1.65em; color: #454e57; - position: relative; + // position: relative; -webkit-font-smoothing: antialiased; } @@ -15,23 +15,25 @@ body { } .splash{ - background-color: #383851; + // background-color: #383851; + background-color: @text-color; background-image: url('/assets/img/background.png'); color: #ffffff; padding-top: 128px; - + margin-top: -92px; + .jumbotron{ background-color: transparent; padding: 14px 0 60px 0; text-align: center; text-shadow: 0px 1px 2px rgba(0,0,0,0.7); - + h1 { font-size: 36px; font-weight: 700; opacity: 0.9; } - + p { font-size: 24px; font-color: @text-muted !important; @@ -49,18 +51,13 @@ body { .page-container{ - padding-top:128px; + padding-top:38px; margin:0 auto; - width:870px; - - .page-content { - width:83%; - margin:0 auto; - } - + max-width:870px; + .webpage-content{ ol > li, ul > li { - margin: 13px auto; + margin: 13px auto; } ol > li li, ul > li li { @@ -76,17 +73,31 @@ body { } } +@media (min-width: 768px) { + .page-container .page-content { + width:83%; + margin:0 auto; + } + +} + #page-index { padding-top:0; width:100%; margin:0; - + .page-content { width:100%; margin:0; } } +body[data-path="index"] { + .navbar .toggle-sidebar i { + color: #fff; + } +} + code{ color: #e66a12; background: #fff6df; @@ -125,12 +136,16 @@ pre { //background-color: @navbar-bg !important; //background-color: @text-color !important; // border-bottom: 3px solid @border-color !important; - position: absolute; - top:0; - right: 0; - left: 0; - width:870px; - margin:0 auto; + // position: absolute; + // top:0; + // right: 0; + // left: 0; + // max-width:870px; + // margin:0 auto; + + max-width: 870px; + margin-left: auto; + margin-right: auto; } .navbar a { font-size: 16px; @@ -139,6 +154,16 @@ pre { &.navbar-brand{ font-weight: bold; } + + &.toggle-sidebar { + margin-top: 8px; + } +} + +.sidebar a { + font-size: 14px; + padding-top: 14px !important; + padding-bottom: 14px !important; } .breadcrumb { @@ -149,7 +174,7 @@ pre { padding: 0px; padding-left:20px; background:url('/assets/img/up.png') 0% 30% no-repeat; - + .icon { display:none; } @@ -162,8 +187,14 @@ pre { font-size: 16px; } -a, a:hover, a:focus, a:visited { - color: @brand-primary; +.hero-and-content { + a, a:hover, a:focus, a:visited { + color: @brand-primary; + } + + a.btn { + color: inherit; + } } a.btn-primary& { @@ -214,11 +245,11 @@ p { .docs-footer { padding: 30px 0px 60px 0px; border-top: 1px solid @border-color; - width:870px; + max-width:870px; margin:0 auto; margin-top: 80px; font-size: 14px; - + h3 { margin-top:24px; font-size:16px; @@ -245,7 +276,7 @@ p { // fake frames .browser-image { - min-height: 300px; + min-height: 200px; border: 1px solid #d1d8dd; } @@ -333,7 +364,7 @@ a.edit, a.edit:hover, a.edit:focus, a.edit:visited { float:right; } .btn-next:after { - content:" \2192"; + content:" \2192"; } #current td { @@ -347,11 +378,11 @@ a.edit, a.edit:hover, a.edit:focus, a.edit:visited { font-size:16px; } -@media (max-width: 767px) { - .offcanvas-container, - .offcanvas, - .offcanvas-main-section { - position: relative; - width:50%; - } -} +// @media (max-width: 767px) { +// .offcanvas-container, +// .offcanvas, +// .offcanvas-main-section { +// position: relative; +// width:50%; +// } +// } diff --git a/frappe/templates/autodoc/base_template.html b/frappe/templates/autodoc/base_template.html index 3e69a365be..589f5bcd53 100644 --- a/frappe/templates/autodoc/base_template.html +++ b/frappe/templates/autodoc/base_template.html @@ -43,7 +43,7 @@ {%- endblock -%} {%- endblock -%} - +
    @@ -59,7 +59,13 @@ {% include "templates/includes/navbar/navbar.html" %} {%- endblock -%}
    + {%- block hero -%} +
    + {{ hero or "" }} +
    + {%- endblock -%} {% block content %} +
    {{ content }}
    @@ -68,7 +74,7 @@
    {%- if footer is defined -%}{{ footer }}{%- endif -%} - +

    By Frappe Technologies

    @@ -97,7 +103,7 @@
  • - +
    diff --git a/frappe/templates/autodoc/docs_home.html b/frappe/templates/autodoc/docs_home.html index 980fc4d166..c79d4ad44d 100644 --- a/frappe/templates/autodoc/docs_home.html +++ b/frappe/templates/autodoc/docs_home.html @@ -12,7 +12,11 @@ nav.navbar.navbar-main { border-bottom:1px solid rgba(225,233,240,0.25); } + {% if app.style %} {{ app.style }} {% endif %} + + +
    @@ -29,6 +33,8 @@
    + + {% if app.long_description %}
    diff --git a/frappe/utils/__init__.py b/frappe/utils/__init__.py index ffa5bfb803..f928535c4a 100644 --- a/frappe/utils/__init__.py +++ b/frappe/utils/__init__.py @@ -420,3 +420,31 @@ def get_request_session(max_retries=3): session.mount("https://", requests.adapters.HTTPAdapter(max_retries=Retry(total=5, status_forcelist=[500]))) return session +def watch(path, handler=None, debug=True): + import sys + import time + import logging + from watchdog.observers import Observer + from watchdog.events import LoggingEventHandler, FileSystemEventHandler + + class Handler(FileSystemEventHandler): + def on_any_event(self, event): + if debug: + print "File {0}: {1}".format(event.event_type, event.src_path) + + if not handler: + print "No handler specified" + return + + handler(event.src_path, event.event_type) + + event_handler = Handler() + observer = Observer() + observer.schedule(event_handler, path, recursive=True) + observer.start() + try: + while True: + time.sleep(1) + except KeyboardInterrupt: + observer.stop() + observer.join() diff --git a/frappe/utils/setup_docs.py b/frappe/utils/setup_docs.py index 5b86605826..c938cbce95 100644 --- a/frappe/utils/setup_docs.py +++ b/frappe/utils/setup_docs.py @@ -41,7 +41,8 @@ class setup_docs(object): "long_description": getattr(self.docs_config, "long_description", ""), "license": self.hooks.get("app_license")[0], "branch": getattr(self.docs_config, "branch", None) or "develop", - "version": getattr(self.docs_config, "version", "") + "version": getattr(self.docs_config, "version", ""), + "style": getattr(self.docs_config, "style", "") }), "get_doctype_app": frappe.get_doctype_app } @@ -407,3 +408,4 @@ class setup_docs(object): text = css_file.read() with open(path, "w") as css_file: css_file.write(text.replace("/assets/frappe/", self.docs_base_url + '/assets/')) +