Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Asset Management System (Issue #142): - Add complete asset management framework with deduplication - Implement AssetManager, AssetRegistry, and AssetDeduplicator classes - Add AssetPackager for markdown document packaging - Create comprehensive test suite for all asset management components - Add asset constants and custom exceptions for robust error handling Markdown Processing Enhancements: - Update markdown_commands.py with improved functionality - Enhanced parsing and content aggregation capabilities - Improved filename encoding/decoding for special characters Test Suite Improvements: - Add comprehensive tests for Issue #138 markdown parsing - Enhance Issue #139 content aggregation and end-to-end testing - Complete test coverage for new asset management features Examples and Documentation: - Update BildungsKanonJon.md example with enhanced content - Generate corresponding HTML output for documentation - Add asset registry configuration Development Tools: - Add install script for simplified setup This commit represents a major enhancement to MarkiTect's asset handling capabilities with full test coverage and improved markdown processing. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
160 lines
3.5 KiB
Bash
Executable File
160 lines
3.5 KiB
Bash
Executable File
#!/bin/bash
|
||
#
|
||
# MarkiTect Quick Installer
|
||
#
|
||
# This script provides a simple way to install MarkiTect.
|
||
# It's a wrapper around the Python installer script.
|
||
#
|
||
# Usage:
|
||
# ./install.sh [options]
|
||
# curl -sSL https://raw.githubusercontent.com/example/markitect/main/install.sh | bash
|
||
#
|
||
# Options:
|
||
# --system Install system-wide (requires sudo)
|
||
# --dev Install in development mode
|
||
# --check Check installation status
|
||
# --uninstall Uninstall MarkiTect
|
||
# --help Show help
|
||
|
||
set -e
|
||
|
||
# Default options
|
||
SYSTEM=""
|
||
DEV=""
|
||
CHECK=""
|
||
UNINSTALL=""
|
||
HELP=""
|
||
|
||
# Colors for output
|
||
RED='\033[0;31m'
|
||
GREEN='\033[0;32m'
|
||
YELLOW='\033[1;33m'
|
||
BLUE='\033[0;34m'
|
||
NC='\033[0m' # No Color
|
||
|
||
# Function to print colored output
|
||
print_info() {
|
||
echo -e "${BLUE}ℹ️ $1${NC}"
|
||
}
|
||
|
||
print_success() {
|
||
echo -e "${GREEN}✅ $1${NC}"
|
||
}
|
||
|
||
print_warning() {
|
||
echo -e "${YELLOW}⚠️ $1${NC}"
|
||
}
|
||
|
||
print_error() {
|
||
echo -e "${RED}❌ $1${NC}"
|
||
}
|
||
|
||
# Parse command line arguments
|
||
while [[ $# -gt 0 ]]; do
|
||
case $1 in
|
||
--system)
|
||
SYSTEM="--system"
|
||
shift
|
||
;;
|
||
--dev)
|
||
DEV="--dev"
|
||
shift
|
||
;;
|
||
--check)
|
||
CHECK="--check"
|
||
shift
|
||
;;
|
||
--uninstall)
|
||
UNINSTALL="--uninstall"
|
||
shift
|
||
;;
|
||
--help|-h)
|
||
HELP="--help"
|
||
shift
|
||
;;
|
||
*)
|
||
print_error "Unknown option: $1"
|
||
exit 1
|
||
;;
|
||
esac
|
||
done
|
||
|
||
# Show help if requested
|
||
if [[ -n "$HELP" ]]; then
|
||
cat << EOF
|
||
MarkiTect Quick Installer
|
||
|
||
Usage: $0 [options]
|
||
|
||
Options:
|
||
--system Install system-wide (requires sudo)
|
||
--dev Install in development mode with test dependencies
|
||
--check Check current installation status
|
||
--uninstall Uninstall MarkiTect
|
||
--help Show this help message
|
||
|
||
Examples:
|
||
$0 # Install for current user
|
||
$0 --system # Install system-wide
|
||
$0 --dev # Install in development mode
|
||
$0 --check # Check installation status
|
||
$0 --uninstall # Uninstall MarkiTect
|
||
|
||
For more advanced options, use the Python installer directly:
|
||
python install.py --help
|
||
EOF
|
||
exit 0
|
||
fi
|
||
|
||
# Check if Python is available
|
||
if ! command -v python3 &> /dev/null; then
|
||
print_error "Python 3 is required but not found"
|
||
print_info "Please install Python 3.8 or higher and try again"
|
||
exit 1
|
||
fi
|
||
|
||
# Check Python version
|
||
python_version=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
|
||
required_version="3.8"
|
||
|
||
if ! python3 -c "import sys; sys.exit(0 if sys.version_info >= (3, 8) else 1)"; then
|
||
print_error "Python $required_version or higher is required (found: $python_version)"
|
||
exit 1
|
||
fi
|
||
|
||
print_success "Python $python_version found"
|
||
|
||
# Determine script directory
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||
INSTALLER_SCRIPT="$SCRIPT_DIR/install.py"
|
||
|
||
# Check if installer script exists
|
||
if [[ ! -f "$INSTALLER_SCRIPT" ]]; then
|
||
print_error "Installer script not found: $INSTALLER_SCRIPT"
|
||
print_info "Make sure you're running this from the MarkiTect project directory"
|
||
exit 1
|
||
fi
|
||
|
||
# Build command
|
||
cmd="python3 $INSTALLER_SCRIPT"
|
||
|
||
if [[ -n "$SYSTEM" ]]; then
|
||
cmd="$cmd $SYSTEM"
|
||
print_warning "System installation requires sudo privileges"
|
||
fi
|
||
|
||
if [[ -n "$DEV" ]]; then
|
||
cmd="$cmd $DEV"
|
||
fi
|
||
|
||
if [[ -n "$CHECK" ]]; then
|
||
cmd="$cmd $CHECK"
|
||
fi
|
||
|
||
if [[ -n "$UNINSTALL" ]]; then
|
||
cmd="$cmd $UNINSTALL"
|
||
fi
|
||
|
||
# Run the installer
|
||
print_info "Running: $cmd"
|
||
exec $cmd |