Skip to content

Commit 2beebcc

Browse files
committed
Release v1.5.0 - PCM package ready
Features: - Fab Summary Import with section selection dialog - Image paste support (Ctrl+V) with .kinotes/images/ storage - Per-module debug system for troubleshooting Changes: - Updated version to 1.5.0 in all locations - Created CHANGELOG.md following Keep a Changelog format - Added PCM build script (build_pcm_package.py) - Disabled DEBUG_ENABLED for production - Improved README with badges and installation instructions Technical: - Added ImageHandler for clipboard/file image management - Added FormatStore for markdown round-trip preservation - Added FabImportDialog for section selection - Refactored metadata extraction to reduce code duplication - Enhanced PDF export with image support
1 parent fa70216 commit 2beebcc

22 files changed

Lines changed: 1675 additions & 145 deletions

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,26 @@
55
dist/
66
build/
77
*.egg-info/
8+
*.zip
89

910
# Python
1011
__pycache__/
1112
*.py[cod]
1213
*.pyo
14+
*.pyd
1315

1416
# Virtual environments
1517
venv/
1618
env/
1719
ENV/
1820
.env
21+
.venv/
1922

2023
# IDEs
2124
.vscode/
2225
.idea/
26+
*.swp
27+
*.swo
2328

2429
# GitHub and development instructions
2530
.github/copilot-instructions.md
@@ -43,4 +48,8 @@ test_*.py
4348
# macOS / Windows
4449
.DS_Store
4550
Thumbs.db
51+
desktop.ini
52+
53+
# Logs
54+
*.log
4655

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Changelog
2+
3+
All notable changes to KiNotes will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.5.0] - 2025-06-17
9+
10+
### Added
11+
- **Fab Summary Import**: One-click import of board fabrication info with section selection dialog
12+
- Board finish (ENIG, castellated holes, edge plating)
13+
- Track analysis (actual min/max widths and vias on board)
14+
- Fab capability checklist for easy quoting
15+
- **Image Paste Support**: Ctrl+V to paste images from clipboard into notes
16+
- Images saved to `.kinotes/images/` folder
17+
- Automatic file naming with timestamps
18+
- **Per-Module Debug System**: Granular debug logging for troubleshooting
19+
- **Fab Import Selection Dialog**: Choose which sections to import (board size, layers, drill table, etc.)
20+
21+
### Changed
22+
- Improved PDF export with better formatting
23+
- Refactored metadata extraction to reuse existing methods (reduced code duplication)
24+
- Enhanced visual editor paste handling
25+
26+
### Fixed
27+
- Visual editor theme color application to existing text
28+
- Settings dialog attribute reference (`_settings``_dark_mode`)
29+
30+
## [1.4.2] - 2025-05-15
31+
32+
### Added
33+
- Time tracking with session history and work diary export
34+
- Visual editor with rich text formatting (bold, italic, lists, headings)
35+
- Smart-Link for nets (beta): Click net names to highlight traces
36+
- BOM tab for Bill of Materials generation
37+
- Version log tab for design revision tracking
38+
39+
### Changed
40+
- Improved dark/light theme consistency
41+
- Better DPI scaling for high-resolution displays
42+
43+
### Fixed
44+
- Crash safety system for recovery after unexpected closures
45+
- Module reloading for development workflow
46+
47+
## [1.4.0] - 2025-04-20
48+
49+
### Added
50+
- Smart-Link designator linking: Click R1, C5, U3 → highlight on PCB
51+
- Markdown editor mode (toggle between visual and raw)
52+
- Auto-save on every change
53+
- Import board metadata (BOM, stackup, netlist, layers, diff pairs)
54+
- PDF export functionality
55+
56+
### Changed
57+
- Migrated to modular architecture (small, focused files)
58+
- Settings moved to `.kinotes/settings.json`
59+
60+
## [1.3.0] - 2025-03-10
61+
62+
### Added
63+
- Todo list with task completion tracking
64+
- Dark/Light theme support
65+
- Custom color schemes
66+
67+
### Changed
68+
- Notes stored in `.kinotes/` folder alongside project
69+
70+
## [1.0.0] - 2025-02-01
71+
72+
### Added
73+
- Initial release
74+
- Basic notes editor for KiCad 9.0+
75+
- Project-local storage in Markdown format
76+
- Toolbar integration in pcbnew
77+
78+
---
79+
80+
[1.5.0]: https://github.com/way2pramil/KiNotes/releases/tag/v1.5.0
81+
[1.4.2]: https://github.com/way2pramil/KiNotes/releases/tag/v1.4.2
82+
[1.4.0]: https://github.com/way2pramil/KiNotes/releases/tag/v1.4.0
83+
[1.3.0]: https://github.com/way2pramil/KiNotes/releases/tag/v1.3.0
84+
[1.0.0]: https://github.com/way2pramil/KiNotes/releases/tag/v1.0.0

