Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: run-python run-node run-python-debug run-node-debug run-trace-generator run-trace-generator-debug python-install python-install-reset python-install-local test-python-weather ingest-trace
.PHONY: run-python run-node run-python-debug run-node-debug run-trace-generator run-trace-generator-debug run-screenshot-demo run-screenshot-demo-debug python-install python-install-reset python-install-local test-python-weather ingest-trace

run-python:
@cd python && ./run.sh
Expand All @@ -18,6 +18,12 @@ run-trace-generator:
run-trace-generator-debug:
@cd python/trace-generator && DEBUG=1 ./run.sh

run-screenshot-demo:
@cd python/screenshot-demo && ./run.sh

run-screenshot-demo-debug:
@cd python/screenshot-demo && DEBUG=1 ./run.sh

## Install Python deps only (don’t run app). Respects POSTHOG_PYTHON_PATH or POSTHOG_PYTHON_VERSION
python-install:
@cd python && INSTALL_ONLY=1 ./run.sh
Expand Down
28 changes: 28 additions & 0 deletions python/screenshot-demo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# Run the Screenshot Demo

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHON_DIR="$(dirname "$SCRIPT_DIR")"

# Check for DEBUG environment variable
if [ -z "$DEBUG" ]; then
# Load from .env file if not set
if [ -f "$PYTHON_DIR/../.env" ]; then
export $(grep -E '^DEBUG=' "$PYTHON_DIR/../.env" | xargs)
fi
fi

# Check if virtual environment exists
if [ ! -d "$PYTHON_DIR/venv" ]; then
echo "Virtual environment not found. Please run the main Python app first:"
echo " cd $PYTHON_DIR && ./run.sh"
exit 1
fi

# Activate virtual environment
source "$PYTHON_DIR/venv/bin/activate"

# Run the screenshot demo
cd "$SCRIPT_DIR"
python screenshot_demo.py "$@"
Binary file added python/screenshot-demo/samples/activity-log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added python/screenshot-demo/samples/compact-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added python/screenshot-demo/samples/editable-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added python/screenshot-demo/samples/feature-flags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading