[alexanderwhitestone.com] CLI tool for quick-posting and X content porting #219

Closed
opened 2026-03-15 17:22:58 +00:00 by hermes · 2 comments
Collaborator

What

A simple CLI tool that lets Alexander:

  1. Create a new post from a one-liner: aw-post "Sovereignty isn't optional."
  2. Port an X/Twitter post by pasting the text: aw-post --from-x "original tweet text"
  3. Create longer posts from a file: aw-post --file thoughts.md

Why

If posting to your own site is harder than tweeting, you won't do it. The tool must be frictionless.

Proposed Implementation

#!/bin/bash
# aw-post — quick post to AlexanderWhitestone.com
POSTS_DIR=~/alexanderwhitestone.com/content/posts
DATE=$(date +%Y-%m-%d-%H%M)
SLUG=$(echo "$1" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | head -c 50)
FILE="$POSTS_DIR/$DATE-$SLUG.md"

cat > "$FILE" <<EOF
---
date: $(date -Iseconds)
---

$1
EOF

echo "Posted: $FILE"
echo "Run 'make build' to regenerate, or push to trigger CI"

Scope

  • Simple bash script (~30 lines)
  • Drops into the site repo's scripts/ directory
  • Optionally auto-commits and pushes
## What A simple CLI tool that lets Alexander: 1. Create a new post from a one-liner: `aw-post "Sovereignty isn't optional."` 2. Port an X/Twitter post by pasting the text: `aw-post --from-x "original tweet text"` 3. Create longer posts from a file: `aw-post --file thoughts.md` ## Why If posting to your own site is harder than tweeting, you won't do it. The tool must be frictionless. ## Proposed Implementation ```bash #!/bin/bash # aw-post — quick post to AlexanderWhitestone.com POSTS_DIR=~/alexanderwhitestone.com/content/posts DATE=$(date +%Y-%m-%d-%H%M) SLUG=$(echo "$1" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | head -c 50) FILE="$POSTS_DIR/$DATE-$SLUG.md" cat > "$FILE" <<EOF --- date: $(date -Iseconds) --- $1 EOF echo "Posted: $FILE" echo "Run 'make build' to regenerate, or push to trigger CI" ``` ## Scope - Simple bash script (~30 lines) - Drops into the site repo's `scripts/` directory - Optionally auto-commits and pushes
Author
Collaborator

Partially addressed by the Tower scaffold (hermes/alexanderwhitestone.com#1). CLI tool (scripts/aw-post) creates markdown posts with frontmatter. Remaining: X/Twitter cross-posting integration, content formatting for social media.

Partially addressed by the Tower scaffold (hermes/alexanderwhitestone.com#1). CLI tool (scripts/aw-post) creates markdown posts with frontmatter. Remaining: X/Twitter cross-posting integration, content formatting for social media.
Author
Collaborator

Completed in hermes/alexanderwhitestone.com PR #3.

aw-post now supports:

  • aw-post "Title" — basic post (body from stdin)
  • aw-post --from-x "tweet text" — port X/Twitter posts
  • aw-post --file thoughts.md — post from markdown file
  • aw-post --help — usage

All modes auto-rebuild the blog. Closing.

Completed in hermes/alexanderwhitestone.com PR #3. aw-post now supports: - `aw-post "Title"` — basic post (body from stdin) - `aw-post --from-x "tweet text"` — port X/Twitter posts - `aw-post --file thoughts.md` — post from markdown file - `aw-post --help` — usage All modes auto-rebuild the blog. Closing.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#219