#!/bin/bash # Simple test script for Zulip bots # Ensure you have a .zuliprc file configured first echo "Zulip Bot Test Script" echo "=====================" echo "" if [ ! -f "$HOME/.zuliprc" ]; then echo "Error: ~/.zuliprc not found" echo "" echo "Create ~/.zuliprc with the following format:" echo "[api]" echo "email = bot@example.com" echo "key = your-api-key-here" echo "site = https://your-subdomain.zulipchat.com" exit 1 fi echo "Found .zuliprc configuration" echo "" PS3="Select a bot to test: " options=("Echo Bot" "Echo Bot (verbose)" "Test Realtime Bot" "Atom Feed Bot (interactive)" "Quit") select opt in "${options[@]}" do case $opt in "Echo Bot") echo "Starting Echo Bot..." echo "The bot will echo all messages it receives" echo "Press Ctrl+C to stop" echo "" dune exec zulip_bot/echo_bot break ;; "Echo Bot (verbose)") echo "Starting Echo Bot with verbose logging..." echo "The bot will echo all messages with detailed logs" echo "Press Ctrl+C to stop" echo "" dune exec zulip_bot/echo_bot -- -vv break ;; "Test Realtime Bot") echo "Starting Test Realtime Bot..." echo "This bot logs all received messages and tests storage" echo "Press Ctrl+C to stop" echo "" dune exec zulip_bot/test_realtime_bot break ;; "Atom Feed Bot (interactive)") echo "Starting Atom Feed Bot in interactive mode..." echo "Use !feed help to see available commands" echo "Press Ctrl+C to stop" echo "" dune exec zulip_bot/atom_feed_bot -- interactive break ;; "Quit") echo "Exiting..." break ;; *) echo "Invalid option $REPLY";; esac done