first app implementation

version-13
Claudio Maradonna 2022-06-23 11:06:44 +02:00
parent a9bcc9c1de
commit 41a6414ae5
Signed by: 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'

View File

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