markitect-main/markitect
tegwick 3a353b4d4f feat: implement comprehensive asset shipping for md-render command
Add automatic asset copying when rendering markdown to different output
directories with intelligent defaults and full user control.

Key Features:
- Environment variable support: MARKITECT_OUTPUT_DIR sets default output directory
- Smart defaults: auto-ship assets for directory output, disabled for file output
- CLI control flags: --ship-assets and --no-ship-assets for explicit control
- Timestamp-based copying: only copies when source newer than destination
- Path preservation: maintains relative directory structure in output
- Graceful error handling: missing assets logged as warnings, not failures

Technical Implementation:
- Enhanced asset discovery in markitect/assets/discovery.py with discover_assets_from_markdown()
- Added environment variable priority: CLI --output > MARKITECT_OUTPUT_DIR > input directory
- Comprehensive asset shipping logic with _ship_assets() function
- Directory vs file output detection for intelligent default behavior

Examples and Testing:
- Added image-assets example directory with 6 sample images and comprehensive README
- Created comprehensive TDD test suite with 10 tests covering all functionality
- Tests validate environment variables, CLI flags, asset discovery, shipping logic,
  timestamp handling, missing assets, path preservation, and default behaviors

Usage:
  markitect md-render file.md -o /output/dir/     # Auto-ships assets
  markitect md-render file.md --no-ship-assets   # Suppresses shipping
  MARKITECT_OUTPUT_DIR=/docs markitect md-render file.md  # Uses env var

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 23:12:44 +01:00
..
assets feat: implement comprehensive asset shipping for md-render command 2025-10-29 23:12:44 +01:00
explode_variants feat: complete Issue #150 - Advanced Packaging Features (.mdz, .mdt) 2025-10-13 23:09:18 +02:00
finance feat: reorganize tests by capability with separate test targets 2025-10-25 02:37:45 +02:00
graphql feat: reorganize tests by capability with separate test targets 2025-10-25 02:37:45 +02:00
legacy feat: Complete Issue #39 - Database CLI Reorganization with Comprehensive Legacy Compatibility System 2025-09-30 17:28:39 +02:00
matter_contentmatter feat: Complete Issue #38 - Full MarkdownMatters CLI implementation with TDD8 methodology 2025-10-02 09:14:24 +02:00
matter_frontmatter feat: implement comprehensive front matter preservation and unicode handling 2025-10-13 20:26:08 +02:00
matter_tailmatter feat: Complete Issue #38 - Full MarkdownMatters CLI implementation with TDD8 methodology 2025-10-02 09:14:24 +02:00
packaging feat: complete Issue #150 - Advanced Packaging Features (.mdz, .mdt) 2025-10-13 23:09:18 +02:00
plugins feat: implement comprehensive asset shipping for md-render command 2025-10-29 23:12:44 +01:00
production feat: complete Issue #145 - Phase 4: Production Readiness and Release 2025-10-14 18:15:26 +02:00
profile feat: implement comprehensive User Profile Management System (issue #107) 2025-10-04 01:53:31 +02:00
query_paradigms feat: reorganize tests by capability with separate test targets 2025-10-25 02:37:45 +02:00
schemas feat: Complete Issue #50 - Define metaschema for JSON schema structure 2025-10-01 02:39:29 +02:00
template feat: Complete Issue #65 Template Engine Foundation + Fix CLI Regression 2025-10-02 15:33:32 +02:00
__init__.py chore: gitignore and repo cleanup 2025-09-16 03:04:18 +02:00
__version__.py release: bump version to 0.5.0 with clean TDD-driven editor 2025-10-26 07:53:45 +01:00
asset_commands.py feat: implement Issue #143 - CLI integration and user experience for asset management 2025-10-14 13:46:34 +02:00
associated_files.py feat: Complete Issue #40 - Associated Files Management with Interactive vs Automation Mode System 2025-09-30 13:09:37 +02:00
ast_cache.py feat: Strategic pivot to CLI implementation with comprehensive foundation 2025-09-24 01:14:27 +02:00
ast_service.py fix: Improve AST display content visibility for Issue #15 2025-09-27 09:31:47 +02:00
batch_processor.py feat: implement batch processing and recursive operations (issue #17) 2025-10-03 10:45:43 +02:00
cache_service.py feat: Complete logging standardization with context-aware system 2025-09-27 08:28:10 +02:00
clean_document_manager.py feat: implement insert mode with heading protection and fix content display bugs 2025-10-28 23:55:21 +01:00
cli.py feat: implement clean TDD-driven editor with enhanced status dialog 2025-10-26 07:51:43 +01:00
cli_utils.py feat: implement Issue #143 - CLI integration and user experience for asset management 2025-10-14 13:46:34 +02:00
config_manager.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
database.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
document_manager.py feat: complete clean editor implementation with comprehensive UI framework 2025-10-28 03:50:21 +01:00
draft_generator.py refactor: enhance draft generator documentation and code quality 2025-10-03 10:35:16 +02:00
exceptions.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
frontmatter.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
legacy_compat.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
legacy_integration_example.py feat: Complete Issue #39 - Database CLI Reorganization with Comprehensive Legacy Compatibility System 2025-09-30 17:28:39 +02:00
metaschema.py feat: Complete Issue #50 - Define metaschema for JSON schema structure 2025-10-01 02:39:29 +02:00
parser.py feat: Complete Issue #8 - Detailed Validation Error Reporting and CLI Enhancements 2025-09-29 21:21:21 +02:00
performance_tracker.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
schema_generator.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
schema_validator.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
serializer.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
stub_generator.py feat: optimize code quality with pylint analysis and critical fixes - Issue #130 2025-10-06 03:03:38 +02:00
validation_error.py feat: Complete Issue #8 - Detailed Validation Error Reporting and CLI Enhancements 2025-09-29 21:21:21 +02:00
workspace.py feat: complete Issue #144 - Phase 3: Advanced Features and Performance 2025-10-14 17:53:47 +02:00