- Create Economist SubmissionTracking package correctly: * mainArticle = full blog post content * coverLetter = 216-word SIR— letter * Links to blog post via blogPostId - Archive 'Letter to The Economist' from blog posts (it's the cover letter) - Fix date display on article cards (use published_at) - Target publication already displaying via blue badge Database changes: - Make blogPostId optional in SubmissionTracking model - Economist package ID: 68fa85ae49d4900e7f2ecd83 - Le Monde package ID: 68fa2abd2e6acd5691932150 Next: Enhanced modal with tabs, validation, export 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
require('dotenv').config();
|
|
const { getDb } = require('../src/utils/db.util');
|
|
|
|
(async () => {
|
|
const db = await getDb();
|
|
const collection = db.collection('documents');
|
|
|
|
// Get all archived, confidential, and internal documents
|
|
const docs = await collection.find({
|
|
visibility: { $in: ['archived', 'confidential', 'internal'] }
|
|
}).project({ slug: 1, title: 1, visibility: 1 }).sort({ visibility: 1, slug: 1 }).toArray();
|
|
|
|
console.log('\n📋 Documents with visibility: archived, confidential, internal\n');
|
|
|
|
const byVisibility = {
|
|
archived: [],
|
|
confidential: [],
|
|
internal: []
|
|
};
|
|
|
|
docs.forEach(doc => {
|
|
byVisibility[doc.visibility] = byVisibility[doc.visibility] || [];
|
|
byVisibility[doc.visibility].push(doc);
|
|
});
|
|
|
|
Object.entries(byVisibility).forEach(([visibility, documents]) => {
|
|
if (documents.length > 0) {
|
|
console.log(`\n${visibility.toUpperCase()} (${documents.length}):`);
|
|
documents.forEach(doc => {
|
|
console.log(` - ${doc.slug}`);
|
|
});
|
|
}
|
|
});
|
|
|
|
console.log(`\n\nTotal: ${docs.length} documents\n`);
|
|
process.exit(0);
|
|
})();
|