## BLOG CREATOR

This creator requires you to use a working Trilium Instance and create a .env file with the following

```
TRILIUM_HOST=
TRILIUM_PORT=
TRILIUM_PROTOCOL=
TRILIUM_PASS=
TRILIUM_TOKEN=
OLLAMA_PROTOCOL=
OLLAMA_HOST=
OLLAMA_PORT=11434
EMBEDDING_MODEL=
EDITOR_MODEL=
# This is expected in python list format example `[phi4-mini:latest, qwen3:1.7b, gemma3:latest]`
CONTENT_CREATOR_MODELS=
CHROMA_SERVER=<IP_ADDRESS>
```

This container is going to be what I use to trigger a blog creation event

To do this we will

1. Download a Note from Trillium (I need to work out how to choose this, maybe something with a tag and then this can add a tag when it's used? each note is a seperate post, a tag to indicate if it's ready as well?)

`SELECT NOTES WHERE blog_tag = true AND used_tag = false AND ready_tag = true?`

2. Check if the ollama server is available (it's currently on a box that may not be on)

- If not on stop

3. `git pull git.aridgwayweb.com/blog`

- set up git creds: git.name = ai git.email = ridgwayinfrastructure@gmail.com get git password stored (create service user in gitea for this)

- `git config set upstream Auto true`

4. cd /src/content

5. take the information from the trillium note and prepare a 500 word blog post, insert the following at the top

```
Title: <title>
Date: <date post created>
Modified: <date post created>
Category: <this will come from a tag on the post (category: <category>)
Tags: <ai generated tags>, ai_content, not_human_content
Slug: <have ai write slug?>
Authors: <model name>.ai
Summary: <have ai write a 10 word summary of the post
```

6. write it to `<title>.md`

7. `git checkout -b <title>`

8. `git add .`

9. `git commit -m "<have ai write a git commit about the post>"`

10. `git push`

11. Send notification via n8n to matrix for me to review?