AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning

This commit is contained in:
Krilly
2026-03-04 13:29:22 +00:00
parent 29a98137a7
commit 57dd294675
13706 changed files with 2114953 additions and 237629 deletions

View File

@@ -0,0 +1,59 @@
#!/usr/bin/env node
/**
* Delete a calendar event
*
* Usage:
* node delete-event.mjs --event-id "f9900f6b-b472-4b17-a818-7b5584abdc37_0"
*/
import { parseArgs } from 'util';
import { deleteEvent, DEFAULT_CALENDAR_ID } from '../lib/calendar.mjs';
const { values } = parseArgs({
options: {
'event-id': { type: 'string' },
calendar: { type: 'string', default: DEFAULT_CALENDAR_ID },
'no-notify': { type: 'boolean', default: false },
help: { type: 'boolean', short: 'h' }
}
});
if (values.help) {
console.log(`
Delete a Lark calendar event
Options:
--event-id Event ID to delete (required)
--calendar Calendar ID
--no-notify Don't send notifications to attendees
-h, --help Show this help
Examples:
node delete-event.mjs --event-id "f9900f6b-b472-4b17-a818-7b5584abdc37_0"
`);
process.exit(0);
}
if (!values['event-id']) {
console.error('Error: --event-id is required');
process.exit(1);
}
async function main() {
try {
console.log(`Deleting event: ${values['event-id']}`);
await deleteEvent(values['event-id'], values.calendar, !values['no-notify']);
console.log('✅ Event deleted successfully!');
} catch (error) {
console.error('❌ Failed to delete event:', error.message);
if (error.larkResponse) {
console.error('Lark response:', JSON.stringify(error.larkResponse, null, 2));
}
process.exit(1);
}
}
main();