A python program that transform tailwindui components into Rust's yew view macro, uses PydanticAI Agent Framework, and Free Gemini Flash Model.
The way we use yew's Html! {}
macro is quite different than other, there we need to put the data inside a tag to be covered in curly braces {} this is by design.
So when you tried to copy-paste(and improve) the component from tailwindui website, you will need to do the whole rewrite, just so to put the curly braces around the tag with a text in it and it is really becoming tedious really quick.
What this program try to accomplish is to bypass so that it will transform tailwindui components into yew compatible Html! {} macro with ease.
Install tailwind2yew with python environment already activated is highly recommended, check them here. Then run below command
pip install -r requirements.txt
After that, create new .env file and fill the Gemini Flash API like this, you can get them in this link
GEMINI_API_KEY
TOMORROW
input.txt
```
Produce professional, reliable streams easily leveraging Mailchimp's innovative broadcast studio.
fn blog_post_link() -> Html {
html! {
{"Produce professional, reliable streams easily leveraging Mailchimp's innovative broadcast studio."}
{"Studio by Mailchimp"}
4. Then you can use the output into your rust yew project.
## FAQ
#### Is this free?
Yes, using gemini google flash, its free, but is limited. check them out https://aistudio.google.com/plan_information
## Other Question
If you have any other question, please post it in discussion tab