${title}
+ ++
diff --git a/documentation/AE_UI_Journals_module_update_2026.md b/documentation/AE_UI_Journals_module_update_2026.md
index 8b2f4f5b..475d266d 100644
--- a/documentation/AE_UI_Journals_module_update_2026.md
+++ b/documentation/AE_UI_Journals_module_update_2026.md
@@ -1,7 +1,7 @@
# Aether Journals UI Update (2026)
> **Status:** Active
-> **Last Updated:** 2026-01-13
+> **Last Updated:** 2026-01-14
> **Primary Agent:** Frontend SvelteKit Agent
## 1. Project Overview
@@ -33,6 +33,7 @@ This document outlines the modernization of the Journals module UI in the Svelte
* **State Management:** `src/lib/ae_journals/ae_journals_stores.ts`
* **Local Storage:** Dexie.js (`db_journals`)
* **API Client:** `src/lib/api/api.ts` -> `get_ae_obj_v3`
+* **Export Engine:** Centralized templates in `src/lib/ae_journals/ae_journals_export_templates.ts`.
---
@@ -61,8 +62,8 @@ This document outlines the modernization of the Journals module UI in the Svelte
### 🔄 Interop (Markdown/HTML)
* **Goal:** Bulk export/import for data portability.
-* **Format:** JSON container vs. Raw Markdown files.
-* **Integration:** potential drag-and-drop zone for Nextcloud Note files.
+* **Format:** Optimized templates for different journal types (Standard, Personal Log, Amazon Vine).
+* **Integration:** drag-and-drop zone for Nextcloud Note files and bulk parser logic in `ae_journals_parsers.ts`.
---
@@ -82,11 +83,12 @@ This document outlines the modernization of the Journals module UI in the Svelte
- [x] Implement Append/Prepend logic in `ae_comp__journal_entry_obj_id_view.svelte`.
- [x] Implement Bulk Export (Markdown/HTML/JSON) via `ae_comp__modal_journal_export.svelte`.
- [x] Implement Bulk Import with Drag-and-Drop via `ae_comp__modal_journal_import.svelte`.
+- [x] Establish centralized Export Template system (`ae_journals_export_templates.ts`).
### Phase 4: Polish & Security (Active)
- [x] Implement Auto-Save toggle and visual status indicators.
- [ ] Audit encryption flow for Quick Added and Imported entries.
-- [ ] Styling and Mobile responsiveness check.
+- [x] Styling and Mobile responsiveness check for Import/Export modals.
- [ ] Integrate Outbound Email sharing.
---
diff --git a/src/lib/ae_journals/ae_journals_export_templates.ts b/src/lib/ae_journals/ae_journals_export_templates.ts
new file mode 100644
index 00000000..db15d29e
--- /dev/null
+++ b/src/lib/ae_journals/ae_journals_export_templates.ts
@@ -0,0 +1,149 @@
+/**
+ * @file ae_journals_export_templates.ts
+ * @description Templates for formatting journal entries during export.
+ * @author One Sky IT
+ */
+
+import { ae_util } from '$lib/ae_utils/ae_utils';
+import type { ae_JournalEntry } from '$lib/types/ae_types';
+
+export interface ExportTemplate {
+ id: string;
+ name: string;
+ description: string;
+ extension: string;
+ formatter: (entries: ae_JournalEntry[]) => string;
+}
+
+/**
+ * Standard Markdown Template
+ */
+export const template_standard_markdown: ExportTemplate = {
+ id: 'standard_markdown',
+ name: 'Standard Markdown',
+ description: 'Basic Markdown with title, date, and content.',
+ extension: 'md',
+ formatter: (entries) => {
+ return entries.map(entry => {
+ const dateStr = ae_util.iso_datetime_formatter(entry.created_on, 'datetime_12_long');
+ const title = entry.name || dateStr;
+ const header = `# ${title}\n*${dateStr}*\n\n`;
+ return `${header}${entry.content || ''}\n\n---\n`;
+ }).join('\n');
+ }
+};
+
+/**
+ * Personal Log Template
+ * Formats entries as a continuous daily log.
+ */
+export const template_personal_log: ExportTemplate = {
+ id: 'personal_log',
+ name: 'Personal Log',
+ description: 'Formatted as a daily log with ## Date headers.',
+ extension: 'md',
+ formatter: (entries) => {
+ // Sort entries by date ascending for a chronological log
+ const sorted = [...entries].sort((a, b) =>
+ (a.created_on || '').localeCompare(b.created_on || '')
+ );
+
+ return sorted.map(entry => {
+ const dateStr = ae_util.iso_datetime_formatter(entry.created_on, 'date_iso');
+ const title = entry.name || '';
+ const header = `## ${dateStr}${title ? ' - ' + title : ''}\n\n`;
+ return `${header}${entry.content || ''}\n\n`;
+ }).join('\n');
+ }
+};
+
+/**
+ * Amazon Vine Template
+ * Specific formatting for product reviews.
+ */
+export const template_amazon_vine: ExportTemplate = {
+ id: 'amazon_vine',
+ name: 'Amazon Vine',
+ description: 'Optimized for product reviews.',
+ extension: 'md',
+ formatter: (entries) => {
+ return entries.map(entry => {
+ const dateStr = ae_util.iso_datetime_formatter(entry.created_on, 'date_iso');
+ // Try to find a product name in the title or content
+ const productName = entry.name || 'Unknown Product';
+
+ // Look for product link in content_json or tags if available,
+ // otherwise just output content
+ let output = `## ${productName}\n`;
+ output += `*Date: ${dateStr}*\n\n`;
+ output += `${entry.content || ''}\n\n`;
+ output += `---`;
+ return output;
+ }).join('\n\n');
+ }
+};
+
+/**
+ * Standard HTML Template
+ */
+export const template_standard_html: ExportTemplate = {
+ id: 'standard_html',
+ name: 'Standard HTML',
+ description: 'Semantic HTML5 articles.',
+ extension: 'html',
+ formatter: (entries) => {
+ const body = entries.map(entry => {
+ const dateStr = ae_util.iso_datetime_formatter(entry.created_on, 'datetime_12_long');
+ const title = entry.name || dateStr;
+ return `
+${title}
+
+
+
You must be logged in as the owner to view this Journal.
diff --git a/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte b/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte index 46a547a1..af1d1b27 100644 --- a/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte +++ b/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte @@ -325,6 +325,7 @@