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 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-04-11 00:28:00 +02:00
commit b3979d0e5d

View file

@ -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`