Skip to content

gregjsong/pokemon-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

126 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokemon Notifications

A fun and lightweight notification system that uses Pokémon-themed visuals to display messages triggered by scheduled cron jobs.

Table of Contents

Purpose

  • Display and read custom notifications with a Pokémon wrapper.

  • Schedule notifications using cron expressions.

  • Open your browser to show Pokémon-style messages as alerts

Features

  • Custom message scheduling via cron

  • Pokémon-themed UI with sprite animations

  • Text appears in animated dialogue boxes

  • Browser-based rendering of notifications

Getting Started

Requirements

  • Go 1.23+
  • SQLite3 (required for github.com/mattn/go-sqlite3)
  • A browser installed and available on the system (e.g., Chrome, etc.)

Dependencies

Package Purpose
robfig/cron Job scheduling with cron expressions
mattn/go-sqlite3 Database driver
stretchr/testify Testing utilities

Installation

git clone https://github.com/gregjsong/pokemon-notification.git
cd pokemon-notification
go mod tidy

Run

The default configuration is set as below, and may require adjustment before running.

{
  "port": ":8080",
  "url": "http://localhost",
  "openCommand": "/usr/bin/google-chrome-stable"
  // other fields ...
}

To start the app, from the root of the project:

go run cmd/server/main.go

Build

To build the project into a binary:

go build -o pokemon-notify ./cmd/server

Demo

Demo Preview

Usage

Notifications can be scheduled and updated by visiting /manage in your browser.

Additional notes:

  • The schedule format uses 6 space-separated fields (as supported by robfig/cron), allowing you to specify exact times and intervals for when notifications should appear.
  • Each notification render features a randomly selected Pokémon.
  • If multiple notifications are scheduled for the same second, their descriptions are combined into a single message.

Testing

Run the full test suite:

go test ./...

Configuration

Pokémon Configuration

The syllables array defines how a Pokémon name should be broken down for generating speech-like translations.

The substitutions object is used to fine-tune pronunciation for the browser's SpeechSynthesis API. Since default text-to-speech behavior may mispronounce certain names.

{
  "id": 6,
  "name": "charizard",
  "syllables": ["char", "i", "zard"],
  "substitutions": {
    "chari": "chaaruh",
    "charizard": "chaaruhzaard"
  }
}

Land & Background Configuration

The display background for each Pokémon is determined by two config files:

land_bg_config.json: Defines background environments like forest, beach, or cave, and how many visual variants each one has.

Background images should be placed in ./web/images/backgrounds/${id}-${pageNumber}.png, where id is the landId from ./land_bg_config.json and pageNumber ranges from 1 to numPages.

{
  "id": 2,
  "name": "beach",
  "numPages": 3
}

pokemon_land_mapping.json: Maps each Pokémon to a specific background.

Legal

This is a fan-made project and is not affiliated with, endorsed, sponsored, or specifically approved by Nintendo, Game Freak, or The Pokémon Company.
Pokémon and all related names, images, and assets are © Nintendo, Game Freak, and The Pokémon Company.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published