~kris/dots

srice

srice/doc/bloggers/resources/toolbelt.md -rw-r--r-- 2.3 KiB
e98f3b03 — Kris Yotam chore: sync local state after restore (push updates, no pull) a month ago

#Blogger Toolbelt Patterns

#Draft Lifecycle

blog-new "Title" content/drafts
blog-draft-index
blog_reading_time content/drafts/*.md
blog_tk_context content/drafts/*.md
blog-links content/**/*.md | sort -u
blog_domain_counts content/**/*.md
blog_archive_queue archive-queue.txt content/**/*.md
blog_archive_all archive-queue.txt
blog-linkrot content/**/*.md | tee linkrot.txt

#Metadata Hygiene

BLOG_REQUIRED_FIELDS="title date status tags" blog-frontmatter
btitles
btags
bdates

#Publishing Checks

blog-build-check
blog-rss-check public/feed.xml
blog-stats
git diff --word-diff=color -- '*.md' '*.mdx'
blog-future-dates

#AI Review

llm --system 'Review this blog post for weak claims, missing evidence, and structure problems. Return concrete fixes.' --save blog-review
cat content/drafts/post.md | llm -t blog-review
blog-ai-review content/drafts/post.md
files-to-prompt content -e md -e mdx --markdown | llm -s 'Find stale claims and missing sources'

#Screenshots

blog-screenshot http://127.0.0.1:8000/ screenshots/local-home.png
shot-scraper multi shots.yml

#Gwern-Inspired Archive Queue

find content notes -type f \( -name '*.md' -o -name '*.mdx' \) -print0 |
  xargs -0 blog-links |
  cut -f1 |
  sort -u > archive-queue.txt

while read -r url; do
  blog-archive-url "$url"
done < archive-queue.txt

#Database Publishing

sqlite-utils insert blog.db posts posts.json --pk id
datasette blog.db
datasette publish cloudrun blog.db -m metadata.json

#Scheduled Maintenance

python build_readme.py
git add -A
git commit -m "Updated content" || true

blog-linkrot content/**/*.md | tee linkrot.txt
blog-screenshot https://example.com screenshots/home.png

#Org And Literate Pipelines

python build.py
ninja
emacs --batch -l publish.el -f org-publish-all
make tangle-build
rg -n '\[\[[^]]+\]\]' content notes
./bin/convert_wikilinks_to_refs.sh
./bin/add_hugo_frontmatter.py

#Visual Explanations

python -m cProfile -o output.prof script.py
flameprof output.prof --format log > output.folded
flamegraph.pl output.folded > profile.svg

#Search Surfaces

blog_find 'claim|citation needed|TODO'
blog_titles | fzf
blog-links | fzf
blog_domain_counts | sed -n '1,50p'