KiNotes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
try:
2222
from .__version__ import __version__
2323
except ImportError:
24-
__version__ = "1.4.2" # Fallback
24+
__version__ = "1.5.0" # Fallback
2525

2626
__author__ = "PCBtools.xyz"
2727
__license__ = "MIT"

KiNotes/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99
import json
1010

11-
__version__ = "1.4.2"
11+
__version__ = "1.5.0"
1212
__author__ = "PCBtools.xyz"
1313
__license__ = "MIT"
1414

KiNotes/core/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
from .designator_linker import DesignatorLinker
44
from .metadata_extractor import MetadataExtractor
55
from .pdf_exporter import PDFExporter
6+
from .image_handler import ImageHandler, get_clipboard_image, is_clipboard_image
67

7-
__all__ = ['NotesManager', 'DesignatorLinker', 'MetadataExtractor', 'PDFExporter']
8+
__all__ = [
9+
'NotesManager', 'DesignatorLinker', 'MetadataExtractor', 'PDFExporter',
10+
'ImageHandler', 'get_clipboard_image', 'is_clipboard_image'
11+
]

KiNotes/core/defaultsConfig.py

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
'autosave_interval': 5, # seconds (min: 3, max: 60)
3535
'font_size': 11, # points (8-24)
3636
'pdf_format': 'markdown', # 'markdown' or 'visual'
37+
'ui_scale_factor': 1.25, # UI scale (1.25 = 125%, most stable)
3738

3839
# Theme
3940
'dark_mode': False,
@@ -74,8 +75,8 @@
7475
# ============================================================
7576
# DEBUG SETTINGS - Console output control
7677
# ============================================================
77-
DEBUG_ENABLED = True # Master debug flag - set True for development only
78-
DEPLOY_BUILD = 11 # Incremented by deploy script - verifies fresh deployment
78+
DEBUG_ENABLED = False # Master debug flag - set True for development only
79+
DEPLOY_BUILD = 33 # Incremented by deploy script - verifies fresh deployment
7980

8081
def debug_print(msg: str) -> None:
8182
"""Print debug message only if DEBUG_ENABLED is True."""
@@ -150,6 +151,19 @@ def debug_print(msg: str) -> None:
150151
'padding_bottom': 4, # Bottom gap
151152
}
152153

154+
# ============================================================
155+
# IMAGE HANDLING DEFAULTS
156+
# ============================================================
157+
IMAGE_DEFAULTS = {
158+
'folder_name': 'images', # Subfolder in .kinotes/
159+
'max_size_kb': 2048, # Max image size (2MB)
160+
'max_dimension': 1920, # Max width/height (resize if larger)
161+
'thumbnail_size': 400, # Display size in editor
162+
'supported_formats': ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp'],
163+
'default_format': 'png', # Save format for clipboard images
164+
'quality': 85, # JPEG quality (1-100)
165+
}
166+
153167
# ============================================================
154168
# DESIGNATOR PREFIXES (IEEE 315 / Industry Standard)
155169
# ============================================================
@@ -289,13 +303,44 @@ def debug_print(msg: str) -> None:
289303
# ============================================================
290304
# DEBUG MODULES - Default states
291305
# ============================================================
306+
# Set True to enable debug output for specific modules
307+
# This allows focused debugging without console spam
292308
DEBUG_MODULES = {
293-
'save': False,
294-
'net': False,
295-
'designator': False,
309+
# Core modules
310+
'image': True, # Image handler - paste, save, load
311+
'pdf': True, # PDF export
312+
'md_export': True, # Markdown export (RichText → MD)
313+
'md_import': True, # Markdown import (MD → RichText)
314+
315+
# UI modules
316+
'save': False, # Save operations
317+
'click': False, # Click events
318+
'size': False, # Window sizing
319+
'editor': False, # Visual editor operations
320+
321+
# Crossprobe
322+
'net': False, # Net linker
323+
'designator': False, # Designator linker
296324
}
297325

298326

327+
def debug_module(module: str, msg: str) -> None:
328+
"""
329+
Print debug message only if module is enabled.
330+
331+
Usage:
332+
debug_module('image', f"Saved: {filename}")
333+
debug_module('pdf', f"Exporting to: {path}")
334+
335+
Args:
336+
module: Module key from DEBUG_MODULES
337+
msg: Message to print (without [KiNotes] prefix)
338+
"""
339+
if DEBUG_ENABLED and DEBUG_MODULES.get(module, False):
340+
prefix = module.upper()
341+
print(f"[KiNotes {prefix}] {msg}")
342+
343+
299344
# ============================================================
300345
# HELPER FUNCTIONS
301346
# ============================================================
@@ -336,3 +381,24 @@ def get_version_log_template() -> dict:
336381

337382

338383

384+
385+
386+
387+
388+
389+
390+
391+
392+
393+
394+
395+
396+
397+
398+
399+
400+
401+
402+
403+
404+

0 commit comments

Comments
 (0)