Go to file
tigeren 03dba966e5 Refactor template management to return both prompt and title. Update NotificationScheduler and tests to utilize new structure for sending notifications. Adjust configuration for minimum and maximum intervals. 2025-08-31 07:57:24 +00:00
config Refactor template management to return both prompt and title. Update NotificationScheduler and tests to utilize new structure for sending notifications. Adjust configuration for minimum and maximum intervals. 2025-08-31 07:57:24 +00:00
templates Refactor template management to return both prompt and title. Update NotificationScheduler and tests to utilize new structure for sending notifications. Adjust configuration for minimum and maximum intervals. 2025-08-31 07:57:24 +00:00
.dockerignore Remove config.json file and update config.py to load configuration from a new directory. Add timezone support in the NotificationScheduler for accurate silent time checks. Update requirements.txt to include pytz for timezone handling. 2025-08-31 06:04:59 +00:00
.gitignore first commit 2025-08-30 15:55:23 +00:00
CLAUDE.md first commit 2025-08-30 15:55:23 +00:00
Dockerfile Remove config.json file and update config.py to load configuration from a new directory. Add timezone support in the NotificationScheduler for accurate silent time checks. Update requirements.txt to include pytz for timezone handling. 2025-08-31 06:04:59 +00:00
README.md Remove config.json file and update config.py to load configuration from a new directory. Add timezone support in the NotificationScheduler for accurate silent time checks. Update requirements.txt to include pytz for timezone handling. 2025-08-31 06:04:59 +00:00
config.py Add strip_think_tags configuration and update OllamaClient response handling. Refactor NotificationScheduler and tests to utilize new config option for stripping <think> tags from responses. 2025-08-31 07:27:12 +00:00
config_cli.py first commit 2025-08-30 15:55:23 +00:00
docker-compose.yml Remove config.json file and update config.py to load configuration from a new directory. Add timezone support in the NotificationScheduler for accurate silent time checks. Update requirements.txt to include pytz for timezone handling. 2025-08-31 06:04:59 +00:00
main.py first commit 2025-08-30 15:55:23 +00:00
notification_client.py first commit 2025-08-30 15:55:23 +00:00
ollama_client.py Add strip_think_tags configuration and update OllamaClient response handling. Refactor NotificationScheduler and tests to utilize new config option for stripping <think> tags from responses. 2025-08-31 07:27:12 +00:00
quick_test.py Refactor template management to return both prompt and title. Update NotificationScheduler and tests to utilize new structure for sending notifications. Adjust configuration for minimum and maximum intervals. 2025-08-31 07:57:24 +00:00
requirements.txt Remove config.json file and update config.py to load configuration from a new directory. Add timezone support in the NotificationScheduler for accurate silent time checks. Update requirements.txt to include pytz for timezone handling. 2025-08-31 06:04:59 +00:00
scheduler.py Refactor template management to return both prompt and title. Update NotificationScheduler and tests to utilize new structure for sending notifications. Adjust configuration for minimum and maximum intervals. 2025-08-31 07:57:24 +00:00
template_manager.py Refactor template management to return both prompt and title. Update NotificationScheduler and tests to utilize new structure for sending notifications. Adjust configuration for minimum and maximum intervals. 2025-08-31 07:57:24 +00:00
test_connections.py Add strip_think_tags configuration and update OllamaClient response handling. Refactor NotificationScheduler and tests to utilize new config option for stripping <think> tags from responses. 2025-08-31 07:27:12 +00:00

README.md

Dom

A notification scheduling system with Docker support.

Quick Start with Docker Compose

  1. Build and start the service:

    docker-compose up -d
    
  2. View logs:

    docker-compose logs -f
    
  3. Stop the service:

    docker-compose down
    

Configuration

The configuration file is located in the config/ directory and is mapped as a volume, allowing you to modify it without rebuilding the container.

Modifying Configuration

  1. Edit config/config.json on your host machine
  2. The changes will be automatically picked up by the container
  3. Restart the container if needed: docker-compose restart

Configuration Options

  • ollama_endpoint: Ollama API endpoint
  • ollama_model: Model to use for text generation
  • silent_start: Start time for silent period (HH:MM)
  • silent_end: End time for silent period (HH:MM)
  • timezone: Timezone for scheduling
  • min_interval: Minimum interval between notifications (minutes)
  • max_interval: Maximum interval between notifications (minutes)
  • bark_api_url: Bark notification service URL
  • bark_device_key: Bark device key
  • ntfy_api_url: Ntfy notification service URL
  • ntfy_topic: Ntfy topic
  • ntfy_access_token: Ntfy access token
  • templates_dir: Directory containing notification templates

Development

Local Development

python3 main.py

Building Docker Image

docker build -t dom .

Running with Docker

docker run -d \
  --name dom \
  -v $(pwd)/config:/app/config \
  -v $(pwd)/templates:/app/templates \
  dom

Volumes

  • ./config:/app/config: Configuration directory (read-write)
  • ./templates:/app/templates: Templates directory (read-only)

Environment Variables

  • TZ: Timezone (default: Asia/Shanghai)