diff --git a/CLAUDE.md b/CLAUDE.md index 7fc61b5..a86f413 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ **PanConverter** is a cross-platform Markdown editor and converter powered by Pandoc, built with Electron. It provides professional-grade editing capabilities with comprehensive export options. -**Current Version**: v1.4.0 +**Current Version**: v1.5.0 **Author**: Amit Haridas (amit.wh@gmail.com) **License**: MIT **Repository**: https://github.com/amitwh/pan-converter @@ -13,10 +13,10 @@ ### Core Technologies - **Electron** - Cross-platform desktop application framework -- **Pandoc** - Universal document converter (required dependency) +- **Pandoc** - Universal document converter (required system dependency) - **marked** - Markdown parsing and rendering - **highlight.js** - Syntax highlighting -- **XLSX** - Spreadsheet export functionality +- **KaTeX** - Mathematical expression rendering - **DOMPurify** - HTML sanitization ### Application Structure @@ -109,7 +109,48 @@ gh release create v1.2.1 --title "Title" --notes "Release notes" \ ## Feature Implementation Guide -### v1.4.0 Advanced Export & Batch Processing (Latest) +### v1.5.0 Enhanced Features & Open Source Compatibility (Latest) + +#### 🔧 Export Function Fixes & Optional Advanced Options +**Export Dialog Enhancement** (`src/index.html:125-133`, `src/renderer.js:960-985`) +- Fixed export function issues after advanced export options integration +- Added optional advanced export options via checkbox toggle (unchecked by default) +- Basic export options always visible, advanced options hidden until enabled +- Clean UI separation between simple and advanced export workflows + +#### 🏗️ Open Source Compatibility & Dependency Removal +**Removed Proprietary Dependencies** (`src/main.js:430-450`, `package.json:32-37`) +- Removed bundled Pandoc binaries - now requires system-installed Pandoc +- Replaced proprietary XLSX dependency with open-source CSV export +- Removed non-essential bundled binaries to ensure open-source compatibility +- Updated export functions to use system Pandoc installation + +#### ✨ Advanced User Experience Features +**Auto-Save System** (`src/renderer.js:445-484`) +- Automatic saving every 30 seconds with visual indicators +- Smooth slide-in animation for auto-save notifications +- Prevents data loss during extended editing sessions +- Integrated with file opening and tab creation workflows + +**Enhanced Document Statistics** (`src/renderer.js:385-444`) +- Comprehensive statistics: words, characters, lines, paragraphs, sentences +- Estimated reading time calculation (200 words per minute) +- Real-time updates as user types +- Professional presentation in status bar + +**Recent Files Management** (`src/main.js:69-114`, `src/renderer.js:487-512`) +- Recent files menu with last 10 opened files +- Persistent storage via localStorage and user data directory +- Menu integration with File > Recent Files submenu +- Clear recent files functionality with menu rebuild + +**Mathematical Expression Support** (`src/renderer.js:1099-1130`, `src/renderer.js:292-306`) +- KaTeX integration for rendering mathematical expressions +- Support for multiple delimiters: $$, $, \\[\\], \\(\\) +- Real-time math rendering in preview pane +- Fallback handling for missing KaTeX library + +### v1.4.0 Advanced Export & Batch Processing #### 🔧 Fixed File Association Support **File Loading Fix** (`src/main.js:385-390`, `src/renderer.js:485-486`) @@ -377,5 +418,5 @@ gh release create v1.2.1 --title "Title" --notes "Release notes" \ --- -**Last Updated**: September 14, 2025 -**Claude Assistant**: Development completed for v1.4.0 with fixed file associations, advanced export options with templates and metadata, batch file conversion system, and enhanced UI components. \ No newline at end of file +**Last Updated**: September 15, 2025 +**Claude Assistant**: Development completed for v1.5.0 with optional advanced export options, removed proprietary dependencies for open-source compatibility, enhanced auto-save functionality, comprehensive document statistics, recent files management, and mathematical expression support using KaTeX. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1d0db01 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Amit Haridas + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 81c6419..a0306d8 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,14 @@ A cross-platform Markdown editor and converter powered by Pandoc. - 👁️ **Live Preview** - See your markdown rendered in real-time with synchronized scrolling - 🎨 **Multiple Themes** - Choose from Light, Dark, Solarized, Monokai, or GitHub themes - 💾 **Auto-Save** - Never lose your work with automatic saving every 30 seconds +- 📊 **Enhanced Statistics** - Detailed document statistics including word count, character count, lines, paragraphs, sentences, and estimated reading time +- 🕒 **Recent Files** - Quick access to recently opened files via File menu +- 🧮 **Math Support** - Render mathematical expressions using KaTeX (supports $$, $, \\[\\], \\(\\) delimiters) ### 📤 Export & Conversion - 📄 **Enhanced PDF Export** - Robust PDF generation with multiple LaTeX engine fallbacks (XeLaTeX, PDFLaTeX, wkhtmltopdf) - 📄 **Document Export** - Convert to HTML, DOCX, LaTeX, RTF, ODT, EPUB, PowerPoint (PPTX), and OpenDocument Presentation (ODP) -- 📊 **Spreadsheet Export** - Export markdown tables to Excel (XLSX/XLS) and OpenDocument Spreadsheet (ODS) formats +- 📊 **Spreadsheet Export** - Export markdown tables to CSV format for compatibility with any spreadsheet application - 📥 **Document Import** - Import DOCX, ODT, RTF, HTML, PDF, and presentation files to markdown - 📋 **Table Creation Helper** - Built-in table generator for easy markdown table creation @@ -50,9 +53,9 @@ For optimal PDF export, install a LaTeX engine (recommended): Download the latest release for your platform from the [Releases](https://github.com/amitwh/pan-converter/releases) page. #### Linux -- **AppImage**: `PanConverter-1.3.1.AppImage` (universal, may require `--no-sandbox` flag) -- **Debian Package**: `pan-converter_1.3.1_amd64.deb` -- **Snap Package**: `pan-converter_1.3.1_amd64.snap` +- **AppImage**: `PanConverter-1.5.0.AppImage` (universal, may require `--no-sandbox` flag) +- **Debian Package**: `pan-converter_1.5.0_amd64.deb` +- **Snap Package**: `pan-converter_1.5.0_amd64.snap` ### Install from Source ```bash @@ -73,7 +76,9 @@ npm start ### Export Options - **Documents**: HTML, PDF, DOCX, LaTeX, RTF, ODT, EPUB - **Presentations**: PowerPoint (PPTX), OpenDocument Presentation (ODP) -- **Spreadsheets**: Excel (XLSX/XLS), OpenDocument Spreadsheet (ODS) +- **Spreadsheets**: CSV format for tables (compatible with Excel, LibreOffice, Google Sheets) +- **Advanced Export Options**: Optional template support, metadata insertion, table of contents, section numbering, and PDF-specific settings +- **Batch Conversion**: Convert entire folders of markdown files with progress tracking ### Import & Conversion - **Import Documents**: Convert DOCX, ODT, RTF, HTML, PDF, and presentation files to Markdown diff --git a/assets/icon-proper.ico b/assets/icon-proper.ico new file mode 100644 index 0000000..46ffe19 Binary files /dev/null and b/assets/icon-proper.ico differ diff --git a/assets/icon.icns b/assets/icon.icns new file mode 100644 index 0000000..68324cd Binary files /dev/null and b/assets/icon.icns differ diff --git a/assets/icon.ico b/assets/icon.ico new file mode 100644 index 0000000..5743ec5 Binary files /dev/null and b/assets/icon.ico differ diff --git a/package.json b/package.json index d2bac07..cc9d9d6 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "pan-converter", - "version": "1.4.0", + "version": "1.5.0", "description": "Cross-platform Markdown editor and converter using Pandoc", "main": "src/main.js", "scripts": { "start": "electron .", "test": "echo \"Error: no test specified\" && exit 1", "build": "electron-builder", - "build:win": "electron-builder --win", + "build:win": "cross-env CSC_LINK=code-signing-cert.pfx CSC_KEY_PASSWORD=PanConverter2024! electron-builder --win", + "build:win-unsigned": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --win", "build:mac": "electron-builder --mac", "build:linux": "electron-builder --linux", "dist": "electron-builder --publish=never", @@ -23,6 +24,7 @@ "author": "Amit Haridas ", "license": "MIT", "devDependencies": { + "cross-env": "^10.0.0", "electron": "^37.4.0", "electron-builder": "^26.0.12", "sharp": "^0.34.3" @@ -32,8 +34,7 @@ "dompurify": "^3.2.6", "electron-store": "^10.1.0", "highlight.js": "^11.11.1", - "marked": "^16.2.1", - "xlsx": "^0.18.5" + "marked": "^16.2.1" }, "build": { "appId": "com.panconverter.app", @@ -58,7 +59,7 @@ { "ext": "markdown", "name": "Markdown Document", - "description": "Markdown Document", + "description": "Markdown Document", "mimeType": "text/markdown", "role": "Editor" } @@ -68,8 +69,43 @@ "icon": "assets/icon.icns" }, "win": { - "target": "nsis", - "icon": "assets/icon.ico" + "target": [ + { + "target": "nsis", + "arch": ["x64"] + }, + { + "target": "portable", + "arch": ["x64"] + }, + { + "target": "zip", + "arch": ["x64"] + } + ], + "icon": "assets/icon.png", + "artifactName": "${productName}-${version}-${arch}.${ext}", + "requestedExecutionLevel": "asInvoker", + "signAndEditExecutable": true + }, + "nsis": { + "oneClick": false, + "perMachine": false, + "allowToChangeInstallationDirectory": true, + "displayLanguageSelector": true, + "installerIcon": "assets/icon-proper.ico", + "uninstallerIcon": "assets/icon-proper.ico", + "installerHeaderIcon": "assets/icon-proper.ico", + "createDesktopShortcut": true, + "createStartMenuShortcut": true, + "shortcutName": "PanConverter", + "runAfterFinish": true, + "menuCategory": "Productivity", + "license": "LICENSE", + "warningsAsErrors": false, + "artifactName": "${productName}-Setup-${version}.${ext}", + "deleteAppDataOnUninstall": false, + "differentialPackage": true }, "linux": { "target": [ diff --git a/src/index.html b/src/index.html index e597527..4f81251 100644 --- a/src/index.html +++ b/src/index.html @@ -122,8 +122,20 @@
-
- + +
+ + Enable for templates, metadata, bibliography, and advanced PDF settings +
+ + +