mirror of
https://github.com/Paillat-dev/presentator.git
synced 2026-01-02 01:06:20 +00:00
Update main.py
This commit is contained in:
7
main.py
7
main.py
@@ -70,13 +70,18 @@ async def present(ctx: discord.ApplicationContext, subject: str, style: str = "d
|
|||||||
await ctx.defer()
|
await ctx.defer()
|
||||||
date = datetime.datetime.now()
|
date = datetime.datetime.now()
|
||||||
date = date.strftime("%Y-%m-%d-%H-%M-%S")
|
date = date.strftime("%Y-%m-%d-%H-%M-%S")
|
||||||
|
#if the style is dark
|
||||||
|
dark = False
|
||||||
|
if style in darkstyles:
|
||||||
|
sty = style.replace("-dark", "")
|
||||||
|
dark = True
|
||||||
marp = f'''---
|
marp = f'''---
|
||||||
marp: true
|
marp: true
|
||||||
theme: {styles[styles.index(style)]}
|
theme: {styles[styles.index(style)]}
|
||||||
class:
|
class:
|
||||||
- lead
|
- lead
|
||||||
'''
|
'''
|
||||||
if style in darkstyles: marp = marp + f" - invert\n---"
|
if dark: marp = marp + f" - invert\n---"
|
||||||
else: marp = marp + "\n---"
|
else: marp = marp + "\n---"
|
||||||
prompt = f"{intstructions} {indications} The subject of the presentation is: {subject} The Language is: {language} <|endofprompt|> \n {marp}"
|
prompt = f"{intstructions} {indications} The subject of the presentation is: {subject} The Language is: {language} <|endofprompt|> \n {marp}"
|
||||||
subject2 = subject
|
subject2 = subject
|
||||||
|
|||||||
Reference in New Issue
Block a user