From 72fbf73f050e6b5c95678e14bc44470430158459 Mon Sep 17 00:00:00 2001 From: amitwh Date: Mon, 1 Sep 2025 20:03:36 +0530 Subject: [PATCH 1/3] Update About dialog to version 1.2.0 with new features list --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 0e556e7..e82a5ca 100644 --- a/src/main.js +++ b/src/main.js @@ -178,7 +178,7 @@ function createMenu() { type: 'info', title: 'About PanConverter', message: 'PanConverter', - detail: 'A cross-platform Markdown editor and converter using Pandoc.\n\nVersion: 1.1.0\nAuthor: Amit Haridas\nEmail: amit.wh@gmail.com\nLicense: MIT\n\nFeatures:\n• Markdown editing with live preview\n• Export to multiple formats via Pandoc\n• Export tables to Excel/ODS spreadsheets\n• Multiple themes support', + detail: 'A cross-platform Markdown editor and converter using Pandoc.\n\nVersion: 1.2.0\nAuthor: Amit Haridas\nEmail: amit.wh@gmail.com\nLicense: MIT\n\nFeatures:\n• Markdown editing with live preview\n• Export to multiple formats via Pandoc\n• Export tables to Excel/ODS spreadsheets\n• PowerPoint & presentation export\n• Document import & conversion\n• Table creation helper\n• Multiple themes support', buttons: ['OK'] }); } From 1e585afb7ec2df933b202bf300abc4b68c1435a6 Mon Sep 17 00:00:00 2001 From: amitwh Date: Mon, 1 Sep 2025 20:07:47 +0530 Subject: [PATCH 2/3] Update README.md with v1.2.0 features and remove CLAUDE.md --- CLAUDE.md | 219 ------------------------------------------------------ README.md | 82 ++++++++++++++++---- 2 files changed, 68 insertions(+), 233 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 719f484..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,219 +0,0 @@ -# PanConverter - -## Overview -PanConverter is a cross-platform desktop application for editing and converting Markdown files using Pandoc. It features a rich markdown editor with live preview, multiple themes, and comprehensive support for exporting to various document formats. - -## Features -- **Markdown Editor**: Full-featured editor with syntax highlighting and toolbar -- **Live Preview**: Real-time preview of your markdown content -- **Multiple Themes**: Light, Dark, Solarized, Monokai, and GitHub themes -- **Document Export**: Export to HTML, PDF, 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 -- **Document Import & Conversion**: Import various document formats and convert between formats via Pandoc -- **Table Creation Helper**: Built-in table generator for easy markdown table creation -- **Cross-Platform**: Runs on Windows, macOS, and Linux -- **Auto-Save**: Automatic saving every 30 seconds - -## Requirements -- **Pandoc**: Must be installed on the system for export functionality - - Ubuntu/Debian: `sudo apt-get install pandoc` - - macOS: `brew install pandoc` - - Windows: Download from https://pandoc.org/installing.html - -## Development Setup - -### Prerequisites -- Node.js (v14 or higher) -- npm or yarn -- Pandoc (for export features) - -### Installation -```bash -# Clone the repository -git clone -cd pan-converter - -# Install dependencies -npm install - -# Generate icons -npm run generate-icons - -# Start the application -npm start -``` - -## Building - -### Build for Current Platform -```bash -npm run build -``` - -### Build for Specific Platforms -```bash -# Windows -npm run build:win - -# macOS -npm run build:mac - -# Linux (generates .deb, .AppImage, and .snap) -npm run build:linux -``` - -### Build for All Platforms -```bash -npm run dist:all -``` - -## Project Structure -``` -pan-converter/ -├── src/ -│ ├── main.js # Main process -│ ├── renderer.js # Renderer process -│ ├── index.html # Main window HTML -│ └── styles.css # Application styles -├── assets/ -│ ├── icon.svg # Source icon -│ └── icon.png # Generated icons -├── scripts/ -│ └── generate-icons.js # Icon generation script -├── package.json # Project configuration -└── CLAUDE.md # This file -``` - -## Architecture - -### Main Process (`src/main.js`) -- Manages application lifecycle -- Creates and manages windows -- Handles file operations -- Manages menu bar -- Communicates with renderer via IPC - -### Renderer Process (`src/renderer.js`) -- Handles UI interactions -- Manages editor state -- Renders markdown preview -- Handles theme switching -- Communicates with main process via IPC - -### Key Libraries -- **Electron**: Desktop application framework -- **marked**: Markdown parsing -- **highlight.js**: Syntax highlighting -- **DOMPurify**: HTML sanitization -- **XLSX**: Spreadsheet generation for Excel/ODS export -- **electron-builder**: Application packaging -- **Custom Storage**: File-based storage system for settings persistence - -## Features Implementation - -### Markdown Editor -- Uses native textarea with custom styling -- Supports common markdown shortcuts via toolbar -- Tab key inserts 4 spaces for code indentation -- Auto-save every 30 seconds when content changes - -### Live Preview -- Updates in real-time as you type -- Sanitized HTML output for security -- Syntax highlighting for code blocks -- GitHub-flavored markdown support - -### Theme System -- Themes stored in user preferences -- Applied via CSS classes on body element -- Persists across application restarts -- Five built-in themes - -### Export System -- Uses Pandoc command-line tool for document exports -- Supports multiple output formats (HTML, PDF, DOCX, LaTeX, RTF, ODT, EPUB, PPTX, ODP) -- Spreadsheet export using XLSX library for table data -- Import functionality for converting documents to markdown -- Maintains original file structure -- Shows error messages if Pandoc not installed - -### Table Creation Helper -- Interactive table generator in toolbar -- Prompts for row and column count -- Generates properly formatted markdown tables -- Includes headers and separator rows -- Automatically inserts at cursor position - -### Document Conversion Menu -- Separate Convert menu for cross-format operations -- Import documents from various formats to markdown -- Convert current file to different formats -- Supports presentations with proper slide-level formatting -- Error handling for missing Pandoc installation - -## Platform-Specific Branches - -The repository maintains separate branches for platform-specific customizations: -- `master`: Main development branch -- `linux`: Linux-specific configurations -- `macos`: macOS-specific configurations -- `windows`: Windows-specific configurations - -## Debian Package - -The application can be built as a `.deb` package for Debian-based systems: -```bash -npm run build:linux -``` - -The generated `.deb` file will: -- Install to `/opt/pan-converter` -- Create desktop entry for application menu -- Set up proper file associations -- Declare Pandoc as dependency - -## Testing - -### Manual Testing -1. File Operations: New, Open, Save, Save As -2. Editor Features: Bold, Italic, Headings, Links, Code, Lists, Quotes, Table Creation -3. Preview Toggle: Show/hide preview pane -4. Theme Switching: Test all five themes -5. Export Functions: Test each export format including PowerPoint and spreadsheets -6. Import/Conversion: Test document import and format conversion -7. Table Helper: Test table generation with different row/column counts -8. Auto-save: Verify 30-second auto-save works - -### Platform Testing -Test on: -- Windows 10/11 -- macOS 11+ (Big Sur and later) -- Ubuntu 20.04+, Debian 11+ - -## Known Issues -- ICO and ICNS icons need manual conversion from PNG -- Pandoc must be installed separately for all export functionality -- Large files may cause performance issues -- AppImage requires --no-sandbox flag on some systems -- Windows/Mac builds require platform-specific build environments - -## Version History -- **v1.2.0**: Added PowerPoint export, document conversion menu, table creation helper, spreadsheet export -- **v1.1.0**: Added Excel/ODS spreadsheet export, updated author information, renamed to PanConverter -- **v1.0.0**: Initial release with basic markdown editing, themes, and Pandoc export - -## Future Enhancements -- [ ] Add spell checking -- [ ] Implement find and replace -- [ ] Add custom CSS for preview -- [ ] Support for markdown extensions -- [ ] Plugin system for custom exporters -- [ ] Cloud sync capabilities -- [ ] Collaborative editing -- [ ] Improved table editing interface - -## License -MIT License - -## Support -For issues or feature requests, please open an issue on the GitHub repository. \ No newline at end of file diff --git a/README.md b/README.md index b7273e3..8d6adb5 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,40 @@ -# Pan Converter +# PanConverter A cross-platform Markdown editor and converter powered by Pandoc. -![Pan Converter](assets/icon.png) +![PanConverter](assets/icon.png) ## Features -- 📝 **Rich Markdown Editor** - Full-featured editor with syntax highlighting +- 📝 **Rich Markdown Editor** - Full-featured editor with syntax highlighting and toolbar - 👁️ **Live Preview** - See your markdown rendered in real-time - 🎨 **Multiple Themes** - Choose from Light, Dark, Solarized, Monokai, or GitHub themes -- 📤 **Export to Multiple Formats** - Convert to HTML, PDF, DOCX, LaTeX, RTF, ODT, and EPUB -- 💾 **Auto-Save** - Never lose your work with automatic saving +- 📤 **Document Export** - Convert to HTML, PDF, 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 +- 📥 **Document Import & Conversion** - Import various document formats and convert between formats via Pandoc +- 📋 **Table Creation Helper** - Built-in table generator for easy markdown table creation +- 💾 **Auto-Save** - Never lose your work with automatic saving every 30 seconds - 🖥️ **Cross-Platform** - Works on Windows, macOS, and Linux ## Installation ### Prerequisites - [Pandoc](https://pandoc.org/installing.html) must be installed for export functionality + - **Ubuntu/Debian**: `sudo apt-get install pandoc` + - **macOS**: `brew install pandoc` + - **Windows**: Download installer from Pandoc website ### Download -Download the latest release for your platform from the [Releases](https://github.com/yourusername/pan-converter/releases) page. +Download the latest release for your platform from the [Releases](https://github.com/amitwh/pan-converter/releases) page. + +#### Linux +- **AppImage**: `PanConverter-1.2.0.AppImage` (universal, may require `--no-sandbox` flag) +- **Debian Package**: `pan-converter_1.2.0_amd64.deb` +- **Snap Package**: `pan-converter_1.2.0_amd64.snap` ### Install from Source ```bash -git clone https://github.com/yourusername/pan-converter.git +git clone https://github.com/amitwh/pan-converter.git cd pan-converter npm install npm start @@ -31,10 +42,26 @@ npm start ## Usage +### Basic Workflow 1. **Write** - Use the editor to write your Markdown content 2. **Preview** - Toggle the preview pane to see rendered output 3. **Theme** - Choose your preferred theme from the View menu -4. **Export** - Export your document to various formats via File > Export +4. **Export** - Export your document to various formats + +### Export Options +- **Documents**: HTML, PDF, DOCX, LaTeX, RTF, ODT, EPUB +- **Presentations**: PowerPoint (PPTX), OpenDocument Presentation (ODP) +- **Spreadsheets**: Excel (XLSX/XLS), OpenDocument Spreadsheet (ODS) + +### Import & Conversion +- **Import Documents**: Convert DOCX, ODT, RTF, HTML, PDF, and presentation files to Markdown +- **Cross-Format Conversion**: Convert current file between multiple formats +- **Smart Presentation Handling**: Automatic slide-level formatting for PPTX/ODP exports + +### Table Creation +- Click the table button in the toolbar +- Specify number of rows and columns +- Automatically generates properly formatted Markdown tables ## Keyboard Shortcuts @@ -42,34 +69,61 @@ npm start - `Ctrl/Cmd + O` - Open file - `Ctrl/Cmd + S` - Save file - `Ctrl/Cmd + Shift + S` - Save as +- `Ctrl/Cmd + I` - Import document - `Ctrl/Cmd + P` - Toggle preview - `Ctrl/Cmd + Enter` - Toggle preview (alternative) +- `Tab` - Insert 4 spaces (in editor) ## Building ```bash +# Install dependencies +npm install + +# Generate icons +npm run generate-icons + # Build for current platform npm run build # Build for specific platform -npm run build:win -npm run build:mac -npm run build:linux +npm run build:win # Windows +npm run build:mac # macOS +npm run build:linux # Linux (generates .deb, .AppImage, and .snap) # Build for all platforms npm run dist:all ``` +## Version History + +- **v1.2.0** - Added PowerPoint export, document conversion menu, table creation helper, spreadsheet export +- **v1.1.0** - Added Excel/ODS spreadsheet export, updated author information, renamed to PanConverter +- **v1.0.0** - Initial release with basic markdown editing, themes, and Pandoc export + +## Known Issues + +- AppImage may require `--no-sandbox` flag on some Linux systems +- Windows/Mac builds require platform-specific build environments +- Large files may cause performance issues + ## Contributing -Contributions are welcome! Please feel free to submit a Pull Request. +Contributions are welcome! Please feel free to submit a Pull Request to the [GitHub repository](https://github.com/amitwh/pan-converter). ## License -MIT License - see LICENSE file for details +MIT License - see LICENSE file for details. + +## Author + +**Amit Haridas** - [amit.wh@gmail.com](mailto:amit.wh@gmail.com) ## Acknowledgments - Built with [Electron](https://www.electronjs.org/) - Markdown parsing by [marked](https://marked.js.org/) -- Export functionality powered by [Pandoc](https://pandoc.org/) \ No newline at end of file +- Export functionality powered by [Pandoc](https://pandoc.org/) +- Syntax highlighting by [highlight.js](https://highlightjs.org/) +- Spreadsheet export by [XLSX](https://www.npmjs.com/package/xlsx) +- HTML sanitization by [DOMPurify](https://www.npmjs.com/package/dompurify) \ No newline at end of file From 32fa6719cf4b7bb9630a1b4b1529125c6bbcf7a6 Mon Sep 17 00:00:00 2001 From: amitwh Date: Mon, 1 Sep 2025 20:54:47 +0530 Subject: [PATCH 3/3] Update README.md for v1.3.0 with tabbed interface and enhanced PDF export features --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5224945..1d04030 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,14 @@ A cross-platform Markdown editor and converter powered by Pandoc. ## Features ### ✨ Advanced Markdown Editor +- 🗂️ **Tabbed Interface** - Work with multiple files simultaneously in separate tabs - 📝 **Rich Text Editor** - Full-featured editor with syntax highlighting and comprehensive toolbar - 🔍 **Find & Replace** - Powerful search and replace with match highlighting and navigation - 🔢 **Line Numbers** - Toggle line numbers for easier code editing and navigation - ↩️ **Smart Auto-Indentation** - Automatic list continuation and intelligent indentation - ⏪ **Undo/Redo** - Full undo/redo support with keyboard shortcuts - ⌨️ **Advanced Shortcuts** - Tab indentation, line selection, and smart text formatting +- 📂 **File Association Support** - Open markdown files directly from file manager ### 🎨 Themes & Interface - 👁️ **Live Preview** - See your markdown rendered in real-time with synchronized scrolling @@ -20,9 +22,10 @@ A cross-platform Markdown editor and converter powered by Pandoc. - 💾 **Auto-Save** - Never lose your work with automatic saving every 30 seconds ### 📤 Export & Conversion -- 📄 **Document Export** - Convert to HTML, PDF, DOCX, LaTeX, RTF, ODT, EPUB, PowerPoint (PPTX), and OpenDocument Presentation (ODP) +- 📄 **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 -- 📥 **Document Import & Conversion** - Import various document formats and convert between formats via Pandoc +- 📥 **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 ### 🖥️ Platform Support @@ -36,13 +39,20 @@ A cross-platform Markdown editor and converter powered by Pandoc. - **macOS**: `brew install pandoc` - **Windows**: Download installer from Pandoc website +### PDF Export Requirements +For optimal PDF export, install a LaTeX engine (recommended): +- **Ubuntu/Debian**: `sudo apt-get install texlive-xetex texlive-latex-base` +- **macOS**: `brew install --cask mactex` +- **Windows**: Install MiKTeX or TeX Live +- **Alternative**: `sudo apt-get install wkhtmltopdf` (fallback option) + ### Download Download the latest release for your platform from the [Releases](https://github.com/amitwh/pan-converter/releases) page. #### Linux -- **AppImage**: `PanConverter-1.2.1.AppImage` (universal, may require `--no-sandbox` flag) -- **Debian Package**: `pan-converter_1.2.1_amd64.deb` -- **Snap Package**: `pan-converter_1.2.1_amd64.snap` +- **AppImage**: `PanConverter-1.3.0.AppImage` (universal, may require `--no-sandbox` flag) +- **Debian Package**: `pan-converter_1.3.0_amd64.deb` +- **Snap Package**: `pan-converter_1.3.0_amd64.snap` ### Install from Source ```bash @@ -78,7 +88,10 @@ npm start ## Keyboard Shortcuts ### File Operations -- `Ctrl/Cmd + N` - New file +- `Ctrl/Cmd + N` - New file/tab +- `Ctrl/Cmd + T` - New tab +- `Ctrl/Cmd + W` - Close current tab +- `Ctrl/Cmd + Tab` - Switch to next tab - `Ctrl/Cmd + O` - Open file - `Ctrl/Cmd + S` - Save file - `Ctrl/Cmd + Shift + S` - Save as @@ -120,6 +133,7 @@ npm run dist:all ## Version History +- **v1.3.0** - Major update: Tabbed interface for multiple files, enhanced PDF export with LaTeX engines, fixed file associations, removed redundant converter menu, improved UI architecture - **v1.2.1** - Comprehensive editor enhancements: Find & Replace, Line Numbers, Undo/Redo, Auto-indentation, PowerPoint export, document conversion menu, table creation helper, spreadsheet export - **v1.1.0** - Added Excel/ODS spreadsheet export, updated author information, renamed to PanConverter - **v1.0.0** - Initial release with basic markdown editing, themes, and Pandoc export