diff --git a/.gitignore b/.gitignore index ffc842a..53fba11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ __pycache__/ *.pyc +.DS_Store .venv/ *.egg-info/ dist/ build/ backups/ scan/ +dist-source/ diff --git a/docs/.DS_Store b/docs/.DS_Store deleted file mode 100644 index 98f0c72..0000000 Binary files a/docs/.DS_Store and /dev/null differ diff --git a/scripts/export_source.sh b/scripts/export_source.sh new file mode 100755 index 0000000..1cadb2e --- /dev/null +++ b/scripts/export_source.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Export project source code to dist-source/ directory. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" +DIST_DIR="$PROJECT_DIR/dist-source" + +rm -rf "$DIST_DIR" +mkdir -p "$DIST_DIR" + +# Copy project source and config files +cp "$PROJECT_DIR/pyproject.toml" "$DIST_DIR/" +cp "$PROJECT_DIR/uv.lock" "$DIST_DIR/" +cp "$PROJECT_DIR/README.md" "$DIST_DIR/" +cp "$PROJECT_DIR/CLAUDE.md" "$DIST_DIR/" 2>/dev/null || true + +# Copy directories +for dir in src scripts docs; do + if [ -d "$PROJECT_DIR/$dir" ]; then + cp -r "$PROJECT_DIR/$dir" "$DIST_DIR/" + fi +done + +# Remove __pycache__ from exported source +find "$DIST_DIR" -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true +find "$DIST_DIR" -name ".DS_Store" -delete 2>/dev/null || true + +echo "Exported to $DIST_DIR/"