first app implementation

This commit is contained in:
Claudio Maradonna 2022-06-23 11:06:44 +02:00
parent a9bcc9c1de
commit 41a6414ae5
Signed by untrusted user who does not match committer: claudiomaradonna
GPG key ID: 0CBA58694C5680D9
4 changed files with 34 additions and 23 deletions

View file

@ -1 +1,2 @@
# frappe -- https://github.com/frappe/frappe is installed via 'bench init' frappe
markdownify

View file

@ -1,3 +1 @@
__version__ = '0.0.1' __version__ = '0.0.1'

View file

@ -151,26 +151,26 @@ app_license = "GPLv3"
# User Data Protection # User Data Protection
# -------------------- # --------------------
user_data_fields = [ # user_data_fields = [
{ # {
"doctype": "{doctype_1}", # "doctype": "{doctype_1}",
"filter_by": "{filter_by}", # "filter_by": "{filter_by}",
"redact_fields": ["{field_1}", "{field_2}"], # "redact_fields": ["{field_1}", "{field_2}"],
"partial": 1, # "partial": 1,
}, # },
{ # {
"doctype": "{doctype_2}", # "doctype": "{doctype_2}",
"filter_by": "{filter_by}", # "filter_by": "{filter_by}",
"partial": 1, # "partial": 1,
}, # },
{ # {
"doctype": "{doctype_3}", # "doctype": "{doctype_3}",
"strict": False, # "strict": False,
}, # },
{ # {
"doctype": "{doctype_4}" # "doctype": "{doctype_4}"
} # }
] # ]
# Authentication and authorization # Authentication and authorization
# -------------------------------- # --------------------------------
@ -186,3 +186,9 @@ user_data_fields = [
# Recommended only for DocTypes which have limited documents with untranslated names # Recommended only for DocTypes which have limited documents with untranslated names
# For example: Role, Gender, etc. # For example: Role, Gender, etc.
# translated_search_doctypes = [] # translated_search_doctypes = []
jenv = {
"methods": [
"html_to_markdown:u_utils.utils.html_to_markdown"
]
}

6
u_utils/utils.py Normal file
View file

@ -0,0 +1,6 @@
import frappe
import markdownify
@frappe.whitelist()
def html_to_markdown(html_content):
return markdownify.markdownify(html_content, heading_style="ATX")