From b3979d0e5db7c4202c47363cdbd6bf5994e109dc Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Sat, 11 Apr 2026 00:28:00 +0200 Subject: [PATCH] feat(linkedin): generate iCal file during batch creation Step 5b in batch.md generates a .ics calendar file from the queue, giving users 15-minute reminders in their calendar app before each scheduled post. Supports macOS Calendar, Google Calendar, Outlook. Co-Authored-By: Claude Opus 4.6 --- .../commands/batch.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/plugins/linkedin-thought-leadership/commands/batch.md b/plugins/linkedin-thought-leadership/commands/batch.md index 155922b..c25b7c8 100644 --- a/plugins/linkedin-thought-leadership/commands/batch.md +++ b/plugins/linkedin-thought-leadership/commands/batch.md @@ -168,6 +168,38 @@ Mark as published: /linkedin:publish Remember: Run 5x5x5 engagement 15 min before each post! ``` +### 5b. Generate Calendar File + +Generate a .ics calendar file so the user can import posting reminders into their calendar app: + +```bash +node --input-type=module -e " +import { queueUpcoming } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/queue-manager.mjs'; +import { generateIcalFromQueue, writeIcalFile } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/ical-generator.mjs'; +const upcoming = queueUpcoming(14); +if (upcoming.length === 0) { console.log('No upcoming posts to schedule.'); process.exit(0); } +const events = generateIcalFromQueue(upcoming); +const icsPath = '${CLAUDE_PLUGIN_ROOT}/assets/drafts/week-[WXX]/schedule.ics'; +writeIcalFile(icsPath, events); +console.log('Calendar file: ' + icsPath + ' (' + events.length + ' events)'); +" +``` + +Replace `[WXX]` with the actual ISO week number used for the batch directory. + +Show the user: + +``` +Calendar file generated: assets/drafts/week-[WXX]/schedule.ics + +Import this file into your calendar app: +- macOS: Double-click the .ics file → Calendar.app imports it +- Google Calendar: Settings → Import → select .ics file +- Outlook: File → Open → Import → .ics file + +Each scheduled post has a 15-minute reminder before posting time. +``` + ## Reference Files - `${CLAUDE_PLUGIN_ROOT}/references/thought-leadership-angles.md`