managarten/apps-archived/uload/scripts/extract-templates.js
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

41 lines
1.3 KiB
JavaScript

import fs from 'fs';
// Read the markdown file
const content = fs.readFileSync('docs/mail/email-templates-bilingual.md', 'utf8');
// Extract templates
const templates = {};
// Find verification template
const verificationMatch = content.match(/## 1\. E-Mail-Verifizierung.*?```html\n([\s\S]*?)```/);
if (verificationMatch) {
templates.verification = verificationMatch[1].trim();
}
// Find password reset template
const passwordMatch = content.match(/## 2\. Passwort-Reset.*?```html\n([\s\S]*?)```/);
if (passwordMatch) {
templates.passwordReset = passwordMatch[1].trim();
}
// Find email change template
const emailChangeMatch = content.match(/## 3\. E-Mail-Änderung.*?```html\n([\s\S]*?)```/);
if (emailChangeMatch) {
templates.emailChange = emailChangeMatch[1].trim();
}
// Find OTP template
const otpMatch = content.match(/## 4\. OTP.*?```html\n([\s\S]*?)```/);
if (otpMatch) {
templates.otp = otpMatch[1].trim();
}
// Find login alert template
const loginAlertMatch = content.match(/## 5\. Login-Alert.*?```html\n([\s\S]*?)```/);
if (loginAlertMatch) {
templates.loginAlert = loginAlertMatch[1].trim();
}
// Save to JSON file
fs.writeFileSync('email-templates.json', JSON.stringify(templates, null, 2));
console.log('Templates extracted to email-templates.json');