Table of Contents

Mystic Calendar

This is a port of the classic CNet Calendar AREXX script (CNet Pro BBS) to Mystic BBS (Python scripts).

It displays a monthly calendar and a right-side “upcoming events” list from a simple data file, and can also generate a separate birthday events file from Mystic user records.

This script is intended to be run:


What This Version Does


Directory Layout

/mystic/
├── scripts/
│   ├── calendar.mpy
│   ├── generate_birthdays.py
│   └── generate_holidays.py
└── calendar_data/
    ├── cal.2026
    ├── cal.2027
    ├── cal.bdays.2026
    └── cal.bdays.2027

Notes:


Data File Format

Each event line begins with MMDD, followed by display text.

Example:

0101 1st  - New Year's Day
0704 4th  - Independence Day!
0820 20th - Renaissance Faire at Burbank CA
0820        E-mail Jim Shaffer for more info

Rules:

Birthday files (`cal.bdays.YYYY`) use the same format.


Setup

Create the data directory:

mkdir -p /home/pi/mystic/themes/default/scripts/calendar_data

Confirm your script points to the correct location:

DATA_PATH = "/home/pi/mystic/themes/default/scripts/calendar_data/"

Script Usage

Normal events calendar:

calendar.mpy

Birthday calendar (reads `cal.bdays.YYYY`):

calendar.mpy bd

Important Mystic note:


Birthdays

Birthdays are generated into yearly files:

The generator:

If you run both `cal.bdays.<year>` and `cal.bdays.<year+1>`, the main calendar script can show upcoming birthdays across the year boundary.


Why The Fancy Box/Grid Was Dropped

We attempted two traditional approaches for a “CNet-style” boxed calendar:

In Mystic’s Python output path, those characters were either sanitized or re-encoded (mojibake like `0xB…`, `├ä…`, or `ΓöÇ…`) depending on the terminal/client path.

So this release uses plain ASCII layout + ANSI colors for maximum compatibility and reliability.


If we want the exact “classic boxed calendar” look later without encoding problems, the best approach is:

  1. Build a static .ANS template containing the full calendar grid and border art
  2. Display the template using Mystic’s normal ANSI rendering (where CP437/ANSI art is handled correctly)
  3. Use Python only to print the dynamic parts (dates and events) at fixed positions

This avoids encoding problems entirely because the box art is handled by Mystic’s ANSI file renderer, not Python output.


Install / Menu Integration

Add as a PFile/Door (example paths will vary by install):

You can also call it at login by running it from the appropriate Mystic login event/menu hook.


Source / Code

See full code here: Mystic Calendar Code