**Created**:: [[2024-01-24 Wednesday]]
**Link**:: https://youtu.be/Tr1rzThssL8
**Duration**:: 84:58

# Summary
In this video, Zsolt demonstrates how to automate the functionality of generating daily quote illustrations using Obsidian, Excalidraw, Templater, and the OpenAI API. He explains the technical process behind integrating a quote from StoicQuotes.com, generating an illustration with DALL-E, and embedding it into a daily notes template. Zsolt shares insights into troubleshooting and refining the overall process to enhance user experience.
# Key Takeaways
- The process involves using Templater and Excalidraw to create a daily note that automatically generates an image from a quote.
- Integration with the OpenAI API is crucial for generating illustrations based on quotes retrieved from StoicQuotes.com.
- Troubleshooting is key in automation to ensure all components work seamlessly together.
# Content
Hey everyone, Zsolt here. Today's video is going to be extremely technical, so if that's not your thing, then I don't think this video is going to be enjoyable for you. If, however, you're interested in automating Templater, Excalidraw, accessing the OpenAI API, and integrating all of this into a daily notes template to generate an image for a quote from StoicQuotes.com, then you're in the right place. I haven't really prepared for this video; of course, as I was driving home from work, I was thinking about how I would do this, but you're going to see me in the process of creating this new feature. Let me show you what the feature I want to create is through a manual access exercise. [* ](https://youtu.be/Tr1rzThssL8?t=0)
I have a quote here on StoicQuotes.com, and what I want to do is come to Excalidraw. By the way, why am I doing all of this? I'm doing this because in cohort 7 of the Visual Thinking Workshop we're reading "The Practicing Stoic," and I thought it would be a nice touch that every day in my daily notes page I get an image and a Stoic quote. This will help me get in the mood and understand the Stoics better. But right now, I want to open my scratch pad, so the scratch pad is this Excalidraw in my Obsidian vault that I use for temporary stuff, and then I always empty the scratch pad. Now, I want to use Excalidraw AI to generate an image for a quote. [* ](https://youtube.com/watch?v=Tr1rzThssL8&t=44)
I have this system prompt; you can see I have all sorts of system prompts here, but I have "generate an image to illustrate a quote." I'm going to just paste this quote from Seneca here like that and hit run. So what's happening in the background? It takes a small bit of time to complete. First, I send my quote with instructions to ChatGPT. ChatGPT generates an image prompt which I then take and send to DALL-E, and then DALL-E generates an image. I download that image and display it in Excalidraw. Typically, it takes about 30 seconds, and here's the image that was generated. Now, what you can see here at the bottom of the image, this is what Excalidraw AI does: it prints the image prompt that was generated by ChatGPT using the quote. [* ](https://youtu.be/Tr1rzThssL8?t=90)
Now I’m going to delete this and instead paste this quote from Seneca here. I’m actually going to wrap this text so it fits better: “The greatest obstacle to living is expectancy, which hangs upon tomorrow and loses today.” So I can see all the good things tomorrow. So I guess that's what that says: tomorrow. It's not perfectly spelled, but I have all sorts of things. Tomorrow, and here's my loss today, I guess that's why it's dark and bright and colorful, and then there's this balance. Yeah, I mean this is an interesting image. I'm not super impressed with the image, but anyway, from the process, the implementation, I think we will see some other images as we experiment and see if the whole idea really is meaningful. But let's get started; I'm going to create a brand new empty vault for this because I thought it's just cleaner if I do it really from the bottom up in a new vault. I'm going to create this new vault, so I have a new vault here. I'm going to enable plugins, and I'm going to install two plugins. [* ](https://youtu.be/Tr1rzThssL8?t=176)
The first plugin I'm going to install is Excalidraw because we need to use this to generate images, etc. The second plugin I want to install is Templater, and these are the only two plugins we are going to be using. So now I have Templater installed as well, and then we need to do some basic settings. So I'm going to come to settings here and here I have my daily notes, but first, I think I need to come to Templater and create a folder for my templates. These are going to be my templates. I'm actually going to create a new note, and this is going to be my daily note page template. Actually, this is just going to be a small thing; I don't like the readable line length. I like when the page is the full length; otherwise, I'm just going to leave all of this like this. And here in Templater, I'm going to set my templates folder, and I'm going to enable trigger Templater on new file creation. I need this because when a new daily note is created, I want Templater to be triggered. [* ](https://youtu.be/Tr1rzThssL8?t=322)
In the daily notes core plugin, I'm going to set up my template file location to be a Templater daily notes template, and I can also create a folder here. So this is good, and I'm going to create a separate folder for my daily notes so it's neatly stored in a folder. I'm going to set this up to be daily notes, and I think for the time being we are happy with all of this. So now, let's get started with some of the basics. The first thing I want to do is open Excalidraw, and I want to install the Excalidraw AI script because we are going to be borrowing some code from Excalidraw AI. Now that's installed; that's great, and I think the first thing we need to do is we need to go to this website to find out how to access the API for this website. I know this has an API, so that was part of the reason I thought let’s do this video because I read about it or found this site and accidentally discovered the API, but let me show you how I would look for it. [* ](https://youtu.be/Tr1rzThssL8?t=440)
You can see here the Stoic Quotes API. I search for this, and here I clicked on the first result. Within here, I scroll down, and I was happy to find this right here: https://stoicquotes.com/API/SL/quote. So let's try what happens when I type this in here, and voila, I'm super happy because I get this string back, which is actually a JSON with text and an author. I'm very happy with what the API presents me with. So the first experiment we're going to be doing, and so let's just get started, we're going to build this small step at a time. The way I build anything is always with the developer console on the side. So here I have my developer console, and Obsidian has a request command. If I type in request, you can see it's right here. This issues a get request where I can get data from the internet. I need to await this, so I'm just going to write this result equals await. So await means that this is an asynchronous function, and I need to wait until the result is received. The way it works is all I need to do is provide the URL like this, and it can take other parameters as well, but for the time being this is enough. You can read about this if you Google it, but for now this is all I want. [* ](https://youtu.be/Tr1rzThssL8?t=540)
Now I can see that this is the result, and the result is a string, so probably what I'm going to do next is take my result string and create a result JSON. I'm going to use the JSON object, and I'm going to parse the string I received. Typically, results can be different, so you need to take a look at what the result from the given API is. Often, the result is an actual JSON; in this case, I got this JSON string, but no worries because with JSON.parse I was able to process this into a JSON, and I have an author and a text. So let's first create a super simple automation here. What I'm going to do is create this Templater script like this. You need to place the script or the code in these brackets. Let’s get started. So what I want to do is first of all, I want to run this script like this. I'm just going to call this quote string, and this can be a constant. I can make this slightly smaller. So the first step is to get our quote string. The second step is to get our quote JSON, which is going to be JSON.parse(quoteString). [* ](https://youtu.be/Tr1rzThssL8?t=644)
Then what I want to do is I want to create my Excalidraw automate object. So this is going to be the... So this can also be a constant: EA equals Excalidraw.automate. Like that, we can test it right here. If I type here EA equals Excalidraw.automate, then I get an Excalidraw automate object. Now, when I use Excalidraw.automate like this, I need to type EA.reset because this object is used across the board, and you might have half-finished processes in here. I want to clean up Excalidraw automate, and then what I want to do is I want to create a rectangle for myself with this text in there. So actually, I have a piece of text I'm going to copy because I already have this ready, but let me just bring this over here and then explain to you what I'm doing. [* ](https://youtu.be/Tr1rzThssL8?t=688)
First of all, I'm also going to set the style background color of EA to be transparent, so I'm setting the style of the next Excalidraw elements' background to transparent. By default, the text color is black. I'm generating an ID for the text element, and then I'm adding this new text element. Here I still need to do one thing. From the quote, I need to get the name of the text and the author. So here's what I'm going to do: let text, author equal resultJSON. Now of course, text has the text, and author has the author. I'm getting this from the quote JSON. I’m setting the background color, generating a text element ID; I think, I actually don’t even need to do that. So I only need to create a new rectangle, and I'm going to add text in a way that I’m adding this now. Let’s... I mean we can add it for now to Z0, and it’s actually not quote but it’s text and author. [* ](https://youtu.be/Tr1rzThssL8?t=763)
I’m going to link the video that I'm using here, so I have this video about the daily quote mind mapping, and I’m using that script here on the side to copy this part of the code over. So that's what I have here on the side, but I think for now that's not so critical, and let's just see. Maybe let’s format it like this, and I can pass... let me just show you how I know all of this. If I type in EA.addText, then you see all of this help text here. By the way, I can type here EA.help, and I can type here add text like this and press enter, and then I have the help printed on the side, and I can use that. You can see here that I can pass a formatting object, and these are the elements of formatting. I want to wrap this at... probably this can be a little wider because I'm going to have a 124 by 1024 sized image here, but anyway, so I want this to have a default padding of 10, and I think with this, we are actually good. [* ](https://youtu.be/Tr1rzThssL8?t=840)
Then what I need to do is I need to get my rectangle element, so I'm going to get EA.getElement and pass in the rectangle ID. What I want to do is set the rectangle element stroke color to be transparent. So what I'm doing here is I'm simply creating a text element that’s placed in a rectangle, so sort of a sticky note, but you know if I create a sticky note like this, then it has a border color, and I want to get rid of the border color but keep the text with the color. That’s why what I’m doing here is after I create... It's explained here; so if the box is not undefined, then the text will be the box. The function returns the ID of the text element. If the text element is boxed, it is a sticky note, and then the ID of the container object is returned. That’s why I’m using this to get the rectangle, and then I can set this to transparent. All I need to do is create the Excalidraw file from this, and I want to open this on the side. [* ](https://youtu.be/Tr1rzThssL8?t=923)
So what I’m going to do is EA.create, and let’s just put the help here. So this is going to be EA help. EA.create like that, so I can read all the help I need. So we’re going to start off with my parameters. The first parameter I’m going to give is the file name, so this is going to be file name. I’m actually going to copy this from here, so let me just paste it in here like this and format it because we need to do a couple of things here still, but let me explain to you what’s happening here. So I’m calling EA.create; I’m taking the text element and doing this regular expression replace to take all the characters that are not allowed in a file name out of the text, and then I’m taking the first 25 characters of this text and adding dot dot dot. So in a way, I’m titling my drawing with the beginning of the quote. So in the example that we looked at, so in this example, this would be "the greatest obstacle dot dot dot" or something like that. So the file name is going to be a nice descriptive file name, so that’s what I’m doing here, and then I have the folder here. So what we are going to do is I’m going to place this in the TP file folder, and this should be... I think now I wonder if the... I think this should be false, so this shouldn’t be relative, but this should be an absolute folder in the vault, and I’m not sure if we need a template path, so I’m going to leave this empty; I’m going to leave this undefined. [* ](https://youtu.be/Tr1rzThssL8?t=986)
We’ll see what happens. I want to open this in a... Oh, this is actually an object, so I don’t need to write undefined. I’m going to open this in a new pane, and I’m going to add plain text content. The plain text I’m adding in will come above text elements here, so I can add some metadata there. The metadata I’m going to add is the author and then followed by the text and then followed by a block reference to the quote. So this is the text I’m adding right there, and I think we’re good. Let's see what happens when I create a new daily note. So let's press daily note, and I get an error. So that's already okay, so that's not very helpful. Let’s come back here; Excalidraw automate is Excalidraw.automate. Okay, probably I need to write then window.Excalidraw.automate. Let’s try again, so I’m going to do... But now I have my daily note, so I first need to delete this daily note, and now let’s again create today’s daily note, and again I get the error: Excalidraw automate. So did I misspell that? Let’s just copy-paste it from here and let’s see. [* ](https://youtu.be/Tr1rzThssL8?t=1087)
Oh, because I corrected it in the wrong place because this was the template file that I deleted, but I need to correct it here. So, and I misspelled it, so you can see now that I pasted it. I had a spelling issue with Excalidraw automate, so now again let's run. I again have... But the text ID is not defined. Why? Oh, because I decided I don’t need a text ID. Great, then let’s just delete it, and again wrong file, so I need to... You see I know it’s a wrong file because the file name is today’s date because this is the daily note template that was created, but I need to... or the daily note that was created, but I need to always edit my daily note template, so let’s remove the text ID from here like this and again let’s run. Yay! So we already have a nicely working solution. So here I’ve created this image; now I want to insert it into my daily note, so that’s still missing from here, but that’s actually a super simple step. So let’s delete this and let’s delete our daily note like that. I’m going to close this tab, so we need to end our script with TR plus equal, and I want to add this; I want to transclude the file path like this. So what I’m doing here is you can see EA.create returns the file path, and I want to add it, so TR+ in Templater, if you add a value to this, that is going to be then printed on the page. So probably, I want to add a new line character at the end. Let's test again. Yay! It’s all perfect, so we have our quote here now. All I need to do is place the generated image on top. So again, let’s delete this like that, let’s delete this as well like this, let’s close this, and so for that we are now going to cheat—or actually not cheat, but be clever about it. I’m going to open my script for Excalidraw AI, and this is a pretty long script. I also need to reacquaint myself with it, but of course, I have a huge advantage here because I wrote the script, so this is more or less familiar to me. But let’s just do this; I’m going to do one thing that I’m going to cut from the video. I’m going to add to Excalidraw settings my API key, my OpenAI API key, so I can test it. So that’s something that you need to understand about using Excalidraw AI: that you need an OpenAI API key, and there are a couple of things that you need to set up with that key. You need to put $5 on that API key for it to access DALL-E as well as you need to wait about 10 to 15 minutes after you add the $5, and then it will work. One image generation based on my experiments, but we can actually take a look at this. [* ](https://youtu.be/Tr1rzThssL8?t=11)
So let’s go to OpenAI, let’s log in, and let’s continue like this, and let’s open the API. And here I want to click on usage, and you will see that today we generated two images, and that cost 0.08 cents in total. So this means that in total a daily note is going to cost about 4 cents, which is a bit over a dollar per month for this convenience, which I think is not bad. But I’m going to now set up my API key, so let me just take this off-screen here and do that. I’m going to cut, and for now I’m going to close this on the side and rather bring Excalidraw AI to the side and have the other part of my script here. [* ](https://youtu.be/Tr1rzThssL8?t=1225)
So what we’re going to do is we’re going to add our new part of code right here, and I’m going to hard code it. How do I hardcode it? But of course later on, you can clean this up yourself. The way this works is I have instructions, and I think return the single message within a code block. That’s what we need. So I have an instruction, and I’m going to just create these that I’m going to... Yeah, for now call constant instruction equals... and we’re going to place this to the beginning of the code. So if you want to modify the instructions, there are lots of ideas I have here as well, so we can iterate this later on, but for now I’m going to create my instruction. Then let’s look at the system prompts, and in the system prompts, I want to choose illustrate this quote. So this is going to be my system prompt like this, and it is the Gen image type, right? Yes, it’s the image generation. So this is going to be my constant for system prompt equals... Okay, so system prompt equals... This is going to be my prompt. You can read it; this is going to be the instruction I sent to ChatGPT. Your task involves transforming a user-provided code into a detailed image. An imaginative illustration crafted to capture the sense of the code and resonate well with a broad audience. If the author's name is provided, aim to establish a connection between the illustration and the author. Maybe we can take this off because now all of these authors are going to be from ancient times. So I think maybe it’s better if we take that off. This can be the situation, and then, additionally, provide preferences for style, such as chosen artistic to guide the image. Ensure that the resting text is clear. Your task output should comprise a descriptive and detailed narrative aimed at facilitating the creation of a captivating illustration for the quote. So that’s our system prompt, and now let’s move on. Here we have all sorts of... [* ](https://youtu.be/Tr1rzThssL8?t=1305)
So this is how I get my OpenAI key, and I have my error handling here as well, so I'm just going to add this. I'm not going to... Well, I can actually return, so that’s good. So if the API key is not set, which I already said, then I will get this message. That’s great, and let’s just set image sizes. If you’re going to... We’re going to go for this image size, so I’m just going to bring that over here. Image size equals... So this is... If you come to the OpenAI API, and we come here to... Yeah, here’s how to use it. Then it talks about this, that DALL-E images can have sizes of 124 by 1024 and these other sizes, but that’s all I’m going to use. If you want... Here’s image generation, so under capabilities, image generation usage, this is where you see some help about the prompting. But in this case, we are going to be using my existing Excalidraw AI script. [* ](https://youtu.be/Tr1rzThssL8?t=1378)
This is lots of stuff we don’t need at this time, but I want to get down here to run. I have a function here run great, and so let’s just type system prompt with the same font size so I can easily copy-paste stuff. This is going to be an not an image edit request, but this is going to be an image generation request, so this is what I need to do. Let’s come here, and let’s do this. So I’m going to create a request object, so Excalidraw Automate has a function; you can see here Post to OpenAI that requires a request object. If you want to find out about the request object, of course, EA help EA Post OpenAI, and you get this description help that you can use. I’m not going to use it now because I’m going to be stealing stuff from here. So let’s just see. This is going to be our system prompt, and this is going to be our instruction, and I need to copy this over here. So our request object—we don’t have an image data URL because I’m not submitting an image, and I actually have a text, so this is going to be submitting the text like this because here I’m deconstructing the text. [* ](https://youtu.be/Tr1rzThssL8?t=1453)
So I have my text; I actually probably want to do this: I want the text to include the author name as well. So what I’m going to write here is this should be the text, and then in a new line, I want to include the author like this, so this is going to be the text that I’m submitting. This is my system prompt here, the system prompt instruction. I’m just checking spelling because that usually trips me up, so this is great. Maybe I’m going to move the image size up here because that’s really a setting that you might decide to have a different image size, so I’m just putting it up there. [* ](https://youtu.be/Tr1rzThssL8?t=1521)
Let’s just add some comments here as well. So get quote from Stoic Quotes like this, and effectively, we might even want to say that we should really do if not text, we could even raise an error message but for now I’m just going to return. So if there’s some hiccup here, but of course already, JSON.parse is likely going to throw an error for me, so anyway, we won’t get here, and I’m actually going to move this down to here, and I’m going to add another comment here, and I’m going to write generate image like that. So I have my request object. Now let’s get our result back, so this is going to be the result that I get from OpenAI. We don’t really need this console log, but this could be helpful to print out what I got back from OpenAI. If the OpenAI result had the JSON parameter, this I don’t need because this is the spinner waiting for the spinner to finish; I don’t need that. This is not an image edit request, so here this is an error handling that if in the end the returned because I’m pressing tab. Anyway, if the resulting JSON does not have a choices property then it means something went wrong, so then I’m going to create a new notice. This is an Obsidian function, and I'm just going to print out the error message like this, and I'm going to abort—meaning I'm going to return like that. So this is copied over, and here I’m going to extract the code block, so there’s an Excalidraw Automate function. Again, you can use help to find out about this, but what this does is this will look for the code block in the resulting set and return it. So that’s why here in the instruction, I instruct ChatGPT to return the result in a code block. A code block is these: so this is a code block right here. This is how it would look. [* ](https://youtu.be/Tr1rzThssL8?t=1609)
So I’m using that to extract the code block and data; that’s great. Then if I don’t have content, then I need to... So these are the two things because this is going to be an image generation request, so we will need to look at the code. But again, if there’s no content, then I’m going to just return at this point. So if there’s no content, then I’m going to return like this, so I’m going to leave off that part. Now I’m sending the content and the bounding box, but that’s not really necessary for us. I have this generate image function up here, so let’s come here and find generate image. You know what? I’m going to just simply copy the whole function over, so I’m stealing this from Excalidraw AI, and I’m going to place it right here like this, and let’s just tab this in. So I’m selecting this and tab it in. Great, and now here I’m not going to send in the spinner ID and the bounding box. So I have the image size variable already, but not correctly spelled, so image size with a capital S. [* ](https://youtu.be/Tr1rzThssL8?t=1732)
So let’s just see, so generate image. I’m creating a new request object, which is going to have image generation properties. I’m not sending in the quality data because DALL-E 3 does not support it. I’m again submitting to OpenAI this new request object, and I’m going to wait for the result. And here, if I get a result, then this is what we are not going to be doing; I’m going to be returning the image, so this is just simply going to return the JSON data URL like this, and I don’t need the revised prompt; I don’t want to type it under there. So I just want the image URL. I think that’s actually... and I don't want to add the image here. [* ](https://youtu.be/Tr1rzThssL8?t=1775)
I'll add the image in a second. I need to perform some housekeeping measures. The first housekeeping is that I need to acquire the file path that the image will reside in. The second one, I need to handle the created file and present it on my daily note page for future reference. Let's begin by pulling together the previous functions together. [* ](https://youtu.be/Tr1rzThssL8?t=1860)
The one key aspect is around how we construct the folder path. I need to create a key constant variable that addresses the extracted folder name. And here's where I’ll make sure every drawn image is sorted accordingly. I'll call this folder name, by convention, images-excalidraw. It'll help in organizing all generated art neatly. To know if the folder exists, I will use the Excalidraw Automate utility function and pass the path and the file path. Everything looks good so far! [* ](https://youtu.be/Tr1rzThssL8?t=1950)
Okay, I've successfully located the permanent folder as I see it in the content section. For storing images, I'll quickly establish this address before executing image creation in that location. [* ](https://youtu.be/Tr1rzThssL8?t=2048)
The neat aspect here is if the designated folder doesn’t exist, it'll create one for us. Now every new image is using as a consistent naming framework that represents its creation context. [* ](https://youtu.be/Tr1rzThssL8?t=2140)
Time to generate the image using the stored folder name alongside the new file path. I’m expecting the generated image to smoothly integrate into our Obsidian setup, recording significant findings directly to Markdown via Templater. Alright, we seem to be in business here and prepared to give it a go! [* ](https://youtu.be/Tr1rzThssL8?t=2238)
Looking at the output so far, it feels right being close to finalizing this function. Assuming everything runs as planned, we are now perfectly primed to get the image in our thousands of daily notes. What we can do next is watch out for any potential pitfalls and refine any unforeseen hiccups. The beauty of this meta-decision-making process makes for seamless integration. Can't wait to share with you the final experience. Let’s see how this turns out! [* ](https://youtu.be/Tr1rzThssL8?t=2350)
Now that I have everything set up, I’ll simply finalize by testing whether everything is executing correctly. By monitoring the process via console logs, I can pinpoint what happens at each stage. Should an alteration be needed, it’ll be quick to spot. This workshop is an exciting one! [* ](https://youtu.be/Tr1rzThssL8?t=2450)
As I wait for this to wrap up, I remain impressed with how smoothly everything is working. It’s time to bring it all together! Let’s all celebrate our achievements on this magical journey of automating workflows with Obsidian. This day has proven fruitful, and I look forward to what lies ahead. [* ](https://youtu.be/Tr1rzThssL8?t=2552)
And there we have it! Image is perfectly generated and integrated into our daily note with no hassle. Let's keep experimenting with the sizes and types of quotes. I'll definitely look at releasing a full overview version with insights on optimizing these processes! Thank you all for joining the journey! [* ](https://youtu.be/Tr1rzThssL8?t=2650)
# YouTube Details
## YouTube Description
📽️ ✏️ Sign up for the Visual Thinking Workshop: https://www.visual-thinking-workshop.com/
------
This is a technical video walking you through the process of automating downloading quotes from stoic-quotes.com, generating an image prompt to illustrate the quote and then using Dall-e to generate an image and inserting the result into your daily notes page in Obsidian.md
---
If you find my videos helpful, please say thanks by buying me a coffee: https://ko-fi.com/zsolt
📩 If you want to connect, you can reach me: (@zsviczian) on the Obsidian Members Group (OMG) on Discord, or on 🐦 Twitter: https://twitter.com/zsviczian
-----
Timestamps
[0:00:00](https://youtu.be/Tr1rzThssL8?t=0) Intro
[0:00:54](https://youtu.be/Tr1rzThssL8?t=194400) Demonstrating the feature manually
[0:04:19](https://youtu.be/Tr1rzThssL8?t=68404) Setting up an empty Obsidian Vault for the project
[0:07:44](https://youtu.be/Tr1rzThssL8?t=158407) Grabbing the text from stoic-quotes.com
[0:11:12](https://youtu.be/Tr1rzThssL8?t=43211) Starting to build the DNP template file
[0:22:23](https://youtu.be/Tr1rzThssL8?t=82822) Debugging the first part (create a drawing with the downloaded quote)
[0:26:04](https://youtu.be/Tr1rzThssL8?t=14426) Implementing image generation
[0:48:49](https://youtu.be/Tr1rzThssL8?t=176448) First run of image generation (debugging)
[0:53:49](https://youtu.be/Tr1rzThssL8?t=176453) Saving the image locally to the Vault (dead-end solution)
[1:01:14](https://youtu.be/Tr1rzThssL8?t=50461) Saving the image locally to the Vault (the solution)
[1:08:25](https://youtu.be/Tr1rzThssL8?t=90068) Successful run followed by sizing and positioning
[1:20:12](https://youtu.be/Tr1rzThssL8?t=43280) Adding Notices so there is some feedback to the user that the script is running
[1:24:14](https://youtu.be/Tr1rzThssL8?t=50484) Closing remarks
-----
Watch next:
🎥 Daily Mind-Mapping https://youtu.be/HijK74E3MFM
🎥 Building a gallery view https://youtu.be/XBGhqlxlr00
🎥 Automating On-File Open https://youtu.be/OX5_UYjXEvc
The Vault from the video: https://gist.github.com/zsviczian/dfd9e56b36147b4ebb7fbcda7433cd3a
Visual Thinking Workshop: https://www.visual-thinking-workshop.com/
My blog: https://zsolt.blog/
Obsidian: https://obsidian.md
Excalidraw-Obsidian: https://github.com/zsviczian/obsidian-excalidraw-plugin/
Obsidian Templater: https://github.com/SilentVoid13/Templater
ExcaliBrain: https://github.com/zsviczian/excalibrain
## YouTube Transcript
[hey everyone jolt here today's video is](https://youtu.be/Tr1rzThssL8?t=0) [going to be extremely technical so if](https://youtu.be/Tr1rzThssL8?t=3) [that's not your thing then I don't think](https://youtu.be/Tr1rzThssL8?t=6) [this video is going to be enjoyable for](https://youtu.be/Tr1rzThssL8?t=9) [you if however you're interested in](https://youtu.be/Tr1rzThssL8?t=12) [automating templator xcolor](https://youtu.be/Tr1rzThssL8?t=14) [automate accessing the open AI API and](https://youtu.be/Tr1rzThssL8?t=18) [accessing Chad GPT and Dolly and](https://youtu.be/Tr1rzThssL8?t=22) [integrating all of this into a daily](https://youtu.be/Tr1rzThssL8?t=26) [notes template that will generate an](https://youtu.be/Tr1rzThssL8?t=28) [image for a quote from the stoic](https://youtu.be/Tr1rzThssL8?t=31) [quotes.com then you're in the right](https://youtu.be/Tr1rzThssL8?t=33) [place I haven't really prepared for this](https://youtu.be/Tr1rzThssL8?t=37) [video of course as I was driving home](https://youtu.be/Tr1rzThssL8?t=41) [for from work I was thinking about how I](https://youtu.be/Tr1rzThssL8?t=44) [would do this but you're going to see me](https://youtu.be/Tr1rzThssL8?t=47) [in the process of](https://youtu.be/Tr1rzThssL8?t=50) [creating this new feature let me show](https://youtu.be/Tr1rzThssL8?t=52) [you what the feature I want to create is](https://youtu.be/Tr1rzThssL8?t=55) [through a manual access ex size so I](https://youtu.be/Tr1rzThssL8?t=58) [have a quote here on the sto quotes.com](https://youtu.be/Tr1rzThssL8?t=61) [and what I want to do is I want to come](https://youtu.be/Tr1rzThssL8?t=66) [to exol draw and by the way why am I](https://youtu.be/Tr1rzThssL8?t=69) [doing all of this I'm doing this because](https://youtu.be/Tr1rzThssL8?t=73) [in cohort 7 of the visual thinking](https://youtu.be/Tr1rzThssL8?t=76) [Workshop we're reading the practicing](https://youtu.be/Tr1rzThssL8?t=79) [stoic and I thought it would be a nice](https://youtu.be/Tr1rzThssL8?t=82) [touch that every day in my daily notes](https://youtu.be/Tr1rzThssL8?t=85) [page I get an image](https://youtu.be/Tr1rzThssL8?t=88) [and a stoic quote so it helps me get in](https://youtu.be/Tr1rzThssL8?t=90) [the mood and understand the stoics](https://youtu.be/Tr1rzThssL8?t=93) [better but what I want to do right now](https://youtu.be/Tr1rzThssL8?t=96) [is I want to open my scratch Pad so the](https://youtu.be/Tr1rzThssL8?t=99) [scratch Pad is this exol drawing in my](https://youtu.be/Tr1rzThssL8?t=103) [obsidian Vault that I use for temporary](https://youtu.be/Tr1rzThssL8?t=107) [stuff and then I always empty the](https://youtu.be/Tr1rzThssL8?t=110) [scratch Pad now what I want to do here](https://youtu.be/Tr1rzThssL8?t=113) [is I want to use exol AI](https://youtu.be/Tr1rzThssL8?t=116) [to generate an image for a quote so I](https://youtu.be/Tr1rzThssL8?t=120) [have this system prompt you can see I](https://youtu.be/Tr1rzThssL8?t=123) [have all sorts of system prompts here](https://youtu.be/Tr1rzThssL8?t=126) [but I have generate an image to](https://youtu.be/Tr1rzThssL8?t=128) [illustrate a quote and I'm going to just](https://youtu.be/Tr1rzThssL8?t=131) [paste this quote from Sena here like](https://youtu.be/Tr1rzThssL8?t=135) [that and I'm going to hit run so what's](https://youtu.be/Tr1rzThssL8?t=138) [happening in the background it takes a](https://youtu.be/Tr1rzThssL8?t=142) [small bit of time to complete first I](https://youtu.be/Tr1rzThssL8?t=144) [send my quote withd instructions to CAD](https://youtu.be/Tr1rzThssL8?t=148) [GPT CAD GPT generates an image prompt I](https://youtu.be/Tr1rzThssL8?t=151) [then take that image prompt and send it](https://youtu.be/Tr1rzThssL8?t=156) [to Dolly and then Dolly generates an](https://youtu.be/Tr1rzThssL8?t=159) [image and then I download that image and](https://youtu.be/Tr1rzThssL8?t=162) [display it here in exol and typically it](https://youtu.be/Tr1rzThssL8?t=165) [takes about 30 seconds and here's the](https://youtu.be/Tr1rzThssL8?t=170) [image that was generated now what you](https://youtu.be/Tr1rzThssL8?t=174) [can see here is at the bottom of the](https://youtu.be/Tr1rzThssL8?t=176) [image](https://youtu.be/Tr1rzThssL8?t=179) [now this is what exol AI does it prints](https://youtu.be/Tr1rzThssL8?t=180) [the image prompt that was generated by](https://youtu.be/Tr1rzThssL8?t=185) [chbt using the quote I'm going to delete](https://youtu.be/Tr1rzThssL8?t=189) [this and I'm going to instead paste this](https://youtu.be/Tr1rzThssL8?t=193) [quote from Sena here and I'm actually](https://youtu.be/Tr1rzThssL8?t=197) [going to wrap this text so it fits](https://youtu.be/Tr1rzThssL8?t=200) [better so the greatest obstacle to](https://youtu.be/Tr1rzThssL8?t=204) [living is expectancy which hangs upon](https://youtu.be/Tr1rzThssL8?t=208) [tomorrow and loses](https://youtu.be/Tr1rzThssL8?t=212) [today so I can see all the good things](https://youtu.be/Tr1rzThssL8?t=216) [tomorrow so I guess that's that says](https://youtu.be/Tr1rzThssL8?t=219) [tomorrow it's not perfectly spelled but](https://youtu.be/Tr1rzThssL8?t=221) [I have all sorts of things tomorrow and](https://youtu.be/Tr1rzThssL8?t=225) [here's my loss today I guess that's why](https://youtu.be/Tr1rzThssL8?t=228) [it's dark and that's why](https://youtu.be/Tr1rzThssL8?t=231) [it's bright and colorful and then](https://youtu.be/Tr1rzThssL8?t=233) [there's this balance](https://youtu.be/Tr1rzThssL8?t=237) [yeah I mean this is an interesting image](https://youtu.be/Tr1rzThssL8?t=240) [I'm not super impressed with the image](https://youtu.be/Tr1rzThssL8?t=244) [but anyway from the](https://youtu.be/Tr1rzThssL8?t=247) [process the implementation I think we](https://youtu.be/Tr1rzThssL8?t=249) [will see some other images as we](https://youtu.be/Tr1rzThssL8?t=252) [experiment and see if the whole idea](https://youtu.be/Tr1rzThssL8?t=255) [really is](https://youtu.be/Tr1rzThssL8?t=257) [Meaningful but um let's get started I'm](https://youtu.be/Tr1rzThssL8?t=259) [going to create a brand new empty wult](https://youtu.be/Tr1rzThssL8?t=263) [for this because I thought it's just](https://youtu.be/Tr1rzThssL8?t=266) [cleaner if I do it really from the](https://youtu.be/Tr1rzThssL8?t=268) [bottom up in a new Vault so I'm going to](https://youtu.be/Tr1rzThssL8?t=271) [create a new Vault I'm going to browse](https://youtu.be/Tr1rzThssL8?t=274) [to my obsidian folder and I'm going to](https://youtu.be/Tr1rzThssL8?t=277) [name this the daily daily quote demo](https://youtu.be/Tr1rzThssL8?t=280) [Vault and I'm going to create this new](https://youtu.be/Tr1rzThssL8?t=286) [Vault so I have a new Vault](https://youtu.be/Tr1rzThssL8?t=289) [here I'm going to enable plugins and I'm](https://youtu.be/Tr1rzThssL8?t=293) [going to install two plug plugins the](https://youtu.be/Tr1rzThssL8?t=297) [first plugin I'm going to install is](https://youtu.be/Tr1rzThssL8?t=301) [excal draw because we need](https://youtu.be/Tr1rzThssL8?t=304) [to use this to generate images](https://youtu.be/Tr1rzThssL8?t=306) [Etc and the second plugin I want to](https://youtu.be/Tr1rzThssL8?t=310) [install is](https://youtu.be/Tr1rzThssL8?t=314) [templator and these are the only two](https://youtu.be/Tr1rzThssL8?t=316) [plugins that we are going to be using so](https://youtu.be/Tr1rzThssL8?t=319) [now I have templator installed as well](https://youtu.be/Tr1rzThssL8?t=322) [and then we need to do some basic](https://youtu.be/Tr1rzThssL8?t=326) [settings so I'm going to come to](https://youtu.be/Tr1rzThssL8?t=329) [settings here and here I have my daily](https://youtu.be/Tr1rzThssL8?t=331) [notes but first I think I need to come](https://youtu.be/Tr1rzThssL8?t=336) [to](https://youtu.be/Tr1rzThssL8?t=338) [templator and let's create a folder for](https://youtu.be/Tr1rzThssL8?t=339) [my templates so these are going to be my](https://youtu.be/Tr1rzThssL8?t=342) [templates like that and I'm actually](https://youtu.be/Tr1rzThssL8?t=346) [going to create here a new note and this](https://youtu.be/Tr1rzThssL8?t=350) [is going to be my daily note page](https://youtu.be/Tr1rzThssL8?t=352) [template I actually so this is just](https://youtu.be/Tr1rzThssL8?t=356) [going to be a small thing I don't like](https://youtu.be/Tr1rzThssL8?t=360) [the uh readable line length I like when](https://youtu.be/Tr1rzThssL8?t=364) [the page is the full length otherwise](https://youtu.be/Tr1rzThssL8?t=367) [I'm just going to leave all of this like](https://youtu.be/Tr1rzThssL8?t=370) [this and here in templator I'm going to](https://youtu.be/Tr1rzThssL8?t=373) [set my templates folder and I'm going to](https://youtu.be/Tr1rzThssL8?t=378) [enable trigger templator on new file](https://youtu.be/Tr1rzThssL8?t=382) [creation so I need this because when](https://youtu.be/Tr1rzThssL8?t=386) [new daily not is created I want](https://youtu.be/Tr1rzThssL8?t=389) [templator to be triggered and in the](https://youtu.be/Tr1rzThssL8?t=393) [daily](https://youtu.be/Tr1rzThssL8?t=397) [notes core plugin I'm going to set up my](https://youtu.be/Tr1rzThssL8?t=398) [template file location to be a templator](https://youtu.be/Tr1rzThssL8?t=404) [daily notes template and I can also](https://youtu.be/Tr1rzThssL8?t=408) [create a folder here so this is good and](https://youtu.be/Tr1rzThssL8?t=411) [I'm going to create a separate folder](https://youtu.be/Tr1rzThssL8?t=414) [for my daily notes so it's neatly stored](https://youtu.be/Tr1rzThssL8?t=417) [in a folder so I'm going to come here](https://youtu.be/Tr1rzThssL8?t=422) [and I'm going to set this up to be daily](https://youtu.be/Tr1rzThssL8?t=424) [notes and I think for the time being we](https://youtu.be/Tr1rzThssL8?t=429) [are happy with all of](https://youtu.be/Tr1rzThssL8?t=433) [this](https://youtu.be/Tr1rzThssL8?t=435) [so now let's get started with some of](https://youtu.be/Tr1rzThssL8?t=437) [the basics the first thing I want to do](https://youtu.be/Tr1rzThssL8?t=440) [is I want to open exol Draw and I want](https://youtu.be/Tr1rzThssL8?t=443) [to install the exol AI](https://youtu.be/Tr1rzThssL8?t=447) [script because we are going to be](https://youtu.be/Tr1rzThssL8?t=451) [stealing some code from uh exol AI so](https://youtu.be/Tr1rzThssL8?t=455) [now that's installed that's great and I](https://youtu.be/Tr1rzThssL8?t=460) [think the first thing we need to do is](https://youtu.be/Tr1rzThssL8?t=464) [we need to go to this](https://youtu.be/Tr1rzThssL8?t=466) [website and find out how to access the](https://youtu.be/Tr1rzThssL8?t=468) [API for this](https://youtu.be/Tr1rzThssL8?t=473) [website I know this has an API so that](https://youtu.be/Tr1rzThssL8?t=475) [was part of of the reason I thought](https://youtu.be/Tr1rzThssL8?t=478) [let's do this video because I read about](https://youtu.be/Tr1rzThssL8?t=480) [or I found this site and accidentally](https://youtu.be/Tr1rzThssL8?t=484) [found out the API but let me show you](https://youtu.be/Tr1rzThssL8?t=486) [how I would look for it so you can see](https://youtu.be/Tr1rzThssL8?t=488) [here the so quotes API I search for this](https://youtu.be/Tr1rzThssL8?t=491) [and here I clicked on the first result](https://youtu.be/Tr1rzThssL8?t=496) [and within here I scroll down and I was](https://youtu.be/Tr1rzThssL8?t=500) [happy to find this right here https](https://youtu.be/Tr1rzThssL8?t=502) [story quotes.com](https://youtu.be/Tr1rzThssL8?t=507) [API SL quote so let's try what happens](https://youtu.be/Tr1rzThssL8?t=509) [when I type this in here and voila I'm](https://youtu.be/Tr1rzThssL8?t=513) [super happy because I get this string](https://youtu.be/Tr1rzThssL8?t=517) [back uh which is actually a](https://youtu.be/Tr1rzThssL8?t=520) [Json with a text and an author so I'm](https://youtu.be/Tr1rzThssL8?t=525) [very happy with the what the API](https://youtu.be/Tr1rzThssL8?t=529) [presents me with so the first experiment](https://youtu.be/Tr1rzThssL8?t=532) [we're going to be doing](https://youtu.be/Tr1rzThssL8?t=538) [and so let's just get started we're](https://youtu.be/Tr1rzThssL8?t=539) [going to build this small step at a time](https://youtu.be/Tr1rzThssL8?t=541) [and the way I build anything is always](https://youtu.be/Tr1rzThssL8?t=545) [with the developer console on the side](https://youtu.be/Tr1rzThssL8?t=549) [so here I have my developer console and](https://youtu.be/Tr1rzThssL8?t=552) [obsidian has a request command so if I](https://youtu.be/Tr1rzThssL8?t=557) [type in request and you can see it's](https://youtu.be/Tr1rzThssL8?t=562) [right here this issues a uh an](https://youtu.be/Tr1rzThssL8?t=565) [a get request where I can get data from](https://youtu.be/Tr1rzThssL8?t=570) [the internet I need to evate this so I'm](https://youtu.be/Tr1rzThssL8?t=573) [just going to write this result equals](https://youtu.be/Tr1rzThssL8?t=576) [evate so evate means that this is an](https://youtu.be/Tr1rzThssL8?t=580) [asynchronous function and I need to wait](https://youtu.be/Tr1rzThssL8?t=583) [until the result is received and the way](https://youtu.be/Tr1rzThssL8?t=586) [it works is all I need to do is I need](https://youtu.be/Tr1rzThssL8?t=590) [to provide the URL like](https://youtu.be/Tr1rzThssL8?t=592) [this](https://youtu.be/Tr1rzThssL8?t=595) [and it can take other parameters as well](https://youtu.be/Tr1rzThssL8?t=598) [but for the time being this is enough](https://youtu.be/Tr1rzThssL8?t=601) [you can you can read about this um if](https://youtu.be/Tr1rzThssL8?t=603) [you Google it but for the time being](https://youtu.be/Tr1rzThssL8?t=608) [this is all I want now I can see that](https://youtu.be/Tr1rzThssL8?t=611) [this is the result and the result is a](https://youtu.be/Tr1rzThssL8?t=614) [string so probably what I'm going to do](https://youtu.be/Tr1rzThssL8?t=616) [next is I'm going to take my result](https://youtu.be/Tr1rzThssL8?t=620) [string and create a result Json so I'm](https://youtu.be/Tr1rzThssL8?t=624) [going to use the J on OB object and I'm](https://youtu.be/Tr1rzThssL8?t=627) [going to parse the string I](https://youtu.be/Tr1rzThssL8?t=631) [received um typically by the way results](https://youtu.be/Tr1rzThssL8?t=635) [are I mean they can be different so you](https://youtu.be/Tr1rzThssL8?t=638) [need to take at look at what the result](https://youtu.be/Tr1rzThssL8?t=641) [from the given API is often the result](https://youtu.be/Tr1rzThssL8?t=644) [is an actual Json in this case I got](https://youtu.be/Tr1rzThssL8?t=648) [this Json string but no worries because](https://youtu.be/Tr1rzThssL8?t=651) [with Json porse I was able to](https://youtu.be/Tr1rzThssL8?t=655) [process this into a Json and I have an](https://youtu.be/Tr1rzThssL8?t=659) [author and a text so let's first create](https://youtu.be/Tr1rzThssL8?t=662) [a super simple uh automation here what](https://youtu.be/Tr1rzThssL8?t=666) [I'm going to do is I'm going to create](https://youtu.be/Tr1rzThssL8?t=670) [this templator script like](https://youtu.be/Tr1rzThssL8?t=673) [this um so you need to place the script](https://youtu.be/Tr1rzThssL8?t=677) [uh uh or the code in this uh in these](https://youtu.be/Tr1rzThssL8?t=681) [brackets and let's get started](https://youtu.be/Tr1rzThssL8?t=685) [so what I want to do is first of all I](https://youtu.be/Tr1rzThssL8?t=689) [want to run this script like this so I'm](https://youtu.be/Tr1rzThssL8?t=693) [just going to I'm going to call this](https://youtu.be/Tr1rzThssL8?t=697) [quote](https://youtu.be/Tr1rzThssL8?t=700) [string and this can be a](https://youtu.be/Tr1rzThssL8?t=702) [constant I can make this slightly](https://youtu.be/Tr1rzThssL8?t=705) [smaller so the first step is to get our](https://youtu.be/Tr1rzThssL8?t=708) [quote string the second step is to get](https://youtu.be/Tr1rzThssL8?t=712) [our quote uh Json which is going to be](https://youtu.be/Tr1rzThssL8?t=717) [Json](https://youtu.be/Tr1rzThssL8?t=721) [parse quote string and then what I want](https://youtu.be/Tr1rzThssL8?t=723) [to do is I want](https://youtu.be/Tr1rzThssL8?t=728) [to um first of all create my exol](https://youtu.be/Tr1rzThssL8?t=730) [automate object so this is going to be](https://youtu.be/Tr1rzThssL8?t=734) [the so this can also be a constant EA](https://youtu.be/Tr1rzThssL8?t=737) [equals excal](https://youtu.be/Tr1rzThssL8?t=741) [dra](https://youtu.be/Tr1rzThssL8?t=744) [automate like that](https://youtu.be/Tr1rzThssL8?t=746) [so we can test it right here so if I](https://youtu.be/Tr1rzThssL8?t=750) [type here EA equals exol dra automate](https://youtu.be/Tr1rzThssL8?t=752) [then I get an excal automate object now](https://youtu.be/Tr1rzThssL8?t=756) [when I use excolo automate like this I](https://youtu.be/Tr1rzThssL8?t=760) [need to um type EA reset because this is](https://youtu.be/Tr1rzThssL8?t=764) [um this object is used across the board](https://youtu.be/Tr1rzThssL8?t=770) [uh and you might have half finished](https://youtu.be/Tr1rzThssL8?t=775) [process is in here so I want to clean up](https://youtu.be/Tr1rzThssL8?t=778) [excal automate and then what I want to](https://youtu.be/Tr1rzThssL8?t=781) [do is I want to create a rectangle for](https://youtu.be/Tr1rzThssL8?t=785) [myself with this text in there so um](https://youtu.be/Tr1rzThssL8?t=790) [actually I have a piece of text I'm](https://youtu.be/Tr1rzThssL8?t=793) [going to copy this here because I](https://youtu.be/Tr1rzThssL8?t=797) [already have this ready but let me just](https://youtu.be/Tr1rzThssL8?t=799) [bring this over here and then explain to](https://youtu.be/Tr1rzThssL8?t=804) [you what I'm doing so first of all I'm](https://youtu.be/Tr1rzThssL8?t=807) [also going to EA](https://youtu.be/Tr1rzThssL8?t=810) [style background color should be](https://youtu.be/Tr1rzThssL8?t=814) [transparent so I'm setting the style of](https://youtu.be/Tr1rzThssL8?t=819) [the next excital elements background to](https://youtu.be/Tr1rzThssL8?t=822) [transparent by default the text color is](https://youtu.be/Tr1rzThssL8?t=826) [black I'm generating a an ID for the](https://youtu.be/Tr1rzThssL8?t=829) [text element and then I'm](https://youtu.be/Tr1rzThssL8?t=833) [adding uh this new text element and](https://youtu.be/Tr1rzThssL8?t=836) [here I still need to do one thing I need](https://youtu.be/Tr1rzThssL8?t=841) [to from the quote I need to get the name](https://youtu.be/Tr1rzThssL8?t=844) [of get the text and the author so here](https://youtu.be/Tr1rzThssL8?t=848) [what I'm going to do is I'm going to](https://youtu.be/Tr1rzThssL8?t=851) [text and](https://youtu.be/Tr1rzThssL8?t=855) [author um take this from the quote Json](https://youtu.be/Tr1rzThssL8?t=857) [so this is what's happening let me show](https://youtu.be/Tr1rzThssL8?t=861) [you here](https://youtu.be/Tr1rzThssL8?t=863) [let text author](https://youtu.be/Tr1rzThssL8?t=865) [equals result](https://youtu.be/Tr1rzThssL8?t=869) [Json and now of course text has the text](https://youtu.be/Tr1rzThssL8?t=872) [and author has the](https://youtu.be/Tr1rzThssL8?t=876) [author so I'm getting this from quote](https://youtu.be/Tr1rzThssL8?t=879) [Json I'm setting the background color](https://youtu.be/Tr1rzThssL8?t=883) [I'm generating a text element ID I do](https://youtu.be/Tr1rzThssL8?t=887) [this](https://youtu.be/Tr1rzThssL8?t=891) [so I actually don't even need to do this](https://youtu.be/Tr1rzThssL8?t=892) [anyway um um](https://youtu.be/Tr1rzThssL8?t=896) [I I don't need to do that so I only need](https://youtu.be/Tr1rzThssL8?t=900) [to](https://youtu.be/Tr1rzThssL8?t=902) [create a new](https://youtu.be/Tr1rzThssL8?t=903) [rectangle and I'm going to add text in a](https://youtu.be/Tr1rzThssL8?t=906) [way that I'm adding this](https://youtu.be/Tr1rzThssL8?t=910) [to now](https://youtu.be/Tr1rzThssL8?t=913) [let's I mean we can add it for now to Z](https://youtu.be/Tr1rzThssL8?t=915) [0 and it's actually not quote but it's](https://youtu.be/Tr1rzThssL8?t=918) [text and it's](https://youtu.be/Tr1rzThssL8?t=922) [author um I'm going to link the video](https://youtu.be/Tr1rzThssL8?t=925) [that I'm using here so I have this video](https://youtu.be/Tr1rzThssL8?t=928) [about the daily mind daily quote mind](https://youtu.be/Tr1rzThssL8?t=932) [mapping and I'm using that script here](https://youtu.be/Tr1rzThssL8?t=936) [on the side to copy this part of the](https://youtu.be/Tr1rzThssL8?t=940) [code over so that's what I have here on](https://youtu.be/Tr1rzThssL8?t=942) [the side but I think that's for now not](https://youtu.be/Tr1rzThssL8?t=946) [so uh](https://youtu.be/Tr1rzThssL8?t=950) [critical and uh let's just see so maybe](https://youtu.be/Tr1rzThssL8?t=952) [let's format it like like](https://youtu.be/Tr1rzThssL8?t=957) [this and I can pass so so let me just](https://youtu.be/Tr1rzThssL8?t=960) [show you how I know all of this if I](https://youtu.be/Tr1rzThssL8?t=964) [type in EA add text then you see all of](https://youtu.be/Tr1rzThssL8?t=968) [this help text here by the way I can](https://youtu.be/Tr1rzThssL8?t=972) [type here EA help and I can type here](https://youtu.be/Tr1rzThssL8?t=976) [add text like this and press enter and](https://youtu.be/Tr1rzThssL8?t=980) [then I have the help printed on the side](https://youtu.be/Tr1rzThssL8?t=984) [and I can use that and you can see that](https://youtu.be/Tr1rzThssL8?t=987) [here I can pass a formatting object and](https://youtu.be/Tr1rzThssL8?t=990) [these are the elements of formatting I](https://youtu.be/Tr1rzThssL8?t=994) [want to wrap this at](https://youtu.be/Tr1rzThssL8?t=997) [probably this can be a little wider](https://youtu.be/Tr1rzThssL8?t=1002) [because I'm going to have a 1,24 by](https://youtu.be/Tr1rzThssL8?t=1004) [1024 sized image here but anyway so I](https://youtu.be/Tr1rzThssL8?t=1008) [want this to have a default padding of](https://youtu.be/Tr1rzThssL8?t=1012) [10 and and I think with this we are](https://youtu.be/Tr1rzThssL8?t=1017) [actually good and then what I need to do](https://youtu.be/Tr1rzThssL8?t=1022) [is I need to get](https://youtu.be/Tr1rzThssL8?t=1025) [my rectangle element so I'm going to get](https://youtu.be/Tr1rzThssL8?t=1028) [EA](https://youtu.be/Tr1rzThssL8?t=1032) [get element and I'm going to pass in the](https://youtu.be/Tr1rzThssL8?t=1034) [rectangle ID and I what I want to do is](https://youtu.be/Tr1rzThssL8?t=1038) [I want to set the rectangle](https://youtu.be/Tr1rzThssL8?t=1042) [element uh stroke](https://youtu.be/Tr1rzThssL8?t=1046) [color to be](https://youtu.be/Tr1rzThssL8?t=1050) [transparent so what I'm doing here is](https://youtu.be/Tr1rzThssL8?t=1053) [I'm simply](https://youtu.be/Tr1rzThssL8?t=1057) [creating a text element that's placed in](https://youtu.be/Tr1rzThssL8?t=1058) [a rectangle so sort of a sticky note but](https://youtu.be/Tr1rzThssL8?t=1062) [you know if I create a sticky note like](https://youtu.be/Tr1rzThssL8?t=1065) [this then it has a border color and I](https://youtu.be/Tr1rzThssL8?t=1068) [want to get rid of the B border color](https://youtu.be/Tr1rzThssL8?t=1071) [but keep the text uh with the color](https://youtu.be/Tr1rzThssL8?t=1074) [that's why](https://youtu.be/Tr1rzThssL8?t=1077) [what I'm doing here is I'm after I if I](https://youtu.be/Tr1rzThssL8?t=1079) [create and it's explained here so if box](https://youtu.be/Tr1rzThssL8?t=1083) [is not n then text uh will be box the](https://youtu.be/Tr1rzThssL8?t=1087) [function Returns the ID of the text](https://youtu.be/Tr1rzThssL8?t=1091) [element if the text element is boxed I](https://youtu.be/Tr1rzThssL8?t=1094) [it is a sticky node then the ID of the](https://youtu.be/Tr1rzThssL8?t=1097) [container object is returned so that's](https://youtu.be/Tr1rzThssL8?t=1100) [why I'm using this to get the rectangle](https://youtu.be/Tr1rzThssL8?t=1102) [and then I can set the this](https://youtu.be/Tr1rzThssL8?t=1106) [uh to transparent and then all I need to](https://youtu.be/Tr1rzThssL8?t=1108) [do is I need to create the](https://youtu.be/Tr1rzThssL8?t=1112) [um the exol draw](https://youtu.be/Tr1rzThssL8?t=1117) [uh file from this and I want to open](https://youtu.be/Tr1rzThssL8?t=1121) [this on the side so what I'm going to do](https://youtu.be/Tr1rzThssL8?t=1125) [is](https://youtu.be/Tr1rzThssL8?t=1128) [EA](https://youtu.be/Tr1rzThssL8?t=1129) [create uh and let's just put the help](https://youtu.be/Tr1rzThssL8?t=1131) [here so this is going to be e e a help](https://youtu.be/Tr1rzThssL8?t=1135) [EA create like that so I can read all](https://youtu.be/Tr1rzThssL8?t=1139) [the help I need so we're going to start](https://youtu.be/Tr1rzThssL8?t=1143) [off with my parameters the first](https://youtu.be/Tr1rzThssL8?t=1148) [parameter I'm going to give is the file](https://youtu.be/Tr1rzThssL8?t=1152) [name so this is going to be file name](https://youtu.be/Tr1rzThssL8?t=1156) [I'm actually going to uh copy this from](https://youtu.be/Tr1rzThssL8?t=1159) [here so me just paste it in here](https://youtu.be/Tr1rzThssL8?t=1163) [like](https://youtu.be/Tr1rzThssL8?t=1169) [this and format it](https://youtu.be/Tr1rzThssL8?t=1169) [because and we we need to do a couple of](https://youtu.be/Tr1rzThssL8?t=1173) [things here still but um let me explain](https://youtu.be/Tr1rzThssL8?t=1176) [to you what's happening here so I'm](https://youtu.be/Tr1rzThssL8?t=1179) [calling EA create I'm taking the and](https://youtu.be/Tr1rzThssL8?t=1182) [it's actually text and not quote I'm](https://youtu.be/Tr1rzThssL8?t=1187) [taking the text element and I'm doing](https://youtu.be/Tr1rzThssL8?t=1190) [this regular expression](https://youtu.be/Tr1rzThssL8?t=1192) [replace um to take all the characters](https://youtu.be/Tr1rzThssL8?t=1195) [that are not allowed in a file name out](https://youtu.be/Tr1rzThssL8?t=1198) [of the text and then I'm taking the](https://youtu.be/Tr1rzThssL8?t=1201) [first 25 characters of this text and](https://youtu.be/Tr1rzThssL8?t=1204) [adding dot dot dot so in a way what I'm](https://youtu.be/Tr1rzThssL8?t=1208) [doing is I'm](https://youtu.be/Tr1rzThssL8?t=1211) [titling](https://youtu.be/Tr1rzThssL8?t=1213) [my my](https://youtu.be/Tr1rzThssL8?t=1215) [drawing with the beginning of the quote](https://youtu.be/Tr1rzThssL8?t=1217) [so in the example that we looked at so](https://youtu.be/Tr1rzThssL8?t=1221) [in this example this would be the](https://youtu.be/Tr1rzThssL8?t=1224) [greatest obstacle dot dot dot or](https://youtu.be/Tr1rzThssL8?t=1227) [something like that so it's the file](https://youtu.be/Tr1rzThssL8?t=1230) [name is going to be um a nice](https://youtu.be/Tr1rzThssL8?t=1232) [descriptive file](https://youtu.be/Tr1rzThssL8?t=1236) [name so that's what I'm doing here and](https://youtu.be/Tr1rzThssL8?t=1238) [then I have the folder here so what we](https://youtu.be/Tr1rzThssL8?t=1243) [are going to do is I'm going to place](https://youtu.be/Tr1rzThssL8?t=1245) [this in the](https://youtu.be/Tr1rzThssL8?t=1248) [TP file](https://youtu.be/Tr1rzThssL8?t=1249) [folder and this should](https://youtu.be/Tr1rzThssL8?t=1253) [be uh](https://youtu.be/Tr1rzThssL8?t=1256) [I think now I wonder if the I think this](https://youtu.be/Tr1rzThssL8?t=1259) [should be false so this shouldn't be](https://youtu.be/Tr1rzThssL8?t=1263) [relative but this should be an absolute](https://youtu.be/Tr1rzThssL8?t=1265) [folder in](https://youtu.be/Tr1rzThssL8?t=1267) [the uh in the](https://youtu.be/Tr1rzThssL8?t=1270) [vault and I'm not sure if we need a](https://youtu.be/Tr1rzThssL8?t=1272) [template](https://youtu.be/Tr1rzThssL8?t=1276) [path so I'm I'm going to leave this](https://youtu.be/Tr1rzThssL8?t=1277) [empty actually I'm going to leave this](https://youtu.be/Tr1rzThssL8?t=1283) [undefined](https://youtu.be/Tr1rzThssL8?t=1287) [we'll see what happens I want to open](https://youtu.be/Tr1rzThssL8?t=1288) [this in a oh this is this is actually an](https://youtu.be/Tr1rzThssL8?t=1291) [object so I don't need to write](https://youtu.be/Tr1rzThssL8?t=1295) [undefined I'm going to open this in a](https://youtu.be/Tr1rzThssL8?t=1297) [new Pane](https://youtu.be/Tr1rzThssL8?t=1299) [and I'm going to uh add a plain text](https://youtu.be/Tr1rzThssL8?t=1302) [content so the plain text is if I switch](https://youtu.be/Tr1rzThssL8?t=1306) [this over to markdown View mode so open](https://youtu.be/Tr1rzThssL8?t=1310) [as ex colar draw the plain text that I'm](https://youtu.be/Tr1rzThssL8?t=1314) [adding in will come above text elements](https://youtu.be/Tr1rzThssL8?t=1317) [here so I can add some meta data there](https://youtu.be/Tr1rzThssL8?t=1321) [and the metadata I'm going to add is the](https://youtu.be/Tr1rzThssL8?t=1324) [author and Then followed by the text and](https://youtu.be/Tr1rzThssL8?t=1328) [followed by a block reference](https://youtu.be/Tr1rzThssL8?t=1331) [um um to the quote so this is the text](https://youtu.be/Tr1rzThssL8?t=1336) [I'm adding right](https://youtu.be/Tr1rzThssL8?t=1340) [there and I think we're good let's see](https://youtu.be/Tr1rzThssL8?t=1343) [what happens when I create a new daily](https://youtu.be/Tr1rzThssL8?t=1346) [note so let's press daily note and I get](https://youtu.be/Tr1rzThssL8?t=1349) [an error so that's](https://youtu.be/Tr1rzThssL8?t=1353) [already okay so that's not very helpful](https://youtu.be/Tr1rzThssL8?t=1355) [let's come back here exol dra automate](https://youtu.be/Tr1rzThssL8?t=1358) [is X call it raw](https://youtu.be/Tr1rzThssL8?t=1362) [automate okay probably I need to write](https://youtu.be/Tr1rzThssL8?t=1367) [then window. exol draw automate let's](https://youtu.be/Tr1rzThssL8?t=1370) [try again so I'm going to do but now I](https://youtu.be/Tr1rzThssL8?t=1375) [have my daily note so I first need to](https://youtu.be/Tr1rzThssL8?t=1379) [delete this daily note and now let's](https://youtu.be/Tr1rzThssL8?t=1381) [again uh create today's daily note and](https://youtu.be/Tr1rzThssL8?t=1386) [again I get the error escalator automate](https://youtu.be/Tr1rzThssL8?t=1391) [so did I misspell that let's just copy](https://youtu.be/Tr1rzThssL8?t=1394) [paste it from here and let's](https://youtu.be/Tr1rzThssL8?t=1398) [see](https://youtu.be/Tr1rzThssL8?t=1401) [oh because I corrected it in the wrong](https://youtu.be/Tr1rzThssL8?t=1403) [place because this was the temp template](https://youtu.be/Tr1rzThssL8?t=1406) [file that I deleted but I need to](https://youtu.be/Tr1rzThssL8?t=1408) [correct it here](https://youtu.be/Tr1rzThssL8?t=1411) [so and I misspelled it so you can see](https://youtu.be/Tr1rzThssL8?t=1413) [now that I pasted it I had a spelling](https://youtu.be/Tr1rzThssL8?t=1416) [issue with exol automate so now again](https://youtu.be/Tr1rzThssL8?t=1419) [let's](https://youtu.be/Tr1rzThssL8?t=1422) [run I again have](https://youtu.be/Tr1rzThssL8?t=1424) [but text ID is not defined why oh](https://youtu.be/Tr1rzThssL8?t=1427) [because I decided I don't need a text ID](https://youtu.be/Tr1rzThssL8?t=1432) [great then let's just delete and again](https://youtu.be/Tr1rzThssL8?t=1435) [wrong file so I need to you see I know](https://youtu.be/Tr1rzThssL8?t=1440) [it's a wrong file because the file name](https://youtu.be/Tr1rzThssL8?t=1443) [is today's date because this is the](https://youtu.be/Tr1rzThssL8?t=1445) [daily note template that was created but](https://youtu.be/Tr1rzThssL8?t=1448) [I need to or or the daily note that was](https://youtu.be/Tr1rzThssL8?t=1450) [created but I need to always edit my](https://youtu.be/Tr1rzThssL8?t=1453) [daily note template so let's remove the](https://youtu.be/Tr1rzThssL8?t=1456) [text ID from](https://youtu.be/Tr1rzThssL8?t=1459) [here like this and again let's](https://youtu.be/Tr1rzThssL8?t=1460) [run yay so](https://youtu.be/Tr1rzThssL8?t=1465) [we already have a nicely working](https://youtu.be/Tr1rzThssL8?t=1468) [solution so here I've created this image](https://youtu.be/Tr1rzThssL8?t=1470) [now I want to insert it into my daily](https://youtu.be/Tr1rzThssL8?t=1476) [note so that's still missing from here](https://youtu.be/Tr1rzThssL8?t=1479) [but that's actually a super simple uh](https://youtu.be/Tr1rzThssL8?t=1482) [step so let's delete](https://youtu.be/Tr1rzThssL8?t=1486) [this and let's delete our daily](https://youtu.be/Tr1rzThssL8?t=1488) [note like that I'm going to close this](https://youtu.be/Tr1rzThssL8?t=1491) [tab so we need to end our script with TR](https://youtu.be/Tr1rzThssL8?t=1495) [plus](https://youtu.be/Tr1rzThssL8?t=1500) [equal and I want to add this that I want](https://youtu.be/Tr1rzThssL8?t=1501) [to](https://youtu.be/Tr1rzThssL8?t=1506) [transclude](https://youtu.be/Tr1rzThssL8?t=1507) [the file](https://youtu.be/Tr1rzThssL8?t=1509) [path um like](https://youtu.be/Tr1rzThssL8?t=1512) [this so what I'm doing here is you can](https://youtu.be/Tr1rzThssL8?t=1515) [see uh EA create Returns the file path](https://youtu.be/Tr1rzThssL8?t=1518) [and I want to add it so tr+ in](https://youtu.be/Tr1rzThssL8?t=1523) [templator if you add a value to this](https://youtu.be/Tr1rzThssL8?t=1529) [that is going to be then](https://youtu.be/Tr1rzThssL8?t=1531) [printed on the page so probably I want](https://youtu.be/Tr1rzThssL8?t=1534) [to add a new line character at the end](https://youtu.be/Tr1rzThssL8?t=1538) [let's test](https://youtu.be/Tr1rzThssL8?t=1542) [again yay it's all perfect so we have](https://youtu.be/Tr1rzThssL8?t=1544) [our quote here now all I need to do is](https://youtu.be/Tr1rzThssL8?t=1548) [place the generated image on top so](https://youtu.be/Tr1rzThssL8?t=1551) [again let's delete this](https://youtu.be/Tr1rzThssL8?t=1556) [like that let's delete this as well like](https://youtu.be/Tr1rzThssL8?t=1558) [this let's close this and so for that we](https://youtu.be/Tr1rzThssL8?t=1562) [are now going to cheat or actually not](https://youtu.be/Tr1rzThssL8?t=1566) [cheat but be clever about it I'm going](https://youtu.be/Tr1rzThssL8?t=1569) [to open my script for exol](https://youtu.be/Tr1rzThssL8?t=1573) [AI and this is a pretty long script I](https://youtu.be/Tr1rzThssL8?t=1576) [also need to reacquaint myself with it](https://youtu.be/Tr1rzThssL8?t=1580) [but of course I have a huge advantage](https://youtu.be/Tr1rzThssL8?t=1583) [here because I wrote the script so this](https://youtu.be/Tr1rzThssL8?t=1587) [is more or less familiar to me but um](https://youtu.be/Tr1rzThssL8?t=1589) [let's just do this I'm going to do one](https://youtu.be/Tr1rzThssL8?t=1595) [thing that I'm going to cut from the](https://youtu.be/Tr1rzThssL8?t=1597) [video I'm going to add to excal draw](https://youtu.be/Tr1rzThssL8?t=1599) [settings my API key my open AI API key](https://youtu.be/Tr1rzThssL8?t=1604) [so I can test it so that's something](https://youtu.be/Tr1rzThssL8?t=1609) [that you need to understand about using](https://youtu.be/Tr1rzThssL8?t=1611) [exol AI that that you need an open AI](https://youtu.be/Tr1rzThssL8?t=1615) [API key and there are a couple of things](https://youtu.be/Tr1rzThssL8?t=1619) [that you need to set up with that key so](https://youtu.be/Tr1rzThssL8?t=1622) [you need to put $5 on that uh API key](https://youtu.be/Tr1rzThssL8?t=1624) [for it to access Dolly as well as you](https://youtu.be/Tr1rzThssL8?t=1629) [need to wait about 10 15 minutes after](https://youtu.be/Tr1rzThssL8?t=1634) [you add the $5 and then it will work and](https://youtu.be/Tr1rzThssL8?t=1637) [one image generation based on my](https://youtu.be/Tr1rzThssL8?t=1641) [experiment but we can actually take a](https://youtu.be/Tr1rzThssL8?t=1644) [look at this so let's go to](https://youtu.be/Tr1rzThssL8?t=1646) [open.com let's log in um and let's](https://youtu.be/Tr1rzThssL8?t=1650) [continue like this and let's open the](https://youtu.be/Tr1rzThssL8?t=1657) [API and here I want to click on](https://youtu.be/Tr1rzThssL8?t=1661) [usage and you will see that today we](https://youtu.be/Tr1rzThssL8?t=1665) [generated two](https://youtu.be/Tr1rzThssL8?t=1668) [images and that cost uh8 cents in total](https://youtu.be/Tr1rzThssL8?t=1670) [so this means that](https://youtu.be/Tr1rzThssL8?t=1675) [um in in total a daily note is going to](https://youtu.be/Tr1rzThssL8?t=1678) [cost about 4 cents which is a bit over a](https://youtu.be/Tr1rzThssL8?t=1682) [dollar per month for this uh convenience](https://youtu.be/Tr1rzThssL8?t=1685) [which I think is not bad but um so I'm](https://youtu.be/Tr1rzThssL8?t=1689) [going to Now set up my uh API key so let](https://youtu.be/Tr1rzThssL8?t=1693) [me just take this off screen here and do](https://youtu.be/Tr1rzThssL8?t=1698) [that I'm going to cut and for now I'm](https://youtu.be/Tr1rzThssL8?t=1703) [going to close this on the side and](https://youtu.be/Tr1rzThssL8?t=1706) [rather bring exol AI to the side and](https://youtu.be/Tr1rzThssL8?t=1709) [have the other part of my script here so](https://youtu.be/Tr1rzThssL8?t=1712) [what we're going to do is we're going](https://youtu.be/Tr1rzThssL8?t=1717) [to add our new part of code right here](https://youtu.be/Tr1rzThssL8?t=1721) [and I'm going to hardcode it how](https://youtu.be/Tr1rzThssL8?t=1726) [hardcode it but of course later on you](https://youtu.be/Tr1rzThssL8?t=1729) [can um clean this up yourself but so](https://youtu.be/Tr1rzThssL8?t=1732) [the way this works is I have](https://youtu.be/Tr1rzThssL8?t=1738) [instructions and I](https://youtu.be/Tr1rzThssL8?t=1745) [think return the single message with the](https://youtu.be/Tr1rzThssL8?t=1751) [gener in a code block that's what we](https://youtu.be/Tr1rzThssL8?t=1754) [need so I have an instruction and I'm](https://youtu.be/Tr1rzThssL8?t=1756) [going to just create these that I'm](https://youtu.be/Tr1rzThssL8?t=1760) [going to um yeah for now call constant](https://youtu.be/Tr1rzThssL8?t=1763) [instruction](https://youtu.be/Tr1rzThssL8?t=1769) [equals and we're going to](https://youtu.be/Tr1rzThssL8?t=1771) [oops um I'm going to place this to the](https://youtu.be/Tr1rzThssL8?t=1774) [beginning of the code so if you want to](https://youtu.be/Tr1rzThssL8?t=1778) [modify the instructions there's lots of](https://youtu.be/Tr1rzThssL8?t=1781) [ideas I have here as well so we can we](https://youtu.be/Tr1rzThssL8?t=1784) [can iterate this later on but for now](https://youtu.be/Tr1rzThssL8?t=1787) [I'm going to create my instruction then](https://youtu.be/Tr1rzThssL8?t=1790) [let's look at the system prompts and in](https://youtu.be/Tr1rzThssL8?t=1793) [systems system prompts I want to choose](https://youtu.be/Tr1rzThssL8?t=1796) [illustrate this quote so this is going](https://youtu.be/Tr1rzThssL8?t=1801) [to be](https://youtu.be/Tr1rzThssL8?t=1804) [my system prompt like](https://youtu.be/Tr1rzThssL8?t=1807) [this and it is the Gen image type](https://youtu.be/Tr1rzThssL8?t=1811) [right yes it's the image generation so](https://youtu.be/Tr1rzThssL8?t=1819) [this is going to be my constant for](https://youtu.be/Tr1rzThssL8?t=1823) [system prompt](https://youtu.be/Tr1rzThssL8?t=1826) [equals](https://youtu.be/Tr1rzThssL8?t=1831) [okay](https://youtu.be/Tr1rzThssL8?t=1833) [system prompt](https://youtu.be/Tr1rzThssL8?t=1835) [equals uh this is going to be my prompt](https://youtu.be/Tr1rzThssL8?t=1838) [so you can you can read it this is going](https://youtu.be/Tr1rzThssL8?t=1841) [to be the instruction I sent a Chad GPT](https://youtu.be/Tr1rzThssL8?t=1844) [your task involves transforming a user](https://youtu.be/Tr1rzThssL8?t=1847) [provided code into a detailed image](https://youtu.be/Tr1rzThssL8?t=1849) [imaginative illustration craft a visual](https://youtu.be/Tr1rzThssL8?t=1853) [representation that captures the s sense](https://youtu.be/Tr1rzThssL8?t=1855) [of the code and resonates well with a](https://youtu.be/Tr1rzThssL8?t=1857) [broad audience if the author's name is](https://youtu.be/Tr1rzThssL8?t=1860) [provided aim to establish a connection](https://youtu.be/Tr1rzThssL8?t=1863) [between the illustration and the author](https://youtu.be/Tr1rzThssL8?t=1865) [maybe we can take this off because now](https://youtu.be/Tr1rzThssL8?t=1867) [all of these authors are going to be um](https://youtu.be/Tr1rzThssL8?t=1870) [from the ancient time so I I think maybe](https://youtu.be/Tr1rzThssL8?t=1874) [it's better if we take that off this can](https://youtu.be/Tr1rzThssL8?t=1877) [be the situation and](https://youtu.be/Tr1rzThssL8?t=1881) [then](https://youtu.be/Tr1rzThssL8?t=1886) [so I think additionally provide](https://youtu.be/Tr1rzThssL8?t=1888) [preference for siling such as chosen](https://youtu.be/Tr1rzThssL8?t=1890) [artistic to guide the image ensure that](https://youtu.be/Tr1rzThssL8?t=1893) [the resting text threee your](https://youtu.be/Tr1rzThssL8?t=1896) [task output should comprise a](https://youtu.be/Tr1rzThssL8?t=1900) [descriptive and detailed narrative aimed](https://youtu.be/Tr1rzThssL8?t=1903) [at facilitating the creation of a](https://youtu.be/Tr1rzThssL8?t=1907) [captivating illustration for the quote](https://youtu.be/Tr1rzThssL8?t=1909) [so that's our system prompt and now](https://youtu.be/Tr1rzThssL8?t=1912) [let's move on here we have all sorts of](https://youtu.be/Tr1rzThssL8?t=1916) [um so this is how I get my open AI key](https://youtu.be/Tr1rzThssL8?t=1920) [and I have my error handling here as](https://youtu.be/Tr1rzThssL8?t=1924) [well so I'm just going to add](https://youtu.be/Tr1rzThssL8?t=1928) [this I'm not going to well I'm I can](https://youtu.be/Tr1rzThssL8?t=1932) [actually return so that's good so if the](https://youtu.be/Tr1rzThssL8?t=1935) [API key is not set which I already said](https://youtu.be/Tr1rzThssL8?t=1940) [then I will I will get this message](https://youtu.be/Tr1rzThssL8?t=1942) [that's great](https://youtu.be/Tr1rzThssL8?t=1946) [and let's just set image sizes so if](https://youtu.be/Tr1rzThssL8?t=1949) [you're going](https://youtu.be/Tr1rzThssL8?t=1954) [to we're going to go for this um this](https://youtu.be/Tr1rzThssL8?t=1956) [image size so I'm just going to bring](https://youtu.be/Tr1rzThssL8?t=1961) [that over here image size equals so this](https://youtu.be/Tr1rzThssL8?t=1964) [is um if you come to the open AI](https://youtu.be/Tr1rzThssL8?t=1970) [API and we come here](https://youtu.be/Tr1rzThssL8?t=1974) [to](https://youtu.be/Tr1rzThssL8?t=1977) [um yeah here's here's how to use it and](https://youtu.be/Tr1rzThssL8?t=1980) [then it talks about this that doly](https://youtu.be/Tr1rzThssL8?t=1983) [images can have sizes](https://youtu.be/Tr1rzThssL8?t=1985) [of uh 1,24 by 1024 and then these other](https://youtu.be/Tr1rzThssL8?t=1988) [sizes but that's all I'm going to use if](https://youtu.be/Tr1rzThssL8?t=1992) [you want uh here's image generation so](https://youtu.be/Tr1rzThssL8?t=1995) [under capabilities image generation](https://youtu.be/Tr1rzThssL8?t=1998) [usage this is where you see some help](https://youtu.be/Tr1rzThssL8?t=2000) [about the prompting but in this case we](https://youtu.be/Tr1rzThssL8?t=2003) [are going to be using](https://youtu.be/Tr1rzThssL8?t=2005) [my existing exol AI](https://youtu.be/Tr1rzThssL8?t=2007) [script um and this is lots of stuff we](https://youtu.be/Tr1rzThssL8?t=2011) [don't need at this time](https://youtu.be/Tr1rzThssL8?t=2015) [um but I want to get down here to](https://youtu.be/Tr1rzThssL8?t=2019) [run I have a a function here run great](https://youtu.be/Tr1rzThssL8?t=2023) [and so let's just type system prompt](https://youtu.be/Tr1rzThssL8?t=2029) [with the same font size so I can easily](https://youtu.be/Tr1rzThssL8?t=2032) [uh copy paste stuff and this is going to](https://youtu.be/Tr1rzThssL8?t=2036) [be an not an image edit request but this](https://youtu.be/Tr1rzThssL8?t=2041) [is going to be](https://youtu.be/Tr1rzThssL8?t=2045) [an uh image generation](https://youtu.be/Tr1rzThssL8?t=2046) [request so this is what I](https://youtu.be/Tr1rzThssL8?t=2051) [need let's come here and let's do this](https://youtu.be/Tr1rzThssL8?t=2055) [so I'm going](https://youtu.be/Tr1rzThssL8?t=2059) [to create a request object so excal](https://youtu.be/Tr1rzThssL8?t=2061) [through automate](https://youtu.be/Tr1rzThssL8?t=2066) [has a function you can see here Post](https://youtu.be/Tr1rzThssL8?t=2067) [open AI that requires a request object](https://youtu.be/Tr1rzThssL8?t=2070) [if you want to find out about the](https://youtu.be/Tr1rzThssL8?t=2074) [request object of course EA help EA Post](https://youtu.be/Tr1rzThssL8?t=2076) [open a Ai and you get this description](https://youtu.be/Tr1rzThssL8?t=2082) [help that you can use I'm not going to](https://youtu.be/Tr1rzThssL8?t=2086) [use it now because I'm going to be um](https://youtu.be/Tr1rzThssL8?t=2089) [stealing stuff from here so](https://youtu.be/Tr1rzThssL8?t=2092) [um let's just see so this is going to be](https://youtu.be/Tr1rzThssL8?t=2097) [our system prompt and this is going to](https://youtu.be/Tr1rzThssL8?t=2101) [be our instruction and I need to copy](https://youtu.be/Tr1rzThssL8?t=2104) [this over](https://youtu.be/Tr1rzThssL8?t=2110) [here so our request object we don't have](https://youtu.be/Tr1rzThssL8?t=2112) [an image data URL because I'm not](https://youtu.be/Tr1rzThssL8?t=2115) [submitting an image](https://youtu.be/Tr1rzThssL8?t=2117) [and I actually have a](https://youtu.be/Tr1rzThssL8?t=2120) [text so I'm is going to be submitting](https://youtu.be/Tr1rzThssL8?t=2125) [the text like this because](https://youtu.be/Tr1rzThssL8?t=2128) [here um](https://youtu.be/Tr1rzThssL8?t=2131) [here I'm deconstructing the text so I](https://youtu.be/Tr1rzThssL8?t=2134) [have my text I actually probably want to](https://youtu.be/Tr1rzThssL8?t=2137) [do this that I want the text to](https://youtu.be/Tr1rzThssL8?t=2142) [be to include the author name as well so](https://youtu.be/Tr1rzThssL8?t=2149) [what I'm going to write here is this](https://youtu.be/Tr1rzThssL8?t=2152) [should be the text](https://youtu.be/Tr1rzThssL8?t=2155) [and then in a new line I want to uh](https://youtu.be/Tr1rzThssL8?t=2158) [include the](https://youtu.be/Tr1rzThssL8?t=2162) [author like](https://youtu.be/Tr1rzThssL8?t=2166) [this so this is going to be the text](https://youtu.be/Tr1rzThssL8?t=2168) [that I'm](https://youtu.be/Tr1rzThssL8?t=2171) [submitting this is my system system](https://youtu.be/Tr1rzThssL8?t=2172) [prompt here system prompt instruction](https://youtu.be/Tr1rzThssL8?t=2176) [I'm just checking spelling because](https://youtu.be/Tr1rzThssL8?t=2180) [that's usually what trips me](https://youtu.be/Tr1rzThssL8?t=2183) [up so so this is](https://youtu.be/Tr1rzThssL8?t=2185) [great maybe I'm going to move the image](https://youtu.be/Tr1rzThssL8?t=2188) [size up here because that's really a](https://youtu.be/Tr1rzThssL8?t=2191) [setting that you might decide to have a](https://youtu.be/Tr1rzThssL8?t=2194) [different image size so I'm just putting](https://youtu.be/Tr1rzThssL8?t=2197) [it up there so this and and let's just](https://youtu.be/Tr1rzThssL8?t=2199) [add some comments here as well so um get](https://youtu.be/Tr1rzThssL8?t=2204) [quote from sto](https://youtu.be/Tr1rzThssL8?t=2210) [quotes like this and effectively we](https://youtu.be/Tr1rzThssL8?t=2214) [might even want to say that um I mean we](https://youtu.be/Tr1rzThssL8?t=2218) [should really do if not text uh we could](https://youtu.be/Tr1rzThssL8?t=2223) [even raise an error message but for now](https://youtu.be/Tr1rzThssL8?t=2228) [I'm just going to return so if there's](https://youtu.be/Tr1rzThssL8?t=2231) [some hiccup here but of course already](https://youtu.be/Tr1rzThssL8?t=2234) [pars Json is likely going to throw an](https://youtu.be/Tr1rzThssL8?t=2238) [error for me so anyway we won't get here](https://youtu.be/Tr1rzThssL8?t=2240) [and I'm actually going going to](https://youtu.be/Tr1rzThssL8?t=2245) [move this uh down to here and I'm going](https://youtu.be/Tr1rzThssL8?t=2248) [to add another comment here and I'm](https://youtu.be/Tr1rzThssL8?t=2252) [going to write um](https://youtu.be/Tr1rzThssL8?t=2255) [generate](https://youtu.be/Tr1rzThssL8?t=2259) [image like that and then here I'm going](https://youtu.be/Tr1rzThssL8?t=2261) [to write generate X call it draw](https://youtu.be/Tr1rzThssL8?t=2265) [drawing like this all right so let's](https://youtu.be/Tr1rzThssL8?t=2270) [continue so I have my request object](https://youtu.be/Tr1rzThssL8?t=2273) [now let's get our result](https://youtu.be/Tr1rzThssL8?t=2277) [back so this is going to be the result](https://youtu.be/Tr1rzThssL8?t=2282) [that I get from open AI](https://youtu.be/Tr1rzThssL8?t=2286) [um we don't really need this console log](https://youtu.be/Tr1rzThssL8?t=2289) [but this could be helpful to print out](https://youtu.be/Tr1rzThssL8?t=2293) [what I got back from open Ai and if the](https://youtu.be/Tr1rzThssL8?t=2295) [open AI result had the Json uh](https://youtu.be/Tr1rzThssL8?t=2298) [parameter this I don't need because this](https://youtu.be/Tr1rzThssL8?t=2303) [is the spinner waiting for the spinner](https://youtu.be/Tr1rzThssL8?t=2305) [to finish I don't need that this is not](https://youtu.be/Tr1rzThssL8?t=2308) [an image edit](https://youtu.be/Tr1rzThssL8?t=2311) [request so here this is an error](https://youtu.be/Tr1rzThssL8?t=2313) [handling that if in the](https://youtu.be/Tr1rzThssL8?t=2317) [end uh the](https://youtu.be/Tr1rzThssL8?t=2320) [returned because I'm pressing tab](https://youtu.be/Tr1rzThssL8?t=2324) [anyway](https://youtu.be/Tr1rzThssL8?t=2328) [if if if the res resulting Json does not](https://youtu.be/Tr1rzThssL8?t=2335) [have a choices property then it means](https://youtu.be/Tr1rzThssL8?t=2340) [something went wrong so then I'm going](https://youtu.be/Tr1rzThssL8?t=2343) [to create a new](https://youtu.be/Tr1rzThssL8?t=2345) [notice this is an obsidian function and](https://youtu.be/Tr1rzThssL8?t=2349) [I'm just going to um print out the error](https://youtu.be/Tr1rzThssL8?t=2352) [message like this and I'm going to abort](https://youtu.be/Tr1rzThssL8?t=2356) [meaning I'm going to return like that so](https://youtu.be/Tr1rzThssL8?t=2360) [this](https://youtu.be/Tr1rzThssL8?t=2364) [is copi it](https://youtu.be/Tr1rzThssL8?t=2365) [over and here I'm going to extract the](https://youtu.be/Tr1rzThssL8?t=2367) [code block so there's an exol automate](https://youtu.be/Tr1rzThssL8?t=2372) [function again you can use help to find](https://youtu.be/Tr1rzThssL8?t=2374) [this uh find out about this but what](https://youtu.be/Tr1rzThssL8?t=2377) [this does is this will look for the code](https://youtu.be/Tr1rzThssL8?t=2380) [Block in the resulting um in the result](https://youtu.be/Tr1rzThssL8?t=2384) [set and return it so that's why here in](https://youtu.be/Tr1rzThssL8?t=2389) [the](https://youtu.be/Tr1rzThssL8?t=2392) [instruction uh I instruct the CH gbt to](https://youtu.be/Tr1rzThssL8?t=2393) [return the result in a code block a code](https://youtu.be/Tr1rzThssL8?t=2398) [block is these uh so this is a Cod block](https://youtu.be/Tr1rzThssL8?t=2400) [right here this is how it would look so](https://youtu.be/Tr1rzThssL8?t=2405) [um I'm using that extract the code block](https://youtu.be/Tr1rzThssL8?t=2410) [and data that's great and](https://youtu.be/Tr1rzThssL8?t=2413) [then if I don't have a Content then I](https://youtu.be/Tr1rzThssL8?t=2417) [need](https://youtu.be/Tr1rzThssL8?t=2420) [to so these are the two things because](https://youtu.be/Tr1rzThssL8?t=2421) [this is going to be an image generation](https://youtu.be/Tr1rzThssL8?t=2424) [request so we will need to look at the](https://youtu.be/Tr1rzThssL8?t=2426) [code but again if there's no](https://youtu.be/Tr1rzThssL8?t=2428) [content](https://youtu.be/Tr1rzThssL8?t=2432) [then then we are going to just return at](https://youtu.be/Tr1rzThssL8?t=2433) [this point so if there's no content then](https://youtu.be/Tr1rzThssL8?t=2437) [I'm going to return like this so I'm](https://youtu.be/Tr1rzThssL8?t=2441) [going to leave off that part and](https://youtu.be/Tr1rzThssL8?t=2444) [now I'm sending the](https://youtu.be/Tr1rzThssL8?t=2448) [content and the uh bounding box but](https://youtu.be/Tr1rzThssL8?t=2450) [that's not really necess necessary for](https://youtu.be/Tr1rzThssL8?t=2455) [us I'm I have this generate image](https://youtu.be/Tr1rzThssL8?t=2456) [function up here so let's come here and](https://youtu.be/Tr1rzThssL8?t=2459) [find generate image and you know what](https://youtu.be/Tr1rzThssL8?t=2465) [I'm going to just simply](https://youtu.be/Tr1rzThssL8?t=2468) [copy the whole function over so I'm](https://youtu.be/Tr1rzThssL8?t=2471) [stealing this from excal](https://youtu.be/Tr1rzThssL8?t=2475) [Ai and I'm going](https://youtu.be/Tr1rzThssL8?t=2477) [to](https://youtu.be/Tr1rzThssL8?t=2481) [um place it right here like](https://youtu.be/Tr1rzThssL8?t=2483) [this and let's just tab this in so I'm](https://youtu.be/Tr1rzThssL8?t=2487) [selecting](https://youtu.be/Tr1rzThssL8?t=2492) [this and tab it in great and now here](https://youtu.be/Tr1rzThssL8?t=2496) [I'm not going to send in the spinner ID](https://youtu.be/Tr1rzThssL8?t=2500) [and the bounding box so I'm I have the](https://youtu.be/Tr1rzThssL8?t=2504) [image size variable already but not](https://youtu.be/Tr1rzThssL8?t=2509) [correctly spelled so image size with a](https://youtu.be/Tr1rzThssL8?t=2512) [capital](https://youtu.be/Tr1rzThssL8?t=2515) [s so](https://youtu.be/Tr1rzThssL8?t=2517) [um let's just see so generate image I'm](https://youtu.be/Tr1rzThssL8?t=2523) [creating a new request object which is](https://youtu.be/Tr1rzThssL8?t=2527) [going to have image generation](https://youtu.be/Tr1rzThssL8?t=2529) [properties um I'm not sending in the](https://youtu.be/Tr1rzThssL8?t=2533) [quality data because dolly3 does not](https://youtu.be/Tr1rzThssL8?t=2537) [support it I'm again submitting to open](https://youtu.be/Tr1rzThssL8?t=2539) [AI](https://youtu.be/Tr1rzThssL8?t=2545) [this new request object and I'm going to](https://youtu.be/Tr1rzThssL8?t=2547) [wait for the](https://youtu.be/Tr1rzThssL8?t=2551) [result and here if I get a result then](https://youtu.be/Tr1rzThssL8?t=2553) [I'm going to and this is what we are not](https://youtu.be/Tr1rzThssL8?t=2558) [going to be](https://youtu.be/Tr1rzThssL8?t=2561) [doing um I'm going to be](https://youtu.be/Tr1rzThssL8?t=2562) [returning the image uh so this is just](https://youtu.be/Tr1rzThssL8?t=2569) [simply going to return the](https://youtu.be/Tr1rzThssL8?t=2573) [the the Json data um URL like](https://youtu.be/Tr1rzThssL8?t=2580) [this](https://youtu.be/Tr1rzThssL8?t=2587) [and I'm don't need the revised](https://youtu.be/Tr1rzThssL8?t=2590) [prompt I don't want to type it under](https://youtu.be/Tr1rzThssL8?t=2594) [there so I just want the image](https://youtu.be/Tr1rzThssL8?t=2596) [URL I think that's actually and I don't](https://youtu.be/Tr1rzThssL8?t=2602) [want to add the image here](https://youtu.be/Tr1rzThssL8?t=2605) [I'll](https://youtu.be/Tr1rzThssL8?t=2607) [um I'm going to do that in a second add](https://youtu.be/Tr1rzThssL8?t=2609) [to](https://youtu.be/Tr1rzThssL8?t=2613) [group uh do I have a create add image so](https://youtu.be/Tr1rzThssL8?t=2614) [maybe this is but this is pretty](https://youtu.be/Tr1rzThssL8?t=2618) [straightforward so I'm I'm going to](https://youtu.be/Tr1rzThssL8?t=2621) [delete uh most of this](https://youtu.be/Tr1rzThssL8?t=2623) [function](https://youtu.be/Tr1rzThssL8?t=2625) [so and now I'm going to uh write](https://youtu.be/Tr1rzThssL8?t=2628) [here image you URL equals](https://youtu.be/Tr1rzThssL8?t=2634) [await generate](https://youtu.be/Tr1rzThssL8?t=2640) [image and I'm going to pass the](https://youtu.be/Tr1rzThssL8?t=2643) [content like](https://youtu.be/Tr1rzThssL8?t=2648) [this okay so what we are doing here is I](https://youtu.be/Tr1rzThssL8?t=2652) [I copied this function over from excal](https://youtu.be/Tr1rzThssL8?t=2656) [AI I trimmed it for my](https://youtu.be/Tr1rzThssL8?t=2658) [purposes all this does is it sends the](https://youtu.be/Tr1rzThssL8?t=2662) [content which is the output of the first](https://youtu.be/Tr1rzThssL8?t=2667) [call](https://youtu.be/Tr1rzThssL8?t=2670) [to Chad GPT and content includes](https://youtu.be/Tr1rzThssL8?t=2671) [the image prompt it will send that image](https://youtu.be/Tr1rzThssL8?t=2676) [prompt to](https://youtu.be/Tr1rzThssL8?t=2680) [Dolly and this function is going to](https://youtu.be/Tr1rzThssL8?t=2681) [return an image](https://youtu.be/Tr1rzThssL8?t=2684) [URL and I can actually close this here](https://youtu.be/Tr1rzThssL8?t=2687) [and now all we need to do is we need to](https://youtu.be/Tr1rzThssL8?t=2691) [place this image](https://youtu.be/Tr1rzThssL8?t=2694) [URL I now have my image URL here](https://youtu.be/Tr1rzThssL8?t=2697) [generate image content that's great and](https://youtu.be/Tr1rzThssL8?t=2702) [so here what I want to do is I actually](https://youtu.be/Tr1rzThssL8?t=2705) [want to start by](https://youtu.be/Tr1rzThssL8?t=2710) [adding EA add](https://youtu.be/Tr1rzThssL8?t=2712) [image and I'm going](https://youtu.be/Tr1rzThssL8?t=2716) [to image file scale number I think this](https://youtu.be/Tr1rzThssL8?t=2723) [description is not up to date because](https://youtu.be/Tr1rzThssL8?t=2728) [actually it can](https://youtu.be/Tr1rzThssL8?t=2732) [be uh](https://youtu.be/Tr1rzThssL8?t=2735) [also a URL to the image which I need to](https://youtu.be/Tr1rzThssL8?t=2738) [update this description because that's](https://youtu.be/Tr1rzThssL8?t=2742) [what we saw in xol AI so maybe let's](https://youtu.be/Tr1rzThssL8?t=2745) [again open uh exol AI script on the SES](https://youtu.be/Tr1rzThssL8?t=2750) [so we can take a look](https://youtu.be/Tr1rzThssL8?t=2755) [so so here's the add image and I'm](https://youtu.be/Tr1rzThssL8?t=2760) [adding the URL there not the file so](https://youtu.be/Tr1rzThssL8?t=2764) [that's what we're going to do so I'm](https://youtu.be/Tr1rzThssL8?t=2767) [going to add the image to](https://youtu.be/Tr1rzThssL8?t=2769) [z0 and image URL now of course if](https://youtu.be/Tr1rzThssL8?t=2772) [something goes wrong I want to catch it](https://youtu.be/Tr1rzThssL8?t=2778) [here so I'm going](https://youtu.be/Tr1rzThssL8?t=2780) [to um write here](https://youtu.be/Tr1rzThssL8?t=2783) [if not image URL so if it's just an](https://youtu.be/Tr1rzThssL8?t=2786) [undefined return then I'm going to](https://youtu.be/Tr1rzThssL8?t=2791) [return now without any error messages](https://youtu.be/Tr1rzThssL8?t=2794) [but hopefully that's not going to](https://youtu.be/Tr1rzThssL8?t=2797) [happen and so here's my image](https://youtu.be/Tr1rzThssL8?t=2800) [URL and what I need to do is I need to](https://youtu.be/Tr1rzThssL8?t=2805) [place the text](https://youtu.be/Tr1rzThssL8?t=2808) [element not to 0 0 but I actually want](https://youtu.be/Tr1rzThssL8?t=2810) [to place the text element](https://youtu.be/Tr1rzThssL8?t=2815) [to um](https://youtu.be/Tr1rzThssL8?t=2818) [maybe the top of the text element so](https://youtu.be/Tr1rzThssL8?t=2822) [this is uh let's just](https://youtu.be/Tr1rzThssL8?t=2825) [see EA add rectangle XY so I want to](https://youtu.be/Tr1rzThssL8?t=2827) [place this](https://youtu.be/Tr1rzThssL8?t=2833) [to and now I don't know if it's I think](https://youtu.be/Tr1rzThssL8?t=2835) [it's I want to place this to Min -](https://youtu.be/Tr1rzThssL8?t=2839) [1,100 we'll see if this is the right](https://youtu.be/Tr1rzThssL8?t=2842) [place but the image is 1,24 high so I](https://youtu.be/Tr1rzThssL8?t=2845) [think this should be roughly under the](https://youtu.be/Tr1rzThssL8?t=2849) [image I](https://youtu.be/Tr1rzThssL8?t=2853) [think I think they're ready to test it](https://youtu.be/Tr1rzThssL8?t=2855) [out so let's see what happens if I press](https://youtu.be/Tr1rzThssL8?t=2858) [my daily](https://youtu.be/Tr1rzThssL8?t=2860) [note keep fingers crossed I I have a](https://youtu.be/Tr1rzThssL8?t=2861) [feeling it's not going to work but you](https://youtu.be/Tr1rzThssL8?t=2866) [never know we might get](https://youtu.be/Tr1rzThssL8?t=2869) [lucky we didn't get lucky but let's see](https://youtu.be/Tr1rzThssL8?t=2873) [the error so there's](https://youtu.be/Tr1rzThssL8?t=2876) [a an error that cannot access EA before](https://youtu.be/Tr1rzThssL8?t=2879) [Definition h so where am I accessing](https://youtu.be/Tr1rzThssL8?t=2884) [EA oh because this is how I'm getting to](https://youtu.be/Tr1rzThssL8?t=2888) [EA but this is where I'm defining EA](https://youtu.be/Tr1rzThssL8?t=2892) [down here so I that's that's an easy](https://youtu.be/Tr1rzThssL8?t=2895) [error I like these type of Errors](https://youtu.be/Tr1rzThssL8?t=2899) [because this is easy to correct I was](https://youtu.be/Tr1rzThssL8?t=2901) [afraid that there's something more](https://youtu.be/Tr1rzThssL8?t=2903) [complicated oh the only more complicated](https://youtu.be/Tr1rzThssL8?t=2906) [is that I'm correcting the error in the](https://youtu.be/Tr1rzThssL8?t=2909) [wrong file](https://youtu.be/Tr1rzThssL8?t=2912) [so I'm going](https://youtu.be/Tr1rzThssL8?t=2914) [to place that here and I'm going to](https://youtu.be/Tr1rzThssL8?t=2916) [delete it from](https://youtu.be/Tr1rzThssL8?t=2920) [here so again keep fingers](https://youtu.be/Tr1rzThssL8?t=2922) [crossed now mind you now I'm not giving](https://youtu.be/Tr1rzThssL8?t=2929) [any](https://youtu.be/Tr1rzThssL8?t=2933) [feedback and you know when we tested](https://youtu.be/Tr1rzThssL8?t=2934) [this process it took about 30 seconds to](https://youtu.be/Tr1rzThssL8?t=2937) [generate so I think that 30 seconds is](https://youtu.be/Tr1rzThssL8?t=2942) [going](https://youtu.be/Tr1rzThssL8?t=2945) [to be required now as well so for the](https://youtu.be/Tr1rzThssL8?t=2946) [time being no response because we didn't](https://youtu.be/Tr1rzThssL8?t=2950) [get an error actually we got in console](https://youtu.be/Tr1rzThssL8?t=2954) [log uh so that there is an issue here](https://youtu.be/Tr1rzThssL8?t=2957) [because there is no image for sure I](https://youtu.be/Tr1rzThssL8?t=2961) [don't see yeah oh I know why we don't](https://youtu.be/Tr1rzThssL8?t=2965) [have an image that's clear but you can](https://youtu.be/Tr1rzThssL8?t=2967) [see here that I actually did](https://youtu.be/Tr1rzThssL8?t=2970) [get a proper result so here's](https://youtu.be/Tr1rzThssL8?t=2974) [the Json the data created create detail](https://youtu.be/Tr1rzThssL8?t=2978) [illustration status so here's the URL](https://youtu.be/Tr1rzThssL8?t=2985) [this is the image that was created so](https://youtu.be/Tr1rzThssL8?t=2989) [let's copy](https://youtu.be/Tr1rzThssL8?t=2992) [the and then we'll correct the issue so](https://youtu.be/Tr1rzThssL8?t=2993) [I know what's what's the problem but](https://youtu.be/Tr1rzThssL8?t=2996) [let's look at the image that was](https://youtu.be/Tr1rzThssL8?t=2998) [generated I'm super curious so this was](https://youtu.be/Tr1rzThssL8?t=3000) [the image that was](https://youtu.be/Tr1rzThssL8?t=3003) [generated and by the way you can see why](https://youtu.be/Tr1rzThssL8?t=3006) [this whole thing is slow because it just](https://youtu.be/Tr1rzThssL8?t=3009) [takes this much time to uh](https://youtu.be/Tr1rzThssL8?t=3011) [download but if I come here when a man](https://youtu.be/Tr1rzThssL8?t=3014) [is proud because he can understand and](https://youtu.be/Tr1rzThssL8?t=3017) [explain the writing of uh](https://youtu.be/Tr1rzThssL8?t=3020) [Christus uh say to yourself is Christus](https://youtu.be/Tr1rzThssL8?t=3023) [had not written obscurely this man would](https://youtu.be/Tr1rzThssL8?t=3027) [have nothing to be proud](https://youtu.be/Tr1rzThssL8?t=3030) [of I like the illustration anyway so the](https://youtu.be/Tr1rzThssL8?t=3034) [problem is](https://youtu.be/Tr1rzThssL8?t=3039) [that let me show you so EA](https://youtu.be/Tr1rzThssL8?t=3042) [help uh EA add](https://youtu.be/Tr1rzThssL8?t=3048) [image and this is going to tell me that](https://youtu.be/Tr1rzThssL8?t=3052) [this is an asynchronous function so I](https://youtu.be/Tr1rzThssL8?t=3055) [need to wait for the image to be](https://youtu.be/Tr1rzThssL8?t=3058) [downloaded before uh I can I can do](https://youtu.be/Tr1rzThssL8?t=3061) [anything with it so let's just](https://youtu.be/Tr1rzThssL8?t=3065) [um let's just do this correction so here](https://youtu.be/Tr1rzThssL8?t=3071) [I need to evate add image and that was](https://youtu.be/Tr1rzThssL8?t=3075) [the issue why that image was not uh](https://youtu.be/Tr1rzThssL8?t=3078) [generated there so I think](https://youtu.be/Tr1rzThssL8?t=3082) [now if I delete this](https://youtu.be/Tr1rzThssL8?t=3086) [file](https://youtu.be/Tr1rzThssL8?t=3088) [and I also want to delete okay we don't](https://youtu.be/Tr1rzThssL8?t=3090) [have I already deleted the daily](https://youtu.be/Tr1rzThssL8?t=3093) [note so now if I generate](https://youtu.be/Tr1rzThssL8?t=3097) [again](https://youtu.be/Tr1rzThssL8?t=3102) [then it's going to take its time in the](https://youtu.be/Tr1rzThssL8?t=3104) [meantime we can look at the result Json](https://youtu.be/Tr1rzThssL8?t=3107) [so that's already here and here we can](https://youtu.be/Tr1rzThssL8?t=3110) [actually read](https://youtu.be/Tr1rzThssL8?t=3113) [the](https://youtu.be/Tr1rzThssL8?t=3116) [um uh under](https://youtu.be/Tr1rzThssL8?t=3121) [choices this is the so you can see and](https://youtu.be/Tr1rzThssL8?t=3124) [there's the image as well now the](https://youtu.be/Tr1rzThssL8?t=3127) [positioning is not good because](https://youtu.be/Tr1rzThssL8?t=3129) [minus okay so there are a couple of](https://youtu.be/Tr1rzThssL8?t=3132) [issues here I should have resized the](https://youtu.be/Tr1rzThssL8?t=3135) [image to be so if I press](https://youtu.be/Tr1rzThssL8?t=3138) [100% then the image would be larger and](https://youtu.be/Tr1rzThssL8?t=3143) [it's not minus but plus and](https://youtu.be/Tr1rzThssL8?t=3147) [actually this um text could be](https://youtu.be/Tr1rzThssL8?t=3150) [larger so maybe if we would change a](https://youtu.be/Tr1rzThssL8?t=3155) [different font](https://youtu.be/Tr1rzThssL8?t=3159) [size and I can even let this to](https://youtu.be/Tr1rzThssL8?t=3161) [be](https://youtu.be/Tr1rzThssL8?t=3166) [wider okay it's not not that bad so we](https://youtu.be/Tr1rzThssL8?t=3168) [need to do couple of uh](https://youtu.be/Tr1rzThssL8?t=3171) [things but you see it's it's it's](https://youtu.be/Tr1rzThssL8?t=3173) [getting there so I get my uh text I get](https://youtu.be/Tr1rzThssL8?t=3176) [my image there and we can work with this](https://youtu.be/Tr1rzThssL8?t=3180) [so let's delete now there's one more](https://youtu.be/Tr1rzThssL8?t=3184) [thing that we need to experiment with](https://youtu.be/Tr1rzThssL8?t=3188) [and maybe let's do that](https://youtu.be/Tr1rzThssL8?t=3191) [so when you use exol AI you get a](https://youtu.be/Tr1rzThssL8?t=3194) [message that this file here is now](https://youtu.be/Tr1rzThssL8?t=3197) [referenced with a URL and that URL](https://youtu.be/Tr1rzThssL8?t=3200) [points to uh the uh open ai's](https://youtu.be/Tr1rzThssL8?t=3203) [website the issue with this is that this](https://youtu.be/Tr1rzThssL8?t=3208) [image is going to be deleted in about 30](https://youtu.be/Tr1rzThssL8?t=3211) [minutes so I need to download this image](https://youtu.be/Tr1rzThssL8?t=3215) [and save it locally so we will need to](https://youtu.be/Tr1rzThssL8?t=3219) [do that and I'm actually uh going](https://youtu.be/Tr1rzThssL8?t=3224) [to uh result equals](https://youtu.be/Tr1rzThssL8?t=3229) [request](https://youtu.be/Tr1rzThssL8?t=3234) [aate aate](https://youtu.be/Tr1rzThssL8?t=3237) [request and here I'm going to type in my](https://youtu.be/Tr1rzThssL8?t=3241) [URL and my URL is going to be this open](https://youtu.be/Tr1rzThssL8?t=3244) [AI uh](https://youtu.be/Tr1rzThssL8?t=3249) [image let's see what happens if I](https://youtu.be/Tr1rzThssL8?t=3252) [execute this what sort of result am I](https://youtu.be/Tr1rzThssL8?t=3255) [going to get so I'm using great so this](https://youtu.be/Tr1rzThssL8?t=3259) [is this is awesome because I got a](https://youtu.be/Tr1rzThssL8?t=3263) [binary PNG back I'm super happy with](https://youtu.be/Tr1rzThssL8?t=3266) [this because I can take this and I](https://youtu.be/Tr1rzThssL8?t=3269) [can uh use uh app](https://youtu.be/Tr1rzThssL8?t=3273) [VA create B create](https://youtu.be/Tr1rzThssL8?t=3278) [binary and I'm going to give this a file](https://youtu.be/Tr1rzThssL8?t=3282) [name and the file name is going to](https://youtu.be/Tr1rzThssL8?t=3285) [be test PNG and I'm just going to add](https://youtu.be/Tr1rzThssL8?t=3288) [result result like this I](https://youtu.be/Tr1rzThssL8?t=3293) [think yay and I think the file was](https://youtu.be/Tr1rzThssL8?t=3297) [created so let's just see I have a test](https://youtu.be/Tr1rzThssL8?t=3300) [PNG but the image is not a good image so](https://youtu.be/Tr1rzThssL8?t=3303) [let's let's look at](https://youtu.be/Tr1rzThssL8?t=3308) [result](https://youtu.be/Tr1rzThssL8?t=3313) [and why isn't this](https://youtu.be/Tr1rzThssL8?t=3321) [working](https://youtu.be/Tr1rzThssL8?t=3324) [so let's look for some](https://youtu.be/Tr1rzThssL8?t=3329) [help so let's come here and let's](https://youtu.be/Tr1rzThssL8?t=3332) [say obsidian MD](https://youtu.be/Tr1rzThssL8?t=3335) [[Music]](https://youtu.be/Tr1rzThssL8?t=3338) [API create](https://youtu.be/Tr1rzThssL8?t=3347) [binary ah path data and I need an aray](https://youtu.be/Tr1rzThssL8?t=3350) [buffer I think it is likely an aray](https://youtu.be/Tr1rzThssL8?t=3357) [buffer let's let's see but no this is](https://youtu.be/Tr1rzThssL8?t=3360) [not so so let's let's do this](https://youtu.be/Tr1rzThssL8?t=3364) [um let's ask our friend Chad](https://youtu.be/Tr1rzThssL8?t=3374) [GPT so let's come here and let's](https://youtu.be/Tr1rzThssL8?t=3377) [open Chad GPT and my question](https://youtu.be/Tr1rzThssL8?t=3382) [is uh](https://youtu.be/Tr1rzThssL8?t=3389) [convert a fatch](https://youtu.be/Tr1rzThssL8?t=3391) [response](https://youtu.be/Tr1rzThssL8?t=3397) [[Music]](https://youtu.be/Tr1rzThssL8?t=3398) [that](https://youtu.be/Tr1rzThssL8?t=3399) [that that looks like this into an array](https://youtu.be/Tr1rzThssL8?t=3402) [buffer let's see what happens](https://youtu.be/Tr1rzThssL8?t=3412) [certainly respon aray buffer](https://youtu.be/Tr1rzThssL8?t=3416) [console so what am I doing fetch your](https://youtu.be/Tr1rzThssL8?t=3430) [image response response throw error](https://youtu.be/Tr1rzThssL8?t=3433) [then okay so but this is done](https://youtu.be/Tr1rzThssL8?t=3438) [in okay so let's look at this](https://youtu.be/Tr1rzThssL8?t=3441) [request](https://youtu.be/Tr1rzThssL8?t=3451) [so this is the request interface is it](https://youtu.be/Tr1rzThssL8?t=3453) [post URL string](https://youtu.be/Tr1rzThssL8?t=3457) [yes so maybe I need but no I I get the](https://youtu.be/Tr1rzThssL8?t=3463) [data so that's](https://youtu.be/Tr1rzThssL8?t=3467) [good so this is is a g URL](https://youtu.be/Tr1rzThssL8?t=3473) [string let's continue](https://youtu.be/Tr1rzThssL8?t=3484) [on this returns a promise](https://youtu.be/Tr1rzThssL8?t=3491) [string okay](https://youtu.be/Tr1rzThssL8?t=3495) [so I](https://youtu.be/Tr1rzThssL8?t=3499) [receive the ER a buffer as an](https://youtu.be/Tr1rzThssL8?t=3502) [encoded string](https://youtu.be/Tr1rzThssL8?t=3508) [[Music]](https://youtu.be/Tr1rzThssL8?t=3510) [how how do I convert the string back to](https://youtu.be/Tr1rzThssL8?t=3513) [an array](https://youtu.be/Tr1rzThssL8?t=3518) [buffer](https://youtu.be/Tr1rzThssL8?t=3524) [So This Is How We Do](https://youtu.be/Tr1rzThssL8?t=3527) [It Let's copy](https://youtu.be/Tr1rzThssL8?t=3530) [this](https://youtu.be/Tr1rzThssL8?t=3533) [and the other response](https://youtu.be/Tr1rzThssL8?t=3536) [was so let's come over](https://youtu.be/Tr1rzThssL8?t=3546) [here so it says](https://youtu.be/Tr1rzThssL8?t=3551) [that I delete the constant because](https://youtu.be/Tr1rzThssL8?t=3555) [that's then I can only use the the](https://youtu.be/Tr1rzThssL8?t=3558) [string one so and this is going to be my](https://youtu.be/Tr1rzThssL8?t=3560) [result](https://youtu.be/Tr1rzThssL8?t=3563) [so what the heck is going on](https://youtu.be/Tr1rzThssL8?t=3585) [here what if I use fetch](https://youtu.be/Tr1rzThssL8?t=3591) [so what if I simply use](https://youtu.be/Tr1rzThssL8?t=3598) [fetch](https://youtu.be/Tr1rzThssL8?t=3601) [so result equals](https://youtu.be/Tr1rzThssL8?t=3602) [evate](https://youtu.be/Tr1rzThssL8?t=3606) [fetch yeah that's the issue that I get a](https://youtu.be/Tr1rzThssL8?t=3612) [cross origin error so I need to use the](https://youtu.be/Tr1rzThssL8?t=3616) [response but then or the request but](https://youtu.be/Tr1rzThssL8?t=3619) [then](https://youtu.be/Tr1rzThssL8?t=3623) [so this](https://youtu.be/Tr1rzThssL8?t=3635) [is and what does the help tell](https://youtu.be/Tr1rzThssL8?t=3640) [us back to here](https://youtu.be/Tr1rzThssL8?t=3644) [so similar to Fresh](https://youtu.be/Tr1rzThssL8?t=3647) [Rec](https://youtu.be/Tr1rzThssL8?t=3653) [text value of the](https://youtu.be/Tr1rzThssL8?t=3655) [response that's the issue that it](https://youtu.be/Tr1rzThssL8?t=3657) [Returns the text value of the oh but](https://youtu.be/Tr1rzThssL8?t=3660) [there's a request](https://youtu.be/Tr1rzThssL8?t=3663) [URL um we need the request URL I think](https://youtu.be/Tr1rzThssL8?t=3665) [that's that's the issue so let's try it](https://youtu.be/Tr1rzThssL8?t=3669) [like](https://youtu.be/Tr1rzThssL8?t=3672) [this so let's see what happens if we](https://youtu.be/Tr1rzThssL8?t=3674) [type this request URL and I'm just going](https://youtu.be/Tr1rzThssL8?t=3677) [to pass in the](https://youtu.be/Tr1rzThssL8?t=3681) [URL what happen happens with](https://youtu.be/Tr1rzThssL8?t=3683) [this yay this is what we wanted and](https://youtu.be/Tr1rzThssL8?t=3685) [there's the area buffer so](https://youtu.be/Tr1rzThssL8?t=3688) [now I can write this](https://youtu.be/Tr1rzThssL8?t=3691) [that app W create](https://youtu.be/Tr1rzThssL8?t=3694) [binary like this and I'm going to write](https://youtu.be/Tr1rzThssL8?t=3698) [test PNG](https://youtu.be/Tr1rzThssL8?t=3702) [result array](https://youtu.be/Tr1rzThssL8?t=3704) [buffer I think that's all we](https://youtu.be/Tr1rzThssL8?t=3707) [need file already exists so we'll delete](https://youtu.be/Tr1rzThssL8?t=3710) [the file](https://youtu.be/Tr1rzThssL8?t=3713) [and now again we create it](https://youtu.be/Tr1rzThssL8?t=3716) [and bang we have the file perfect so I](https://youtu.be/Tr1rzThssL8?t=3719) [think we are now on our way to success](https://youtu.be/Tr1rzThssL8?t=3724) [so what we're going to do](https://youtu.be/Tr1rzThssL8?t=3727) [here is when I get the image](https://youtu.be/Tr1rzThssL8?t=3730) [URL I'm going to](https://youtu.be/Tr1rzThssL8?t=3735) [first fetch the image like this so this](https://youtu.be/Tr1rzThssL8?t=3738) [is going to be](https://youtu.be/Tr1rzThssL8?t=3742) [here](https://youtu.be/Tr1rzThssL8?t=3745) [um area](https://youtu.be/Tr1rzThssL8?t=3747) [buffer image area](https://youtu.be/Tr1rzThssL8?t=3750) [buffer](https://youtu.be/Tr1rzThssL8?t=3753) [equals evate request](https://youtu.be/Tr1rzThssL8?t=3755) [URL image](https://youtu.be/Tr1rzThssL8?t=3760) [URL and then I think if not image array](https://youtu.be/Tr1rzThssL8?t=3763) [buffer or image array](https://youtu.be/Tr1rzThssL8?t=3770) [buffer dot status doesn't equal 200 so](https://youtu.be/Tr1rzThssL8?t=3777) [200 means it was](https://youtu.be/Tr1rzThssL8?t=3782) [successful then we have a problem](https://youtu.be/Tr1rzThssL8?t=3785) [otherwise I'm going to](https://youtu.be/Tr1rzThssL8?t=3790) [create my file I'm going we can ditch](https://youtu.be/Tr1rzThssL8?t=3792) [this whole copy from](https://youtu.be/Tr1rzThssL8?t=3796) [excal Project like](https://youtu.be/Tr1rzThssL8?t=3799) [that so I'm going to](https://youtu.be/Tr1rzThssL8?t=3802) [use this as my file name so I'm going to](https://youtu.be/Tr1rzThssL8?t=3805) [bring](https://youtu.be/Tr1rzThssL8?t=3809) [this um I'm going to just create a](https://youtu.be/Tr1rzThssL8?t=3810) [variable called uh file name like that](https://youtu.be/Tr1rzThssL8?t=3814) [and what I'm going to do is up](https://youtu.be/Tr1rzThssL8?t=3818) [here I'm going to create my file name so](https://youtu.be/Tr1rzThssL8?t=3824) [const file name](https://youtu.be/Tr1rzThssL8?t=3829) [equals this](https://youtu.be/Tr1rzThssL8?t=3832) [and the](https://youtu.be/Tr1rzThssL8?t=3835) [folder I'm also going to uh take the](https://youtu.be/Tr1rzThssL8?t=3837) [folder](https://youtu.be/Tr1rzThssL8?t=3841) [[Music]](https://youtu.be/Tr1rzThssL8?t=3842) [name folder name like that going to come](https://youtu.be/Tr1rzThssL8?t=3845) [up here and right here const folder name](https://youtu.be/Tr1rzThssL8?t=3849) [equals like](https://youtu.be/Tr1rzThssL8?t=3856) [that so I have my folder](https://youtu.be/Tr1rzThssL8?t=3863) [name](https://youtu.be/Tr1rzThssL8?t=3866) [and what I want to do](https://youtu.be/Tr1rzThssL8?t=3868) [is and we should do some error handling](https://youtu.be/Tr1rzThssL8?t=3873) [but now I'm going to uh well maybe we](https://youtu.be/Tr1rzThssL8?t=3876) [will do that so here I'm going to EA](https://youtu.be/Tr1rzThssL8?t=3881) [unique get new](https://youtu.be/Tr1rzThssL8?t=3886) [unique uh file path so I'm going to](https://youtu.be/Tr1rzThssL8?t=3888) [submit the file name as a string and the](https://youtu.be/Tr1rzThssL8?t=3892) [folder path and I get back and I think I](https://youtu.be/Tr1rzThssL8?t=3894) [need](https://youtu.be/Tr1rzThssL8?t=3897) [to uh so what was it again it's the file](https://youtu.be/Tr1rzThssL8?t=3901) [name and the folder path so file name](https://youtu.be/Tr1rzThssL8?t=3905) [plus](https://youtu.be/Tr1rzThssL8?t=3909) [PNG folder path like](https://youtu.be/Tr1rzThssL8?t=3911) [that those are the variables file name](https://youtu.be/Tr1rzThssL8?t=3915) [folder](https://youtu.be/Tr1rzThssL8?t=3918) [name it's called folder](https://youtu.be/Tr1rzThssL8?t=3919) [name](https://youtu.be/Tr1rzThssL8?t=3923) [so this is](https://youtu.be/Tr1rzThssL8?t=3925) [uh image file path equals so this is an](https://youtu.be/Tr1rzThssL8?t=3927) [excal](https://youtu.be/Tr1rzThssL8?t=3933) [automate utility function that uh](https://youtu.be/Tr1rzThssL8?t=3934) [creates a new file path under a folder I](https://youtu.be/Tr1rzThssL8?t=3939) [think I need to evade this even though](https://youtu.be/Tr1rzThssL8?t=3942) [help doesn't say that um because this](https://youtu.be/Tr1rzThssL8?t=3945) [also checks if the folder is created and](https://youtu.be/Tr1rzThssL8?t=3949) [creates the folder if it's the if the](https://youtu.be/Tr1rzThssL8?t=3951) [folder is not there](https://youtu.be/Tr1rzThssL8?t=3954) [so um image areay buffer image file path](https://youtu.be/Tr1rzThssL8?t=3957) [and then all we need to do is to create](https://youtu.be/Tr1rzThssL8?t=3961) [the image file so app](https://youtu.be/Tr1rzThssL8?t=3964) [VA create](https://youtu.be/Tr1rzThssL8?t=3968) [binary binary and I'm going to use my](https://youtu.be/Tr1rzThssL8?t=3973) [image image file](https://youtu.be/Tr1rzThssL8?t=3979) [path and and my aray](https://youtu.be/Tr1rzThssL8?t=3982) [buffer and I wonder if this actually](https://youtu.be/Tr1rzThssL8?t=3993) [returns a yeah it returns a file object](https://youtu.be/Tr1rzThssL8?t=3998) [so this is going to be](https://youtu.be/Tr1rzThssL8?t=4002) [my image file equals and I need to evade](https://youtu.be/Tr1rzThssL8?t=4004) [this as well because this is an](https://youtu.be/Tr1rzThssL8?t=4009) [asynchronous function so here](https://youtu.be/Tr1rzThssL8?t=4011) [I'm I'm getting the URL from Dolly once](https://youtu.be/Tr1rzThssL8?t=4015) [I have my URL I download that URL so I'm](https://youtu.be/Tr1rzThssL8?t=4022) [just cleaning up some of the empty lines](https://youtu.be/Tr1rzThssL8?t=4026) [because I don't need those um once I](https://youtu.be/Tr1rzThssL8?t=4029) [have my image URL I use request URL to](https://youtu.be/Tr1rzThssL8?t=4033) [grab the image array](https://youtu.be/Tr1rzThssL8?t=4039) [buffer](https://youtu.be/Tr1rzThssL8?t=4042) [uh which is not yet good because this](https://youtu.be/Tr1rzThssL8?t=4045) [is um this is just the image](https://youtu.be/Tr1rzThssL8?t=4047) [result like that and this is](https://youtu.be/Tr1rzThssL8?t=4053) [then image result image result and the](https://youtu.be/Tr1rzThssL8?t=4056) [image array](https://youtu.be/Tr1rzThssL8?t=4060) [buffer is going to be](https://youtu.be/Tr1rzThssL8?t=4062) [the image result Dot and we we use the](https://youtu.be/Tr1rzThssL8?t=4066) [aray buffer Pro property like](https://youtu.be/Tr1rzThssL8?t=4072) [that yes so I get my image result uh if](https://youtu.be/Tr1rzThssL8?t=4077) [and then I get the path I get the image](https://youtu.be/Tr1rzThssL8?t=4083) [file that's great and then here I create](https://youtu.be/Tr1rzThssL8?t=4090) [my image element but here I'm passing](https://youtu.be/Tr1rzThssL8?t=4094) [the image](https://youtu.be/Tr1rzThssL8?t=4097) [file and otherwise I think we are good I](https://youtu.be/Tr1rzThssL8?t=4099) [think we are at the point when we are](https://youtu.be/Tr1rzThssL8?t=4102) [ready keep fingers](https://youtu.be/Tr1rzThssL8?t=4104) [crossed and let's press this and see if](https://youtu.be/Tr1rzThssL8?t=4107) [there's an error in the meantime let's](https://youtu.be/Tr1rzThssL8?t=4111) [just see our code once again this is](https://youtu.be/Tr1rzThssL8?t=4114) [when I typically](https://youtu.be/Tr1rzThssL8?t=4116) [spot um trivial problems that I](https://youtu.be/Tr1rzThssL8?t=4118) [didn't uh correct earlier](https://youtu.be/Tr1rzThssL8?t=4123) [but but](https://youtu.be/Tr1rzThssL8?t=4127) [hopefully wow we are almost good so here](https://youtu.be/Tr1rzThssL8?t=4129) [let's just check so you can see adopt](https://youtu.be/Tr1rzThssL8?t=4134) [new habits yourself BNG and new habits](https://youtu.be/Tr1rzThssL8?t=4138) [exol draw so the file was](https://youtu.be/Tr1rzThssL8?t=4141) [created the only issue is that the](https://youtu.be/Tr1rzThssL8?t=4143) [position of the text element and the](https://youtu.be/Tr1rzThssL8?t=4146) [image is not correct so we are](https://youtu.be/Tr1rzThssL8?t=4149) [actually almost completely in](https://youtu.be/Tr1rzThssL8?t=4152) [business um I'm so excited this is this](https://youtu.be/Tr1rzThssL8?t=4155) [is cool so let's let's look at this](https://youtu.be/Tr1rzThssL8?t=4159) [first of all](https://youtu.be/Tr1rzThssL8?t=4163) [um in terms of text wrapping this can be](https://youtu.be/Tr1rzThssL8?t=4165) [80 characters long that's good and the](https://youtu.be/Tr1rzThssL8?t=4169) [issue is this is created at](https://youtu.be/Tr1rzThssL8?t=4174) [0 maybe maybe actually add image has](https://youtu.be/Tr1rzThssL8?t=4178) [some parameters that we should use so I](https://youtu.be/Tr1rzThssL8?t=4182) [think EA](https://youtu.be/Tr1rzThssL8?t=4185) [help EA add image](https://youtu.be/Tr1rzThssL8?t=4189) [so it](https://youtu.be/Tr1rzThssL8?t=4195) [says oh there's](https://youtu.be/Tr1rzThssL8?t=4199) [the so it says that scale set scale to](https://youtu.be/Tr1rzThssL8?t=4201) [false if you want the embedded image at](https://youtu.be/Tr1rzThssL8?t=4206) [100% of its original size default is](https://youtu.be/Tr1rzThssL8?t=4210) [true which will insert a scaled limage](https://youtu.be/Tr1rzThssL8?t=4214) [so I need to set](https://youtu.be/Tr1rzThssL8?t=4217) [scaled I need to set scale to false so](https://youtu.be/Tr1rzThssL8?t=4219) [let's just delete this from](https://youtu.be/Tr1rzThssL8?t=4224) [here close this and so we'll come here](https://youtu.be/Tr1rzThssL8?t=4228) [and let's just clean this up so this](https://youtu.be/Tr1rzThssL8?t=4232) [thing with the setting the image size](https://youtu.be/Tr1rzThssL8?t=4234) [Etc](https://youtu.be/Tr1rzThssL8?t=4237) [is unnecessary I don't need to get the](https://youtu.be/Tr1rzThssL8?t=4238) [image element that's also](https://youtu.be/Tr1rzThssL8?t=4242) [unnecessary so instead all I need to do](https://youtu.be/Tr1rzThssL8?t=4244) [is I need to add the image file to top](https://youtu.be/Tr1rzThssL8?t=4247) [00 0 but then then I want to set scale](https://youtu.be/Tr1rzThssL8?t=4251) [to](https://youtu.be/Tr1rzThssL8?t=4257) [false and I then want to set anchor to](https://youtu.be/Tr1rzThssL8?t=4258) [false as well otherwise it's fixed](https://youtu.be/Tr1rzThssL8?t=4263) [100% And then the issue is why does the](https://youtu.be/Tr1rzThssL8?t=4268) [text element end](https://youtu.be/Tr1rzThssL8?t=4272) [up so](https://youtu.be/Tr1rzThssL8?t=4274) [maybe maybe this is what we're going to](https://youtu.be/Tr1rzThssL8?t=4278) [do so I'm going to after a con image ID](https://youtu.be/Tr1rzThssL8?t=4280) [so we are doing this back we can close](https://youtu.be/Tr1rzThssL8?t=4286) [this then I'm going to add const uh](https://youtu.be/Tr1rzThssL8?t=4288) [image element equals EA get](https://youtu.be/Tr1rzThssL8?t=4294) [Element image](https://youtu.be/Tr1rzThssL8?t=4300) [ID and here what I'm going to do is I'm](https://youtu.be/Tr1rzThssL8?t=4306) [going to](https://youtu.be/Tr1rzThssL8?t=4310) [write in](https://youtu.be/Tr1rzThssL8?t=4312) [image](https://youtu.be/Tr1rzThssL8?t=4314) [element y Plus image](https://youtu.be/Tr1rzThssL8?t=4317) [element](https://youtu.be/Tr1rzThssL8?t=4322) [height](https://youtu.be/Tr1rzThssL8?t=4324) [plus](https://youtu.be/Tr1rzThssL8?t=4327) [30 that's what we're going to do I think](https://youtu.be/Tr1rzThssL8?t=4328) [this is this is going to be the](https://youtu.be/Tr1rzThssL8?t=4332) [right](https://youtu.be/Tr1rzThssL8?t=4335) [um right](https://youtu.be/Tr1rzThssL8?t=4337) [approach](https://youtu.be/Tr1rzThssL8?t=4342) [H okay so I think I think this is good](https://youtu.be/Tr1rzThssL8?t=4345) [because now I'm POS positioning this](https://youtu.be/Tr1rzThssL8?t=4347) [based on the image um now the only thing](https://youtu.be/Tr1rzThssL8?t=4349) [that we might want to do after this](https://youtu.be/Tr1rzThssL8?t=4354) [is I have my rectangle element so I'm](https://youtu.be/Tr1rzThssL8?t=4358) [going to take I'm going to reposition](https://youtu.be/Tr1rzThssL8?t=4362) [the rectangle in a way that I'm going to](https://youtu.be/Tr1rzThssL8?t=4365) [set the rectangle element X to be](https://youtu.be/Tr1rzThssL8?t=4367) [image](https://youtu.be/Tr1rzThssL8?t=4374) [element](https://youtu.be/Tr1rzThssL8?t=4375) [width minus rectangle](https://youtu.be/Tr1rzThssL8?t=4378) [element](https://youtu.be/Tr1rzThssL8?t=4383) [width over two so I want the rectangle](https://youtu.be/Tr1rzThssL8?t=4385) [to](https://youtu.be/Tr1rzThssL8?t=4389) [be in the](https://youtu.be/Tr1rzThssL8?t=4390) [center um and I think this this is going](https://youtu.be/Tr1rzThssL8?t=4392) [to achieve that so let's give this a](https://youtu.be/Tr1rzThssL8?t=4395) [try a damn it again I was updating the](https://youtu.be/Tr1rzThssL8?t=4401) [so delete I always so now all my edits](https://youtu.be/Tr1rzThssL8?t=4406) [are](https://youtu.be/Tr1rzThssL8?t=4410) [gone what the heck is going on](https://youtu.be/Tr1rzThssL8?t=4412) [here no it's not gone good so but then](https://youtu.be/Tr1rzThssL8?t=4416) [why didn't](https://youtu.be/Tr1rzThssL8?t=4420) [it execute oh because I already had a](https://youtu.be/Tr1rzThssL8?t=4422) [daily I don't know](https://youtu.be/Tr1rzThssL8?t=4426) [delete so again let's](https://youtu.be/Tr1rzThssL8?t=4431) [oh because I stopped it because I'm I'm](https://youtu.be/Tr1rzThssL8?t=4435) [silly because what happened was it did](https://youtu.be/Tr1rzThssL8?t=4438) [send a request to open the eye but I](https://youtu.be/Tr1rzThssL8?t=4441) [aborted it so let's see what's going to](https://youtu.be/Tr1rzThssL8?t=4443) [happen now because yeah so this is a bit](https://youtu.be/Tr1rzThssL8?t=4446) [of an issue with the script that it](https://youtu.be/Tr1rzThssL8?t=4448) [takes so long that you're going to be](https://youtu.be/Tr1rzThssL8?t=4451) [tempted yeah there you go but now](https://youtu.be/Tr1rzThssL8?t=4456) [everything is perfect so there you go so](https://youtu.be/Tr1rzThssL8?t=4458) [I have a daily notes template](https://youtu.be/Tr1rzThssL8?t=4461) [that okay it's not updated because it](https://youtu.be/Tr1rzThssL8?t=4464) [inserted the image with the with the](https://youtu.be/Tr1rzThssL8?t=4468) [text not in the center but uh I think we](https://youtu.be/Tr1rzThssL8?t=4471) [will take a look at how to fix that but](https://youtu.be/Tr1rzThssL8?t=4474) [overall I think this is super cool](https://youtu.be/Tr1rzThssL8?t=4478) [um yeah I I I think this is absolutely](https://youtu.be/Tr1rzThssL8?t=4484) [absolutely](https://youtu.be/Tr1rzThssL8?t=4488) [fantastic I have a quote from the](https://youtu.be/Tr1rzThssL8?t=4489) [the uh story quotes.com that](https://youtu.be/Tr1rzThssL8?t=4494) [automatically](https://youtu.be/Tr1rzThssL8?t=4497) [generates an image with Dolly and then](https://youtu.be/Tr1rzThssL8?t=4499) [inserts that image as part of my daily](https://youtu.be/Tr1rzThssL8?t=4503) [note template the only problem that we](https://youtu.be/Tr1rzThssL8?t=4506) [are facing is that this](https://youtu.be/Tr1rzThssL8?t=4509) [process takes a long time and in that](https://youtu.be/Tr1rzThssL8?t=4512) [long time I think as a user you are](https://youtu.be/Tr1rzThssL8?t=4516) [tempted to mod](https://youtu.be/Tr1rzThssL8?t=4521) [ify](https://youtu.be/Tr1rzThssL8?t=4524) [um](https://youtu.be/Tr1rzThssL8?t=4528) [the the inserted uh template so anyway](https://youtu.be/Tr1rzThssL8?t=4530) [this is for your own use I think as for](https://youtu.be/Tr1rzThssL8?t=4535) [the video this is a good result and this](https://youtu.be/Tr1rzThssL8?t=4538) [is where I'm I think I'm going](https://youtu.be/Tr1rzThssL8?t=4542) [to stop I don't quite](https://youtu.be/Tr1rzThssL8?t=4545) [understand why the text was not in the](https://youtu.be/Tr1rzThssL8?t=4548) [Cent Center that's](https://youtu.be/Tr1rzThssL8?t=4552) [um that's an interesting one but I'm not](https://youtu.be/Tr1rzThssL8?t=4559) [so concerned because the image is opened](https://youtu.be/Tr1rzThssL8?t=4562) [on the right hand side so you can always](https://youtu.be/Tr1rzThssL8?t=4564) [once you save it the image is going to](https://youtu.be/Tr1rzThssL8?t=4567) [update in the daily note so I'm not](https://youtu.be/Tr1rzThssL8?t=4570) [going to bother with that either um I](https://youtu.be/Tr1rzThssL8?t=4572) [think I think I know what the issue is](https://youtu.be/Tr1rzThssL8?t=4577) [so what we need to do is I need to](https://youtu.be/Tr1rzThssL8?t=4580) [separately move the text element as well](https://youtu.be/Tr1rzThssL8?t=4583) [because here you know a text a sticky](https://youtu.be/Tr1rzThssL8?t=4586) [note is a rectangle with a bound text](https://youtu.be/Tr1rzThssL8?t=4590) [element and what I'm doing here is I'm](https://youtu.be/Tr1rzThssL8?t=4594) [only moving the rectangle element so I](https://youtu.be/Tr1rzThssL8?t=4597) [think we need to um actually generate](https://youtu.be/Tr1rzThssL8?t=4601) [an text element ID so here I'm going](https://youtu.be/Tr1rzThssL8?t=4606) [to text ID equals](https://youtu.be/Tr1rzThssL8?t=4611) [EA generate element ID so now I have a](https://youtu.be/Tr1rzThssL8?t=4615) [text ID and when I do this I'm going to](https://youtu.be/Tr1rzThssL8?t=4621) [submit the text ID as well so you know](https://youtu.be/Tr1rzThssL8?t=4627) [if I do this EA add text and here you](https://youtu.be/Tr1rzThssL8?t=4630) [can see that I can add an ID for the](https://youtu.be/Tr1rzThssL8?t=4636) [text element so I added my text ID](https://youtu.be/Tr1rzThssL8?t=4639) [so I can also get my text element](https://youtu.be/Tr1rzThssL8?t=4644) [con text element equals EA](https://youtu.be/Tr1rzThssL8?t=4647) [get](https://youtu.be/Tr1rzThssL8?t=4654) [element text](https://youtu.be/Tr1rzThssL8?t=4657) [ID and I'm actually going to](https://youtu.be/Tr1rzThssL8?t=4659) [um do this text element dox](https://youtu.be/Tr1rzThssL8?t=4664) [equals and in this case I'm going to to](https://youtu.be/Tr1rzThssL8?t=4670) [text plus](https://youtu.be/Tr1rzThssL8?t=4673) [equals because and actually I can do](https://youtu.be/Tr1rzThssL8?t=4675) [plus equals here as well uh the](https://youtu.be/Tr1rzThssL8?t=4679) [difference with plus equals is it takes](https://youtu.be/Tr1rzThssL8?t=4682) [the current value of text element and I](https://youtu.be/Tr1rzThssL8?t=4685) [just want to shift it um with the same](https://youtu.be/Tr1rzThssL8?t=4687) [amount so I'm going to shift it with](https://youtu.be/Tr1rzThssL8?t=4691) [this value and I think this is going to](https://youtu.be/Tr1rzThssL8?t=4693) [now fix that issue so let's delete](https://youtu.be/Tr1rzThssL8?t=4697) [this let's let's delete](https://youtu.be/Tr1rzThssL8?t=4701) [this and let's delete my](https://youtu.be/Tr1rzThssL8?t=4704) [BNG let's close this actually I can](https://youtu.be/Tr1rzThssL8?t=4708) [close this as well and let's do my daily](https://youtu.be/Tr1rzThssL8?t=4711) [notes page we know that we need to wait](https://youtu.be/Tr1rzThssL8?t=4714) [so that's maybe in the beginning I could](https://youtu.be/Tr1rzThssL8?t=4718) [put a notice up](https://youtu.be/Tr1rzThssL8?t=4722) [but but anyway I'm doing this for myself](https://youtu.be/Tr1rzThssL8?t=4728) [so I'm going to to know that I need to](https://youtu.be/Tr1rzThssL8?t=4732) [wait uh about half a minute for this to](https://youtu.be/Tr1rzThssL8?t=4734) [complete so I'm going to be](https://youtu.be/Tr1rzThssL8?t=4738) [patient now what I could do is at every](https://youtu.be/Tr1rzThssL8?t=4745) [step of the journey maybe that's what](https://youtu.be/Tr1rzThssL8?t=4750) [we're going to do we're going to but](https://youtu.be/Tr1rzThssL8?t=4753) [here we go and now it's perfect so you](https://youtu.be/Tr1rzThssL8?t=4755) [see I have my daily note the text is in](https://youtu.be/Tr1rzThssL8?t=4757) [the center if you have have assumed the](https://youtu.be/Tr1rzThssL8?t=4760) [character beyond your strength you have](https://youtu.be/Tr1rzThssL8?t=4764) [both played a poor figure in that and](https://youtu.be/Tr1rzThssL8?t=4767) [neglected one that is within your](https://youtu.be/Tr1rzThssL8?t=4770) [powers](https://youtu.be/Tr1rzThssL8?t=4776) [yeah this is going to be interesting so](https://youtu.be/Tr1rzThssL8?t=4778) [these](https://youtu.be/Tr1rzThssL8?t=4782) [quotes um with the image I think this is](https://youtu.be/Tr1rzThssL8?t=4782) [super interesting and if now I look at](https://youtu.be/Tr1rzThssL8?t=4785) [the markdown View mode just to uh show](https://youtu.be/Tr1rzThssL8?t=4788) [you um I have here the author and the](https://youtu.be/Tr1rzThssL8?t=4791) [quote so that part also works you](https://youtu.be/Tr1rzThssL8?t=4795) [remember the way I did that was here at](https://youtu.be/Tr1rzThssL8?t=4798) [the end I added the plain text uh](https://youtu.be/Tr1rzThssL8?t=4802) [component and then to round all of this](https://youtu.be/Tr1rzThssL8?t=4806) [off what we're going to do is this um](https://youtu.be/Tr1rzThssL8?t=4810) [here I have console log and instead of](https://youtu.be/Tr1rzThssL8?t=4814) [uh console log I'm going to write new](https://youtu.be/Tr1rzThssL8?t=4818) [notice uh](https://youtu.be/Tr1rzThssL8?t=4821) [um result Json like](https://youtu.be/Tr1rzThssL8?t=4826) [this but I don't need the Json there](https://youtu.be/Tr1rzThssL8?t=4833) [just uh this is not going to be good](https://youtu.be/Tr1rzThssL8?t=4838) [um I think what I'm going to do](https://youtu.be/Tr1rzThssL8?t=4842) [is](https://youtu.be/Tr1rzThssL8?t=4845) [um image](https://youtu.be/Tr1rzThssL8?t=4847) [prompt](https://youtu.be/Tr1rzThssL8?t=4851) [prompt](https://youtu.be/Tr1rzThssL8?t=4855) [ready image prompt ready great I'm going](https://youtu.be/Tr1rzThssL8?t=4860) [to I'm going to leave that there so this](https://youtu.be/Tr1rzThssL8?t=4864) [is always good for](https://youtu.be/Tr1rzThssL8?t=4867) [debugging I think in generate image as](https://youtu.be/Tr1rzThssL8?t=4869) [well I'm going to uh write here](https://youtu.be/Tr1rzThssL8?t=4872) [that](https://youtu.be/Tr1rzThssL8?t=4876) [um I have the and the message is not](https://youtu.be/Tr1rzThssL8?t=4880) [good but I'm going to](https://youtu.be/Tr1rzThssL8?t=4883) [write](https://youtu.be/Tr1rzThssL8?t=4885) [uh new](https://youtu.be/Tr1rzThssL8?t=4887) [notice and we're going to just uh write](https://youtu.be/Tr1rzThssL8?t=4890) [this and here otherwise I'm going to](https://youtu.be/Tr1rzThssL8?t=4899) [write new](https://youtu.be/Tr1rzThssL8?t=4903) [notice and we're going to say that image](https://youtu.be/Tr1rzThssL8?t=4906) [is ready and I'm going to put the URL](https://youtu.be/Tr1rzThssL8?t=4910) [here so I'm informed that the image is](https://youtu.be/Tr1rzThssL8?t=4924) [ready and then](https://youtu.be/Tr1rzThssL8?t=4927) [um I](https://youtu.be/Tr1rzThssL8?t=4933) [think uh I'm just going to write here](https://youtu.be/Tr1rzThssL8?t=4935) [that](https://youtu.be/Tr1rzThssL8?t=4938) [image](https://youtu.be/Tr1rzThssL8?t=4941) [new](https://youtu.be/Tr1rzThssL8?t=4944) [notice image file](https://youtu.be/Tr1rzThssL8?t=4947) [saved like this okay so final test now](https://youtu.be/Tr1rzThssL8?t=4950) [we are going to get some proper messages](https://youtu.be/Tr1rzThssL8?t=4955) [as well as we run this so check here](https://youtu.be/Tr1rzThssL8?t=4959) [that's where we're going to see our](https://youtu.be/Tr1rzThssL8?t=4961) [messages oh no okay so this was fast but](https://youtu.be/Tr1rzThssL8?t=4964) [this was fast because I have my daily](https://youtu.be/Tr1rzThssL8?t=4967) [notes folder here](https://youtu.be/Tr1rzThssL8?t=4970) [okay so final](https://youtu.be/Tr1rzThssL8?t=4978) [test maybe I should have a but now I see](https://youtu.be/Tr1rzThssL8?t=4985) [that the image prompt is](https://youtu.be/Tr1rzThssL8?t=4989) [ready and it's gone so I I at least get](https://youtu.be/Tr1rzThssL8?t=4991) [some](https://youtu.be/Tr1rzThssL8?t=4995) [feedback and after a little time I get](https://youtu.be/Tr1rzThssL8?t=4996) [that the image is ready that's great](https://youtu.be/Tr1rzThssL8?t=5000) [image is saved and I get the image I](https://youtu.be/Tr1rzThssL8?t=5002) [think this is cool now what's also clear](https://youtu.be/Tr1rzThssL8?t=5004) [that but I think this is what you can so](https://youtu.be/Tr1rzThssL8?t=5009) [I'm going to place all of this](https://youtu.be/Tr1rzThssL8?t=5012) [on uh GitHub as a gist and you can](https://youtu.be/Tr1rzThssL8?t=5014) [download I'm actually going to zip this](https://youtu.be/Tr1rzThssL8?t=5018) [Vault and place it on GitHub so you can](https://youtu.be/Tr1rzThssL8?t=5021) [actually get the entire Vault and play](https://youtu.be/Tr1rzThssL8?t=5025) [with it](https://youtu.be/Tr1rzThssL8?t=5028) [yourself so I think this is where we](https://youtu.be/Tr1rzThssL8?t=5029) [need to be more strict about being text](https://youtu.be/Tr1rzThssL8?t=5033) [free maybe we can be significantly more](https://youtu.be/Tr1rzThssL8?t=5037) [explicit in our message that don't](https://youtu.be/Tr1rzThssL8?t=5042) [include any text on the image because](https://youtu.be/Tr1rzThssL8?t=5045) [now we have that text there which I mean](https://youtu.be/Tr1rzThssL8?t=5048) [it's not the end of the RO but it's not](https://youtu.be/Tr1rzThssL8?t=5051) [beautiful so that's all I had for you](https://youtu.be/Tr1rzThssL8?t=5054) [today I know this was long probably](https://youtu.be/Tr1rzThssL8?t=5056) [slightly convoluted I'm going to now do](https://youtu.be/Tr1rzThssL8?t=5059) [a bit of cut things that you](https://youtu.be/Tr1rzThssL8?t=5061) [can that this becomes more digestible](https://youtu.be/Tr1rzThssL8?t=5063) [but I'm actually going to post this](https://youtu.be/Tr1rzThssL8?t=5067) [mostly](https://youtu.be/Tr1rzThssL8?t=5070) [raw and let me know what you think is](https://youtu.be/Tr1rzThssL8?t=5071) [this helpful are you enjoying this type](https://youtu.be/Tr1rzThssL8?t=5073) [of content I certainly enjoyed creating](https://youtu.be/Tr1rzThssL8?t=5076) [this Automation and what would you like](https://youtu.be/Tr1rzThssL8?t=5079) [to see I'm happy to create similar uh](https://youtu.be/Tr1rzThssL8?t=5083) [projects going through the process of](https://youtu.be/Tr1rzThssL8?t=5086) [creating something and recording it let](https://youtu.be/Tr1rzThssL8?t=5088) [me know what you would like to see and](https://youtu.be/Tr1rzThssL8?t=5091) [then maybe I can do that thank you](https://youtu.be/Tr1rzThssL8?t=5093)