diff --git a/README.md b/README.md index a21d935..5d254c9 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,23 @@ assets/ clipart/ # Illustrative clipart general/ # Screenshots and diagrams memes/ # Memes referenced in articles +scripts/ + new-article # Creates new article from title and opens in vim + article-template.md # Template used by the script ``` + +## Creating New Articles + +You can quickly create a new article with proper front-matter using the helper script: + +```bash +scripts/new-article "The Telos of Test Automation" +``` + +This will: +- Generate a clean slug from the title +- Create the file in `articles/drafts/` +- Populate it with the current front-matter standard and template structure +- Open the file in `vim` (falls back to `vi`) + +See `scripts/article-template.md` and `GROK.md` for the current conventions. diff --git a/articles/drafts/when-not-to-test.md b/articles/drafts/when-not-to-test.md new file mode 100644 index 0000000..01318e0 --- /dev/null +++ b/articles/drafts/when-not-to-test.md @@ -0,0 +1,25 @@ +--- +title: When Not To Test +date: 2026-04-07 +topics: [philosophy, craft] +related: [] +abstract: > + How do you decide when not to test something? This article offers some food for thought. +--- + +# When Not To Test + +## Introduction + +(Opening provocation or observation goes here.) + +## Main Argument + +(Develop the core idea, sustained analogy, or philosophical connection here.) + +## Conclusion + +(Grounded reflection — no generic summary or call to action.) + +--- +This is a template. Replace or delete sections as needed. Keep front-matter consistent with the standard in GROK.md. diff --git a/scripts/article-template.md b/scripts/article-template.md new file mode 100644 index 0000000..f356497 --- /dev/null +++ b/scripts/article-template.md @@ -0,0 +1,22 @@ +--- +title: {{TITLE}} +date: {{DATE}} +topics: [philosophy, craft] +related: [] +abstract: > + A short but dense abstract that captures the central provocation or philosophical thesis of the article. +--- + +# {{TITLE}} + +## Introduction + +(Opening provocation or observation goes here.) + +## Main Argument + +(Develop the core idea, sustained analogy, or philosophical connection here.) + +## Conclusion + +(Grounded reflection — no generic summary or call to action.) diff --git a/scripts/new-article b/scripts/new-article new file mode 100755 index 0000000..326bfed --- /dev/null +++ b/scripts/new-article @@ -0,0 +1,38 @@ +#!/bin/bash +# new-article — Creates a new article from a title and opens it in vim + +set -e + +if [ -z "$1" ]; then + echo "Usage: $0 \"Article Title\"" + echo "Example: $0 \"The Telos of Test Automation\"" + exit 1 +fi + +TITLE="$1" +DATE=$(date +%Y-%m-%d) +SLUG=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9]/-/g' -e 's/--*/-/g' -e 's/^-//g' -e 's/-$//g') +FILENAME="articles/drafts/${SLUG}.md" +TEMPLATE="scripts/article-template.md" + +if [ ! -f "$TEMPLATE" ]; then + echo "Error: Template $TEMPLATE not found." + exit 1 +fi + +if [ -f "$FILENAME" ]; then + echo "Error: $FILENAME already exists." + exit 1 +fi + +# Generate the file from template +sed -e "s/{{TITLE}}/$TITLE/g" -e "s/{{DATE}}/$DATE/g" "$TEMPLATE" > "$FILENAME" + +echo "Created $FILENAME" + +# Open in vim (fallback to vi) +if command -v vim >/dev/null 2>&1; then + vim "$FILENAME" +else + vi "$FILENAME" +fi