🚧 remove useless descriptions
This commit is contained in:
parent
e896b21319
commit
f9bc468a56
1 changed files with 6 additions and 1 deletions
|
@ -16,6 +16,11 @@ def valid_duration(duration):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def valid_description(description):
|
||||||
|
if not description:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def parse_duration(duration):
|
def parse_duration(duration):
|
||||||
if not duration:
|
if not duration:
|
||||||
return ""
|
return ""
|
||||||
|
@ -35,7 +40,7 @@ def format_recipe_to_markdown(recipe):
|
||||||
md.append(f"# {recipe.get('name', 'Untitled Recipe')}")
|
md.append(f"# {recipe.get('name', 'Untitled Recipe')}")
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
if 'description' in recipe:
|
if valid_description(recipe.get('description')):
|
||||||
md.append(f"\n_{recipe['description']}_\n")
|
md.append(f"\n_{recipe['description']}_\n")
|
||||||
|
|
||||||
# Details
|
# Details
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue