ratatoskr 0.1.0

A lightweight Telegram bot bridge that streams updates over stdout and accepts responses via named pipes
Documentation
.PHONY: help build install run dev test pipe

PIPE_OUTBOUND_PATH ?= ./ratatoskr_out.pipe

help:
	@echo "Ratatoskr - Telegram <-> handler bridge (pipe mode only)"
	@echo "Targets:"
	@echo "  build     - cargo build"
	@echo "  install   - cargo install --path ."
	@echo "  run       - cargo run"
	@echo "  dev       - cargo watch -x run"
	@echo "  test      - cargo test"
	@echo "  pipe      - mkfifo $${PIPE_OUTBOUND_PATH} if missing"
	@echo "  test_pipe - write a sample OutgoingMessage JSON into the pipe (requires CHAT_ID)"

build:
	cargo build

install:
	cargo install --path .

run:
	cargo run

dev:
	cargo watch -x run

test:
	cargo test

pipe:
	@if [ ! -p "$(PIPE_OUTBOUND_PATH)" ]; then \
		mkfifo "$(PIPE_OUTBOUND_PATH)"; \
		echo "Created pipe at $(PIPE_OUTBOUND_PATH)"; \
	else \
		echo "Pipe already exists at $(PIPE_OUTBOUND_PATH)"; \
	fi

test_pipe:
	PIPE_OUTBOUND_PATH=$(PIPE_OUTBOUND_PATH) ./scripts/test_pipe_outbound.sh