Skip to content

Instantly share code, notes, and snippets.

@skolo-online
Created September 17, 2022 15:17
Show Gist options
  • Save skolo-online/078329c39615706a59e5e1278e16dfaa to your computer and use it in GitHub Desktop.
Save skolo-online/078329c39615706a59e5e1278e16dfaa to your computer and use it in GitHub Desktop.
Landing page functions
from .aigenerator import *
def getDescription(businessName, businessDo, length):
description = returnSection1Description(businessName, businessDo)
if len(description) < length:
return description
else:
desc_list = description.split('.')
if len(desc_list) == 1:
return description
while True:
answer = ''
for desc in desc_list:
answer += desc
if len(answer) > length:
desc_list.remove(desc_list[len(desc_list)-1])
else:
return answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment