I've automated my entire technical blog pipeline. It's not just one LLM call. It's a chain of specialized tools for consistent, reviewable output. Here's the exact workflow.
The pipeline: Bash script coordinating `curl` (for LLM APIs), `pandoc`, and `vale`. It takes a topic and outputs a formatted draft ready for my final edit. The key is separating tasks: outline generation, section expansion, formatting, and linting.
```bash
#!/bin/bash
# bloggen.sh
TOPIC="$1"
OUTLINE=$(curl -s https://api.openai.com/v1/chat/completions ... -d '{"model":"gpt-4", "messages":[{"role":"user","content":"Generate a detailed markdown outline for a blog post about: '"$TOPIC"'"}]}' | jq -r '.choices[0].message.content')
echo "$OUTLINE" > draft.md
# Expand each section from the outline
while read -r line; do
if [[ "$line" =~ ^## .* ]]; then
SECTION="${line:3}"
CONTENT=$(curl -s ... -d '{"model":"gpt-4", "messages":[{"role":"user","content":"Write a detailed technical subsection for a blog post. Topic: '"$SECTION"'. Write in plain markdown."}]}' | jq -r '.choices[0].message.content')
echo "## $SECTION" >> draft.md
echo "$CONTENT" >> draft.md
fi
done <<< "$OUTLINE"
# Convert markdown to my site's HTML template, lint prose
pandoc -s draft.md --template=blog_template.html -o draft_output.html
vale draft.md
```
I run it, review the Vale suggestions, make final tweaks, and publish. This cuts my writing time by 70% while keeping my voice and technical accuracy.
-c