1.8 KiB
1.8 KiB
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
- 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?
- Check if the ollama server is available (it's currently on a box that may not be on)
- If not on stop
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
-
cd /src/content
-
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
-
write it to
<title>.md
-
git checkout -b <title>
-
git add .
-
git commit -m "<have ai write a git commit about the post>"
-
git push
-
Send notification via n8n to matrix for me to review?