An ENiGMA½ BBS module that displays historical events that occurred on the current day, with multiple variety strategies for event selection. The inspiration, and design, comes from Smooth of PHEN0M, who originally created this as a Mystic BBS mod. I've re-worked this concept as an ENiGMA½ Module, adapting the data source to Wikimedia's API.
- Cached Data: Add
fetch_daily_events.jsto your cron or Enigma event inconfig/config.hjson - Multiple Selection Strategies: Era-based, oldest-first, source-balanced, and random event selection
- Word Wrapping: Text wrapping with proper alignment
- Classic BBS Styling: Authentic retro terminal aesthetics
mkdir -p /path/to/enigma-bbs/mods/ja_day_in_historySave the files as:
/path/to/enigma-bbs/mods/ja_day_in_history/ja_day_in_history.js
/path/to/enigma-bbs/mods/ja_day_in_history/fetch_daily_events.js
For instant display performance, use ENiGMA½'s built-in event scheduler.
Add this to your config.hjson under eventScheduler.events:
eventScheduler: {
events: {
dayInHistoryFetch: {
schedule: "every 1 hour"
action: "@method:mods/ja_day_in_history/fetch_daily_events.js:fetchDailyEvents"
}
}
}
eventScheduler: {
events: {
dayInHistoryFetch: {
schedule: "at 6:00 am"
action: "@method:mods/ja_day_in_history/fetch_daily_events.js:fetchDailyEvents"
}
}
}
If you prefer using system cron instead of ENiGMA½'s scheduler:
# Add to crontab (run every hour)
0 * * * * /usr/bin/node /path/to/enigma-bbs/mods/ja_day_in_history/fetch_daily_events.js >> /var/log/enigma-day-in-history.log 2>&1# Add to crontab (run daily at 6:00 AM)
0 6 * * * /usr/bin/node /path/to/enigma-bbs/mods/ja_day_in_history/fetch_daily_events.js >> /var/log/enigma-day-in-history.log 2>&1Run the fetch script once to create the initial cache:
cd /path/to/enigma-bbs/mods/ja_day_in_history
node fetch_daily_events.jsTo integrate the Day in History module into your login sequence, you need to modify your login menu configuration file (typically located in config/menus/).
Find your login menu configuration file, such as:
config/menus/theme-name_login.hjson
Insert the Day in History module into your login flow. Here's a typical example showing where to place it:
{
"menus": {
// ... other login sequence menus ...
"fullLoginSequenceLastCallers": {
"desc": "Last Callers",
"module": "last_callers",
"art": "LASTCALL",
"config": {
"pause": true,
"font": "cp437"
},
"next": "fullLoginSequenceWhosOnline"
},
"fullLoginSequenceWhosOnline": {
"desc": "Who's Online",
"module": "whos_online",
"art": "WHOSON",
"config": {
"pause": true
},
"next": "fullLoginSequenceDayInHistory"
},
// ADD THIS ENTRY:
"fullLoginSequenceDayInHistory": {
"desc": "Day In History",
"module": "@userModule:ja_day_in_history",
"next": "fullLoginSequenceOnelinerz"
},
"fullLoginSequenceOnelinerz": {
"desc": "Onelinerz",
"module": "onelinerz",
"next": [
{
"acs": "NC2",
"next": "fullLoginSequenceNewScanConfirm"
},
{
"next": "fullLoginSequenceUserStats"
}
],
"config": {
"cls": true,
"art": {
"view": "ONELINER",
"add": "ONEADD"
}
}
}
// ... rest of login sequence ...
}
}
Make sure the menu that comes before Day in History points to it. In the example above, fullLoginSequenceWhosOnline has:
"next": "fullLoginSequenceDayInHistory"
# Stop ENiGMA½
# Start ENiGMA½The module supports different event selection strategies:
- Era-based (Default): Balanced across historical periods
- Oldest-first: Focuses on ancient history
- Source-balanced: Balanced across different types of events
- Random: Random selection from available events
- ENiGMA½ BBS v0.0.12-beta or later
- Internet connection for daily data fetching (Wikimedia API access)
- Terminal program supporting ANSI color codes (e.g. SyncTerm)
- ENiGMA½ event scheduler or external cron job for cache updates
This project is licensed under the BSD 2-Clause License - see the LICENSE file for details.
- Thanks to NuSkooler for ENiGMA½ BBS
- Original version by Smooth provided inspiration and layout
- Wikimedia Foundation for the historical events API