sed -e '/---/,/---/s/^\(tags: .*"#published".*\)$/\1\ndraft: false/' -e t -e '/---/,/---/s/^\(tags: .*\)$/\1\ndraft: true/' -e t -e '2n; /---/i\
draft: true' content/blog/article-on-the-diverse-and-fantastical-shapes-of-testing-martin-fowler.md | head

content-parse-draft-from-published-tag.sed

/^---$/,/^---$/s/^\(tags: .*"#published".*\)$/\1\ndraft: false/  
  
t  
  
/^---$/,/^---$/s/^\(tags: .*\)$/\1\ndraft: true/

Speedrun

find content/blog -type f -name '*.md' -exec sed -i "" -f content-parse-draft-from-published-tag.sed {} \;