- Introduction
- Configuration file
- Plug-in System
- Common modules
- Encoders
- Installation/Usage
- TO-DO List
- Acknowledgements
RetroBBS is a bulletin board system specifically developed to work in conjunction with Turbo56k protocol-capable terminals, such as Retroterm for the Commodore 64, Commodore Plus/4 or MSX computers.
RetroBBS is written in Python3 and uses several 3rd party modules to provide a rich, multimedia online experience for 8-bit computers.
Originally written specifically for the PETSCII character set used in Commodore computers, from v0.50 the BBS transitioned to neutral encoding, slowly removing hard-coded PETSCII strings and C64 format images. Making support of other retro platforms possible.
v0.60 introduces support for many normal, non-Turbo65K compatible terminals. Getting RetroBBS closer to a standard BBS, but there's still ways to go.
New features:
- Retroterm MSX support.
- Radio and Podcast plugins by Emanuele Laface
- New CSDb plugin, browse, search and download files from CSDb.dk
- New File-hunter plugin, search and download files from download.file-hunter.com
- SID to AY music conversion.
- Added Turbo56k v0.8 support (Drawing primitives and query client setup).
- New <END> TML statement.
- New <FORMAT> TML block instruction.
- Support for RLE compressed Koala Paint images.
- New <PCMPLAY> and <SENDBITMAP> TML tags.
- Added, optional TML scripts for session start and logout.
- Weather plugin now has a second screen displaying the temperature curve forecast for the next 7 days.
- Support for non-Turbo56K terminals. Including support for:
- CCGMS
- Novaterm
- HandyTerm
- Xgraphic enabled terminals (EdgeTerm)
- Other Commodore 64 CG terminals
- VicTerm (VIC-20 color PETSCII terminal)
- MSX RS232 ROM built in terminal (CALL COMTERM)
- VT52/VidTex compatible terminals (VIDTEX, CBTerm, VIP Terminal, ATARI ST)
- ANSI
- XModem, XModem-CRC and YModem file transfer protocols for non-Turbo56K clients.
- Punter and Multi-Punter file transfer protocols for non-Turbo56K Commodore clients.
- Added non-blocking receive function to the Connection class.
- Added template system, based on Jinja2 templates.
- New FileList() file browser, old version now called Gallery()
- Browse and transfer the contents of ZIP and LHA archives.
- Browse and transfer the contents of D64/D71/D81 and IMG/DSK disk images.
- Sysop can now delete ONELINER messages.
- New draw module, adds support for drawing stars, polygons and Hershey fonts using the new client side drawing primitives.
- New TIC-TAC-TOE game, uses drawing primitives commands on clients which support them.
- Webaudio now supports chapters on Youtube sources.
- Added TML tags for the BBS style colors.
- Added new core function: RTERMSETUP. Shows current client and retroterm capabilities.
Changes/Bug fixes:
- Minimum Python version required is now 3.9
- Fixed filter cutoff low nibble in SID chiptune streaming
- Fixed PCMPLAY support for non-local files
- Webaudio plugin now supports non-live sources
- Send the correct number of delete characters for the LogOff confirmation message
- Fix to support Wikipedia-API version 0.6.0 and above (see note on the Requirements section)
- Fixed Slideshow handling of .C and .PET PETSCII files
- Weather plugin now has more robust handling of geocoder timeouts
- Weather plugin can now fallback to text mode
- Fixed image converter Bayer 4x4 dithering matrix
- Added user-agent when using wikipediaapi >= 0.6.0
- Fixed audio streaming now works when the BBS is running under Windows and Mac.
- Messaging system reworked, it now supports different screen dimensions and longer messages
- MSX-ASCII art header for the Oneliner plugin
- Fix to support Python-Weather >= 2.0.0
- Fixed menu item descriptions with special characters resulting on misaligned menu screen
- Delete temporal files after use
- Turbo56k query commands now use non-blocking reception, prevents hangs on client-side errors.
- Chiptune streaming now use non-blocking reception for synchronization.
New features:
- Idle BBS will reload the configuration file if it has been modified during runtime.
- New LABEL internal function for displaying non-interactive text in menus.
- New command line parameter
-c, select configuration file. - SID streaming now supports Compute's Sidplayer .mus files.
- SID streaming now supports selection of the subtune to play.
- SID streaming supports tunes using hardrestart, if SIDDumpHR is available.
- New
CHIPPLAYandSIDPLAYfunctions for the configuration file. - Added Turbo56k v0.7 support.
- New text viewer with support for bidirectional scroll.
- New Maps plugin.
- Added support for .YM, .VTX and .VGM music files. YM2149/AY-3-8910 data streams are converted to SID data streams.
- Added Python based internal SIDdump implementation used as fallback if neither SIDdump nor SIDdumpHR are present.
- Added GRABFRAME internal function.
- Added
linesandbusyparameters to the configuration file - Added
encodersdirectory. Encoder modules provide encoding/decoding functions for different platforms. - Added Plus/4 support.
- Introducing TML markup/scripting language, moving towards an encoding agnostic BBS. Some functions now expect parameters in this format.
- New STAT internal function for displaying some basic BBS and user statistics
- Added
SENDFILEfunction for the configuration file. - Show album art if embedded in MP3 files (and dialog is enabled)
- New
modeconfig file parameter allows for platform specific versions of menu entries - Added user preferences, both global and plugin specific
- New plugin game Mindle, a Wordle clone, guess the computer science/video game/tech term. Supports high scores for registered users
Changes/Bug fixes:
- Simplified initial terminal feature check, now is more reliable.
- Fixed bug where an unsupported weather type would crash the python_weather module, in turn crashing the weather plugin and dropping the connection.
- Added 'wait cursor' to the audio module and webaudio plugin
- Fixed bugs when adding and editing users in both dbmaintenance.py and the main script
- Fixed display of .c and .pet files
- Fixed playtime for audio files played through the PCMPLAY function
- Improved dbmaintenance.py UI, now it is possible to cancel options 'Update user data' and 'Add user'
- Username is now case-insensitive (username is still stored and displayed as case-sensitive); dbmaintenance.py will warn of existing clashing usernames, but will take no action. Is up to the admin to edit or delete the offending user accounts.
- Removed extra empty line if the first section of a menu doesn't have a title.
- Custom paths are now read from the configuration file, currently only 'temp' and 'bbsfiles' presets are used internally.
- Fixed search for .ssl files in the
SONGLENGTHsubdirectory - Fixed playlength of NTSC .sid files.
- Slideshow doesn't wait for
RETURNwhen there's an unsupported file present in the sequence. - Fixed high CPU usage when streaming local audio files
- Improved Wikipedia article parsing
- FILES function will show file extensions if no file extension parameter is given
- Main video frame grabbing routine moved to new
common/video.py, YouTube plugin now calls this internal routine. - YouTube plugin now uses Streamlink instead of the now obsolete/no longer under development pafy.
- When all the slots are in use will now correctly close any further incoming connections.
- Weather and Maps plugins can now use either Photon or Nominatim as geocoder, selected from the configuration file.
- Fixed crash when the geocoder didn't respond in time in the Weather plugin
- Extensive rewrite and cleanup, TML scripting integration.
- Option to logout after transferring a program to memory
- Weather plugin adapted to support
python-weatherv1.0.0+. Older versions of the module still work. - Revamped graphic conversion module(s)
Webaudio fix: Take samplerate into account when more than one client is streaming from the same source.- Webaudio multiclient queuing disabled, falling back to one ffmpeg instance per audio stream.
- Fixed missing timeout parameter in APOD plugin.
- Both APOD and Newsfeed plugins now use text_displayer instead or More
- Sendfile checks if executable file fits in the client's available memory size and range and disables transfer to memory if the file is too large or resides outside the valid memory range.
- Added
←glyph to BetterPixels font
New features:
- SLIDESHOW now supports SID files
- WEATHER plugin, display the current weather and forecast for the next 2-3 days.
- BBS version and host OS are shown after the welcome message.
- Total BBS uptime is stored in the database. Session uptime is available as an attribute of the BBS class.
- Total data transferred for each user account is stored in the database.
Changes/Bug fixes:
- Librosa module replaced by audioread and use of FFmpeg audio filters, PCM streaming no longer uses mu-law compression.
- Removed legacy RAW audio streaming code.
- Fixed broken AUDIOLIBRARY formatting when a filename contains non-Latin characters.
- Fixed broken Streamlink support. Added Twitch stream example to configuration file
- SLIDESHOW now plays PCM audio for the correct amount of time.
- SIDStreaming flushes the input buffer when the stream is canceled.
- Fixed board/inbox message list order, changed from newest thread first to thread with the newest message first.
- Board/Inbox message list now displays the author of the latest message in each thread.
- When reading a public board message thread, the date for the current message is displayed in the header next to the author.
- SendProgram and SendRAWFile moved from the main script to the common.filetools module.
- Documentation rewritten in Markdown format
New features:
- Added Login/User functionality
- Added userclass/userlevel settings for the config file, select which menu is accessible to admins/sysops, registered users and/or guests.
- Added a verbosity command line switch, see section 5
- Added Turbo56k v0.6 support, terminal features are queried and displayed on connection.
- Messaging system, supports public boards and private messages. Public boards can have independent Read/Post user class permissions.
Changes/Bug fixes:
- Improvements to c64cvt
- Fixed problems retrieving YouTube videos metadata due to the removal of the dislikes count.
- YouTube frame capture is now faster after the 1st frame.
- Core PCM audio and SID file streaming functions moved to their own module.
- All PCM audio decoding is done using FFmpeg
- WebAudio plugin can share any given PCM stream between multiple clients.
- Updated example config file with valid links to YouTube videos and RSS feeds.
- Miscellaneous code cleanup
- AudioList now supports HVSC style path to songlength files
- Now most text parameters other than in calls to the Connection class are expected to be ASCII, not PETSCII, this also counts for the config file.
Initial release
Turbo56k was created by Jorge Castillo as a simple protocol to provide high-speed file transfer functionality to his bit-banging 57600bps RS232 routine for the C64. Over time, the protocol has been extended to include 4-bit PCM audio streaming, bitmap graphics transfer and display, SID music streaming and more.
Introduced in v0.50, TML, standing for Turbo Markup Language is a markup and scripting language inspired by the type-in program listings in magazines from the 1980s. The language's goal is to allow the description of control codes and other platform specific characteristics in plain text. With the added power of allowing the access of internal BBS functions and plugins. Read the dedicated documentation for more info.
RetroBBS is quite customizable and expandable. The use of a configuration file (config.ini by default) and built-in file transfer, stream and display functions permits building a custom set of menus and file galleries.
In addition, the plug-in system allows adding extra functionality with full support from the configuration file.
The BBS is multithreaded and the number of simultaneous incoming connections can be customized in the configuration file.
Current built-in functions:
-
User signup and sign in. Plain text JSON database, salted password storage
-
Public message boards and private messaging system
-
Program transfer: Send Commodore 64 and Plus/4
.prgfiles, or MSX.romfiles to the computer memory at the correct memory address. -
RAW file transfer: Send RAW file data directly to the computer, no processing is done to the input data.
-
Text file transfer: Process different text formats (ASCII or PETSCII) and send it to the client computer either paginated or with interactive scrolling.
-
Image conversion and display: Supports conversion of GIF, PNG, JPG file formats to C64, Plus/4 Hires or Multicolor and MSX Screen 2, also supports Koala Painter (normal and RLE encoded), Advanced Art Studio, Doodle!, Art Studio C64 native file formats, Botticelli Plus/4 native file format, Screen2 MSX native format and Compuserve RLE files. Images larger than the client screen are resized and cropped for best fit. This functionality can be used from plug-ins.
-
PCM audio streaming: WAV and MP3 files are converted to 4-bit PCM audio streams on the fly. Metadata is supported and displayed.
-
SID music streaming: .SID and .MUS files are converted to a stream of SID register writes. Only SID tunes that play once per frame (1X speed) are supported. This function requires the existence of the SIDDumpHR or SIDDump executables in the system path, if neither is found a slower Python implementation will be used instead.
-
YM2149/AY-3-8910 music streaming: .AY, .VTX and .VGZ files are decoded and converted to a stream of register writes. Samples and some other special effects are not supported.
-
Conversion of AY-3-8910 register streams into SID streams for C64 clients, cyclic envelope simulation is limited.
-
Conversion of SID register streams into AY-3-8910 streams for MSX clients, all SID waveforms are played as either pulse or noise. Filter attenuation is not simulated.
-
Video frame grabbing: Any file format supported by OpenCV2/ffmpeg, files can be local or from an external URL.
-
File transfer to the client's (disk) storage device, using either the custom Turbo56K protocol, XModem, YModem, Punter or Multi-Punter protocols.
Included plug-ins:
- Astronomy Picture Of the Day (apod.py): Retrieves and displays the text and picture from NASA's Astronomy Picture Of the Day.
- IRC Client (irc_client.py): Basic and very experimental IRC client.
- RSS feed reader (newsfeed.py): Retrieves the latest 10 entries from the specified RSS feed, upon user selection of the entry, it scrapes the target website for text and relevant picture.
- Oneliner (oneliner.py): User-generated messages of up to 39 characters.
- WebAudio streamer (webaudio.py): On-the-fly conversion and streaming of online audio sources (Shoutcast, YouTube or other sources)
- Wikipedia (wiki.py): Search and display Wikipedia articles, displaying relevant article image if found.
- YouTube snapshot (youtube.py): Display a frame from the specified YouTube video. It grabs the latest frame if the video is a live stream, otherwise it grabs a random frame.
- Weather (weather.py): Query the weather forecast for any part of the world.
- Maps (maps.py): Display and navigate the map of the world.
- Mindle (mindle.py): A Wordle clone, with variable word length.
- CSDb (csdb.py): Browse, search and download files from the Commodore Scene Database
- File-hunter (filehunter.py): Search and download files from download.file-hunter.com
- Tic-Tac-Toe (tictactoe.py): A tic-tac-toe game, takes advantage of client side drawing primitives if available.
- Search internet radios (radio.py): Search and listen to internet radios. By Emanuele Laface
- Search Podcasts (podcast.py): Search and listen to podcast. By Emanuele Laface
Python version 3.9 or above
Python modules:
- audioread
- beautifulsoup4
- crc
- feedparser (For the RSS feeds plug-in)
- geopy (For the weather plugin)
- hitherdither (https://www.github.com/hbldh/hitherdither)
- irc (For IRC client plug-in)
- jinja2 (Templates)
- lhafile (For .YM and .VTX file support)
- mutagen
- numpy
- opencv-python
pafy (For the YouTube plug-in) (use this version: https://github.com/Cupcakus/pafy)python_weather (For the weather plugin)- pyradios (For Radio plugin)
- scikit-image
- soundfile
- streamlink (Replaces pafy for YouTube links, it also supports other stream services such as Twitch)
- tinydb
- validators
- wikipedia and wikipedia-api (For the Wikipedia plug-in)**
- ymodem (x/y modem file transfers)
- yt_dlp
- HersheyFonts
- openmeteo-requests (Rewritten weather plugin)
- requests-cache
- retry-requests
A basic requirements.txt file is available for quick installation of the required modules. Use:
pip install -r requirements.txt
Note
Wikipedia-API version is currently restricted to a version up to 0.6.0. If you're experiencing problems with the Wikipedia plugin try either upgrading to the latest version, or downgrade to 0.5.8
- FFmpeg >= 4.0 (for PCM audio streaming)
-
Optional but recommended:
RetroBBS uses the standard INI format for its configuration file (accepts the extended value interpolation method as used by the configparse Python module), the default file is config.ini, located in the root install directory:
Tip
Is recommended to build your own configuration file and point RetroBBS to that file using the -c command line option
[SECTION]
key = valuePlease study the example config.ini file included in this package for
more information.
When the BBS is idle (no visitors connected), it will reload the config file if it detects it has been modified. All settings will be updated, but network settings will only take place upon restart.
Global BBS settings
| key | description |
|---|---|
bbsname |
Name of the BBS |
menues |
Total number of menu pages, not counting the main menu page |
ip |
IP V4 address on which the BBS will be accessible, default is 127.0.0.1 |
port |
port number on which the BBS will be accessible |
lines |
Number of connection slots |
language |
language for transmitted texts, only partially implemented as of 0.60 |
welcome |
Welcome message on connection |
goodbye |
Log off message |
busy |
Message shown when all the connection slots are in use |
dateformat |
Format in which dates will be printed out, client-side: 0 = dd/mm/yyyy 1 = mm/dd/yyyy 2 = yyyy/mm/dd |
template |
Teamplate to use, name of the subdirectory inside /templates/. default will be used if this entry not defined. |
Settings for the available messaging boards
| key | description |
|---|---|
boardX |
(Where X > 0) Board name |
boardXview |
Minimum userclass that can read messages on this board (0 = public) |
boardXpost |
Minimum userclass that can post messages on this board (No less than 1) |
Directory paths to different BBS files, some are used internally, others are referenced in menu entry definitions. All paths must end with '/'.
| key | description |
|---|---|
bbsfiles |
Path to files used for login sequences and other general BBS information. |
audio |
Path to files for the audio library |
images |
Path to pictures for the Image gallery |
downloads |
Path to files for the program library |
temp |
Path to temporal files created by the BBS or its plugins |
Custom paths can be added here as needed
Any configuration options for installed plug-ins must be added under this section.
Defines the name and number of sections of the main menu.
| key | description |
|---|---|
title |
Title for the main menu |
sections |
Number of sections on the main menu |
prompt |
Prompt message to print at the bottom of the menu page |
(Where 1 <= y <= {MAINMENU:sections}) Defines section 'y' of the main menu.
| key | description |
|---|---|
title |
Title for this section (optional) |
entries |
Number of entries in this section |
columns |
Number of columns per line, valid values are 1 or 2, default is 2 |
Common menu entry keys:
| key | description |
|---|---|
entryZtitle |
(Where 1 <= Z <= {entries}) Entry title |
entryZkey |
Key press associated with this entry (UPPERCASE only) |
entryZdesc |
Entry description text, optional, only when the section is configured for 1 column |
entryZfunc |
Internal function or plug-in associated with this entry. Depending on the function, specific entry keys may be needed (See next chapter) Defaults to LABEL if omitted. |
entryZlevel |
(Optional) Minimum userclass required to access this entry, default 0 (public) |
entryZmode |
(Optional) Only display this entry if the client's platform matches. Multiple entries with same entryZkey but different entryZmode are allowed. |
Function/plug-in specific entry keys:
| key | description |
|---|---|
entryZpath |
A file system path |
entryZext |
File extensions to match, comma-separated list |
entryZid |
Menu ID number |
entryZurl |
An URL address |
(Where 1 <= x <= {MAIN:menues}) Defines the name and number of sections in menu 'x'
Keys: Same as in MAINMENU.
(Where 1 <= x <= {MAIN:menues} and 1 <= y <= {MAINMENU:sections}) Defines section 'y' of menu 'x'
Keys: Same as MAINMENUSECTIONy.
The following are the function names providing access to internal BBS functionality from the config file.
Enters PCM streaming mode and streams the audio file specified in the parameters.
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath1 |
Path to the audio file to stream (must be one of the supported formats) |
Streams the specified chiptune music file.
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the music file to stream (must be one of the supported formats) |
entryZplayt |
Playtime in seconds |
entryZsubt |
Subtune to play |
Streams the specified .SID or .MUS music file.
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the music file to stream (must be one of the supported formats) |
entryZplayt |
Playtime in seconds |
entryZsubt |
Subtune to play |
Switches the BBS to a different menu.
Configuration file parameter keys:
| key | description |
|---|---|
entryZid |
ID number of the menu to switch to |
Switches the BBS back to the previous menu.
Configuration file parameter keys: NONE
Shows the logoff prompt and terminates the connection if the user confirms to do so.
Configuration file parameter keys: NONE
Display/streams all the supported files in the specified directory in sequential (alphabetical) order, the user must press RETURN to skip to the next file.
Supported file types are:
- Doodle!, ArtStudio, Advanced Art Studio, Koala Paint, GIF, PNG and JPEG images
- MP3 and WAV audio files
- BIN and RAW byte streams
- ASCII and PETSCII text files
- PETMate and C syntax PETSCII screens
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the slideshow files |
Display the list of program files in a directory, the user-selected file will be transferred to memory/viewed/saved to disk, depending on the file type and the user choice.
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the program files, default is '/programs' |
entryZsave |
Set to True to allow saving the files to disk. |
entryZext |
Optional comma separated list of file extensions to display. If omitted the file extensions will be shown on the file browser. |
Display the list of images in a directory, the user-selected file will be transferred and displayed.
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the image directory, default is '/images' |
entryZsave |
Set to True to allow saving the files to disk. |
Display the list of audio files in a directory, the user-selected file will be streamed.
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the audio files, default is '/sound' |
Grab and display a video frame. File can be in any video format supported by OpenCV
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
Path to the video file, can be a local path or a URL |
Display the user profile editor.
Configuration file parameter keys: NONE
Display the list of registered users.
Configuration file parameter keys: NONE
Display the user's personal message inbox
Configuration file parameter keys: NONE
Display the message list for the specified board.
Configuration file parameter keys:
| key | description |
|---|---|
entryZid |
Board ID (>0) |
See the example config.ini for recommended usage.
Display non-interactive text in a menu. Combine it with an entry description text in 1 column mode for a menu description that doesn't have an associated key.
Send a file to the client, call the appropriate transfer routine. Optionally, show a file dialog or download to disk.
Supported file types include: JPG, GIF, PNG, ART, OCP, KOA, KLA, DD, DDL, BOTI, MP3, WAV, TXT, SEQ, TML and PRG
If the save option is enabled, any unsupported file will be transferred to disk
Configuration file parameter keys:
| key | description |
|---|---|
entryZpath |
File path |
entryZdialog |
Set to True to display a file dialog if available |
entryZsave |
Set to True to save the file to disk |
RetroBBS implements a simple plug-in system, on startup the BBS will import all python modules found in the <plugins> directory.
All plug-in modules should implement at least two functions:
setup() : This function must returns a tuple consisting of the plug-in name in uppercase, which will be used as the callable function on the config file. And a list of parameters, each element being a tuple itself. This tuple is made of the parameter name to use in the config file, and the corresponding default value in case the parameter is not found.
Example of the returned tuple for a plugin that will use the name 'CHAT' with parameters 'channel' and 'nick', which default to 'offtopic' and 'John' respectively:
('CHAT',[('channel','offtopic'),('nick','John')])plugfunction(conn, <extra parameters>) : The BBS will call this function to perform the plug-in's task.
The first parameter <conn> is a Connection object (see Chapter 4) to which the plug-in should direct its output.
Any extra parameters will follow, with the same names as returned by setup().
Retrieves and displays the text and picture from NASA's Astronomy Picture Of the Day.
- Configuration file function: APOD
- Configuration file parameters: NONE
- Configuration file [PLUGINS] options:
nasakey= Your NASA API key, obtained from https://api.nasa.gov/. Default isDEMO_KEY
Browse, search and download files from the Commodore Scene Database.
- Configuration file function: CSDB
Search and download files from _download.file-hunter.com.
- Configuration file function: FILEHUNTER
Basic and very experimental IRC client.
- Configuration file function: IRC
- Configuration file parameters:
| key | description |
|---|---|
entryZserver1 |
IRC server URL. Default is irc.libera.chat |
entryZport |
IRC server port. Default is 6667 |
entryZchannel |
IRC channel to enter upon connection. Default is NONE |
- Configuration file [PLUGINS] options: NONE
Explore the world through maps based on Openstreetmaps. Maps are rendered using the Stamen Design's Toner tiles. The map tiles are served by Stadia Maps, an API key is required for the plugin to work. To get the API key a free Stadia Maps account is required.
- Configuration file function: MAPS
- Configuration file parameters: NONE
- Configuration file [PLUGINS] options:
geoserver= Geocoder used to retrieve location data. Can be set to eitherNominatim(default) orPhoton.stadiakey= StadiaMaps API key.
Guess the word in this Wordle game clone. Solution list includes words from computer science, retrocomputing, programming, videogames and technology.
Registered users can play for a place in the high score table.
User-generated messages of up to 39 characters. The last 10 messages are stored in a JSON file located in the <plugins> directory.
- Configuration file function: ONELINER
- Configuration file parameters: NONE
- Configuration file [PLUGINS] options: NONE
Retrieves the latest ten entries from the specified RSS feed, upon user selection of the entry, it scrapes the target website for text and relevant picture. The plug-in is primarily targeted at WordPress sites, if it can't find the content it expects in the linked URL then the article text from the RSS feed itself will be displayed.
- Configuration file function: NEWSFEED
- Configuration file parameters:
entryZurl= URL to the RSS feed - Configuration file [PLUGINS] options: NONE
By Emanuele Laface
Uses Radio-browser.info API to search for and listen to internet radios.
- Configuration file function: RADIO
By Emanuele Laface
Search for and listen to podcasts.
- Configuration file function: PODCAST
A simple game of Tic-Tac-Toe that uses drawing primitives when available.
- Configuration file function: TICTACTOE
Displays current weather and forecast for the next 2-3 days as a Hires image. On first run it will display the weather corresponding to the passed Connection object's IP. Further weather forecasts can be queried by typing a new location.
-
Configuration file function: WEATHER
-
Configuration file parameters: NONE
-
Configuration file [PLUGINS] options:
wxunits=CorFfor metric or customary units, respectively. Defaults to metricwxdefault= Fallback location. Defaults to Meyrin, Switzerland.geoserver= Geocoder used to retrieve location data. Can be set to eitherNominatim(default) orPhoton.
On the fly conversion and streaming of online audio sources (Shoutcast, YouTube or other sources).
- Configuration file function: WEBAUDIO
- Configuration file parameters:
| key | description |
|---|---|
entryZurl |
full URL to the audio stream |
entryZimage |
Image to show before starting the stream, can be a local path or URL to an external file |
-
Configuration file [PLUGINS] options:
ytcookies= Path to your optional cookies.txt file, see the YouTube plugin for instructions
Search and display Wikipedia articles, displays relevant article image if found.
- Configuration file function: WIKI
- Configuration file parameters: NONE
- Configuration file [PLUGINS] options: NONE
Display a frame from the specified YouTube video. It will grab the latest frame if the video is a live stream. Otherwise, it grabs a random frame.
- Configuration file function: GRABYT
- Configuration file parameters:
| key | description |
|---|---|
entryZurl |
full URL to the YouTube video |
entryZcrop |
comma-separated list of image coordinates for cropping the video frame |
-
Configuration file [PLUGINS] options:
Other plug-ins not included in the distribution or by 3rd parties:
- QRcode: Generate and display a QR code
Located inside the <common> directory you'll find modules which implement what could be called the BBS' API. The use of some of these modules is mandatory when writing a new plug-in.
Creates and manages an PCM audio/SID file browser.
conn: Connection objecttitle: String to be used as the title for the file browserspeech: Optional string for the voice synthesizerlogtext: String to output in the logpath: Path to the directory to browse
Converts and streams a PCM audio file to <conn>.
filename: Path to the file to stream, file can be any audio file format supported by audioread/FFmpeglength: Length of the audio to stream in secondsdialog: Boolean, display audio metadata and instructions before starting streaming
Stream register writes data to the guest's sound chip
conn: Destinationfilename: Path to the SID fileptime: Playtime in secondsdialog: Display SID file metadata and instructions before starting streaming
Stream a SID file to conn
filename: Path to the SID fileptime: Playtime in secondsdialog: Display SID file metadata and instructions before starting streaming
check the Chiptune streaming protocol
Receive an audio stream from FFmpeg in chunks.
fn: Path to the audio, can either be a local filename path or an online stream.sr: Target sample rate
PCMStream.read(size): Read a chunk of data size bytes in length. Returns a byte string
PCMStream.stop(): Terminates an audio stream, and closes FFmpeg.
Prints message on stdout. message can be any expression valid for the print function.
The message will end in a newline by default, you can change this by passing a different end string in the _end parameter.
By default, the message will be preceded by the current date and time, disable this by passing False in the <date> parameter.
id: Should be the connection id corresponding to this message. Defaults to 0 -> general message.v: Verbosity level for this message. If greater than the level selected on startup, the log message will not be printed.
Also defined in this module is the class, which enumerates a few ANSI codes for use in the log messages.
Converts PIL image object <Source> into C64 graphic data.
gfxmode: selects the C64 graphic mode to use:0= HiRes1= MultiColor (default)lumaD: dithering type for the luminance channel, defaults 0, nonefullD: color dithering type, defaults to 6, bayer8x8preproc: Auto preprocessing of the image brightness/contrast.
Returns a tuple (e_img,cells,screen,color,bg_color) where:
e_img: PIL image object, rendering of the converted imagecells: C64 bitmap data (8000 bytes)screen: C64 screen matrix color data (1000 bytes)color: C64 color ram data (1000 bytes), used only in multicolor modebg_color: C64 background color (1 byte), used only in multicolor mode
Enum containing all the graphic modes supported by RetroBBS.
Current supported values:
C64HI: Commodore 64 hires bitmap
C64MULTI: Commodore 64 multicolor bitmap
P4HI: Commodore Plus/4 hires bitmap
P4MULTI: Commodore Plus/4 multicolor bitmap
MSXSC2: MSX Screen 2 bitmap
VTHI: VidTex hires bitmap
VTMED: VidTex medres bitmap
Enum containing the available dithering methods:
NONE: No dithering
BAYER2: 2x2 Bayer Ordered dither
BAYER4: 4x4 Bayer Ordered dither
BAYER4ODD: 4x4 Bayer Ordered dither, horizontal lines
BAYER4EVEN: 4x4 Bayer Ordered dither, Vertical lines
BAYER4SPOTTY: 4x4 Bayer Ordered dither, spotty
YLILUOMA: Yliluoma type 1 dither, very slow
CLUSTER: Cluster dither
FLOYDSTEINBERG: Floyd-Steinberg error diffusion dither
Enum containing the possible image position/crop/zoom presets:
LEFT: No scaling, positioned to the center-left and cropped to the target image size.
TOP: No scaling, positioned to the top-center and cropped to the target image size.
RIGHT: No scaling, positioned to the center-right and cropped to the target image size.
BOTTOM: No scaling, positioned to the bottom-center and cropped to the target image size.
T_LEFT: No scaling, positioned to the top-left and cropped to the target image size.
T_RIGHT: No scaling, positioned to the top-right and cropped to the target image size.
B_LEFT: No scaling, positioned to the bottom-left and cropped to the target image size.
B_RIGHT: No scaling, positioned to the bottom-right and cropped to the target image size.
CENTER: No scaling, centered and cropped to the target image size.
FILL: Scaled and cropped to fill the whole target image size.
FIT: Scaled to fit completely inside the target image size.
H_FIT: Scaled and cropped to fit the target width.
V_FIT: Scaled and cropped to fit the target height.
A simple class defining the image processing values:
- Brightness
- Contrast
- Saturation
- Hue
- Sharpness
Creating a ColorProcess without parameters and passing it to convert_To will result in no image processing being performed.
convert_To(Source, gfxmode:gfxmodes=gfxmodes.C64MULTI, preproc:ColorProcess=None, dither:dithertype=dithertype.BAYER8, threshold=4, cmatch=1, g_colors=None)
Convert a PIL image to a native graphic format.
Source: PIL image source, it will automatically be scaled/cropped to fit the target graphic modegfxmode: Target graphic modepreproc: Image preprocessing, passNonefor automatic image adjustment.dither: Dither methodthreshold: Dither thresholdcmatch: Color matching methodgcolors: Global colors list, passNonefor best guess
Returns a PIL image rendering of the result, a list of buffers containing the native data (platform/mode dependent), and a list of global colors
Returns a PIL "P" image with the dimensions and palette of mode, filled with bgcolor color index.
Open a native image file, returns a PIL image object, native image data and graphic mode
Implements the Connection class, this is the class used to communicate with clients, all plug-ins must include this module. Only properties and methods to be used by plug-ins are described below.
socket: Socket object for this connection. The socket is set to blocking mode by default, with a timeout of 5 minutes.addr: Client's IP address -READ ONLY-id: ID for this connection -READ ONLY-outbytes: Total number of bytes sent to this client -READ ONLY-inbytes: Total number of bytes received from this client -READ ONLY-samplerate: Supported PCM sample rate -READ ONLY-TermString: Client's terminal ID string -READ ONLY-T56KVer: Client's terminal reported Turbo56K version -READ ONLY-
QueryFeature(cmd): Query the client's terminal if command cmd is supported. Returned value is saved during the client's session. The query transaction will happen only the first time for each command.
If the command exist the returned value is the number of parameter bytes needed (up to 127). Otherwise the return value will have its 7th bit set.
QueryClient(subsystem): Query the client system setup, where subsystem is the specific system feature area, such as text screen dimensions, RAM or VRAM amount, etc.
Sendall(_string): Converts string _string to a binary string and sends it to the client.
Sendallbin(_string): Sends binary string _string to the client.
Flush(ftime): Flush the receiving buffer for ftime seconds.
FlushAll(): Flush the receiving buffer until it is empty.
Receive(count): Receives count binary chars from the client.
Returns: binary string.
NBReceive(count=1, timeout=3): Non-blocking version of Receive(), receives up to count binary chars within the time specified by timeout (in seconds).
Return: binary string. May be empty if no character was received within the given time.
ReceiveKey(keys=b'\r'): Wait for a received character from the client matching any of the characters in the keys parameter.keys can be:
- A binary string: ReceiveKey will wait for any character matching any one of the characters in passed parameter, no conversion performed before or after.
- A normal string: ReceiveKey will wait for any character matching any one of the characters in passed parameter, the passed parameter is encoded before comparison, and the received character is decoded before returning.
- A list of strings: ReceiveKey will wait for any character matching any one of the individual strings in the passed list. Only single character alphanumerical strings are encoded before comparison and decoded before returning. Strings containing control codes are left untouched. This option is useful for receiving control sequences, ie: ANSI escape codes.
Returns: The received matching char/string as a binary or normal string depending of the input parameter type.
ReceiveKeyQuiet(keys=b'\r'): Same as ReceiveKey, but no logging is ever performed, disregarding logging level. Use it when a password or other sensitive user data must be received.
ReceiveStr(keys, maxlen = 20, pw = False): Interactive reception with echo. The call is completed on reception of a carriage return.
keysis a binary or normal string with the accepted input characters. Use binary string for characters in the native encoding. Normal string for unencoded characters.maxlenis the maximum input string length
Set pw to True to echo * for each character received, ie, for password entry.
Returns: ASCII string received.
ReceiveInt(minv, maxv, defv, auto = False): Interactive reception of a positive integer with echo. The user will be restricted to entering a number between minv and maxv, if the user presses RETURN instead, the function will return defv.
If auto is True, the function will return automatically when the user enters the maximum number of digits possible within the limits, or by pressing DEL when there's no digit entered. In which case, this function will return None.
ReceiveDate(prompt, mindate, maxdate, defdate): Interactive reception of a calendar date with echo. The user will be restricted to enter a date between mindate and maxdate, if the user presses RETURN instead, the function will return defdate. The date format will follow the user preference if set, otherwise the global BBS date format will be used. Returns a datetime.date object
SendTML(data, registers: dict = {'_A':None,'_S':'','_I':0}): Parse and send a data TML script to the client, optionally initialize the TML parser registers. Returns a dictionary with the last states of the TML parser registers.
Get a list of (id, username) pairs. Both id and username are strings.
Get a dictionary containing the preferences corresponding to the user id. Pass the defaults values in case the user has no/incomplete preferences.
Update the preferences corresponding to user id with the contents of the prefs dictionary
SendBitmap(conn, filename, dialog=False, save= False, lines=25, display=True, gfxmode:gfxmodes=gfxmodes.C64MULTI, preproc:ColorProcess=None, dither:dithertype=dithertype.BAYER8):
Convert image to C64 mode and send it to the client. Important: The parameter order has changed since v0.25
conn: Connection objectfilename: Path to image file/bytes object/PIL image objectsave: Set toTrueto save the image to disk. DefaultFalselines: Total number of lines (1 line = 8 pixels) to transfer starting from the top of the screen, max/default =25display: Set toTrueto send Turbo56K commands to display the image after the transfer is completeddialog: Set toTrueto send a dialog asking for graphics mode selection before converting and transferring the imagegfxmode: Target graphic mode. Might be overridden by user selection ifdialogisTruepreproc: Image processing parameters prior to conversion. PassNonefor automatic processing.dither: Dither method to use if the image needs to be converted togfxmode.
Sends program file into the client memory at the correct address in turbo mode
conn: Connection objectfilename: Path of the program file to be sent
Calls the right transfer function for each supported file type. If selected, will display a dialog beforehand.
conn: Connection objectfilename: Path of the file to be sentdialog: Set toTrueto send a dialog asking the action to take. DefaultFalsesave: Set toTrueto transfer the file to disk. IfdialogisTrue, then the save option will be added.
Sends a file directly without processing
conn: Connection objectfilename: Path of the file to be sentwait: Boolean, wait forRETURNafter sending the file
Starts a file transfer to disk, pending the client acceptance.
conn: Connection objectfile: Either the path string to the file to transfer. Or a bytes object with the actual data to be transferred.savename: The name used to save the file on the disk. Mandatory iffileis a bytes object.seq: Set toTrueto save the file as a SEQ file. Otherwise, it will be saved as a PRG file.
Display a text (.txt) or sequential (.seq) file.
Text files are displayed through common.helpers.More.
Sequential files are scanned for PETSCII control codes and interpreted accordingly.
conn: Connection objectfilename: Path to the file to displaytitle: If not empty, will be used to display a title bar. Otherwise, no title bar will be rendered.lines: Number if lines available before scrolling.
Display a .c formatted C64 text screen, as exported by PETSCII or PETMate. Multiple frames per file are supported
conn: Connection objectfilename: Path to the file to displaypause: Seconds to pause between frames. Default: 0, wait for user to press RETURN.
Display a .PET formatted C64 text screen, as exported by PETMate. Returns immediately
conn: Connection objectfilename: Path to the file to display
Misc functions that do not fit anywhere else at this point. Functions might get deprecated and/or moved to other modules in the future.
valid_keys: A string containing the valid characters to be used as user input.
font_bold: Default bold Imagefont for use on bitmaps, 16px height.
font_big: Default big Imagefont for use on bitmaps, 24px height.
font_text: Default text Imagefont for use on bitmaps, 16px height.
Formats the text into columns columns with word wrapping, convert selects if PETSCII conversion is performed (convert is deprecated).
Paginates text, sends it to conn, the user must press RETURN to get next page(s). Supports most control codes, including color and cursor movement.
lines: how many lines per page to transfer. Useful when using the windowing commands.colors: abbsstyleobject defining the color set to use.
Displays text in a text window lines in height. Scrolling up and down with the cursor keys.
conn: Connection objecttext: Preformatted text list, as returned byformatXlines: How tall is the text window in use. Text window limits must be set before callingtext_displayer. Actual displayed text lines islines-1colors: Color style to use for rendering the text.
Cuts text to a maximum of length characters, adding an ellipsis to the end if needed.
Cuts text to max width pixels using font, adding an ellipsis to the end if needed.
Convert an integer b depicting a size in bytes to a string rounded up to B/KB/MB/GB or TB
Return a list of files (and subdirectories) in the specified top directory
path: Top directorydirs: Include subdirectories? Default Falsefull: Each entry in the list includes the full path. Default True
Returns True if the parameter passed exists as a local path
DEPRECATED - Superceded by the encoder class.
Some basic routines to render UI elements using the style/template system.
Sends the menu title header with text title to conn, using the style title template or the default style template of none is passed.
Returns the key prompt string for text. The prompt takes the form [<text>] using the colors defined by the style.
Set TML to True to return a TML string instead. IMPORTANT: TML string output will become the default in the future.
Renders menu option label for assigned key in the selected style keylabel template, the toggle boolean switches between odd/even styles.
The result is sent to conn
Renders the background/area for file view/play/transfer dialogs.
conn: Connection object
height: Desired height in rows for the dialog
title: Optional title string
Defines the Turbo56k protocol constants and helper functions
The following functions return either a string or a binary string for use with the Connection.Sendall() or Connection.Sendallbin() methods.
Switch the client screen to text mode.
pageis the text memory page to useborderandbackgroundset the corresponding client screen colorsbinselects the return string type
Switch the client screen to Hires graphic mode.
pageis the bitmap memory page to useborderis the client screen border colorbinselects the return string type
Switch the client screen to multicolor graphic mode.
pageis the bitmap memory page to useborderandbackgroundset the corresponding client screen colorsbinselects the return string type
Sets the destination address for the next block transfer command.
addressa valid 16-bit integer value for the destination memory addressbinselects the return string type
Set the destination address for the next block transfer to the one defined by preset
binselects the return string type
Transfer the binary string data to the client.
This function returns the entire command sequence to complete the transfer as a byte string, including data. Normal usage is calling SendAllbin with the result of this function as the parameter
Selects the client screen as the output.
binselects the return string type
Selects the optional hardware speech synthesizer as text output.
binselects the return string type
Return a command sequence that enables the cursor, disables split screen and resets text window limits.
binselects the return string type
Sets the client's text cursor position to column, row coordinates
binselects the return string type
Fill the client screen row with char (in C64 or MSX screencode), fill color is the last used.
binselects the return string type
Enables the client's text cursor.
binselects the return string type
Disables the client's text cursor.
binselects the return string type
Splits the client's screen into a bitmap top and a text bottom parts.
linethe text screen row on which the split occursmultiboolean,Truefor Multicolor mode on the top part,Falsefor Hiresbgtop: Background color for the top part, only used when Multicolor mode is selectedbgbottom: Background color for the bottom partbinselects the return string type
Set the top and bottom limits for the client text output, this includes scrolling and screen clearing.
binselects the return string type
Scroll up or down rows number of times. Positive values scroll up, negative scroll down.
binselects the return string type
Set the text in color to color index.
binselects the return string type
Clear the graphic screen.
binselects the return string type
Set the graphic pen to color index.
binselects the return string type
Plot a point on the graphic screen at the x,y coordinates, using the pen color.
binselects the return string type
Draw a line in the graphic screen, from x1,y1 to x2,y2, using the pen color.
binselects the return string type
Draw a box delimited by the coordintates x1,y1,x2,y2, using the pen color.
fillthe box if True.binselects the return string type
Draw a circle or ellipse centered at x,y with radii rx and ry, using the pen color.
binselects the return string type
Perform a flood fill starting at coordinates x,y, using the pen color.
binselects the return string type
Video related routines.
Grab's a frame from the specified video file/stream.
conn: connection to send the image topath: video file/stream path or URLcrop: a tuple with the 4 corners coordinates for cropping the video frame, or Nonelength: video playtime in milliseconds. Pass None to let Grabframe to figure the playtime, or 0 to indicate a live streampos: Grab the frame atposmilliseconds. Pass None for random frame. Ignored if the video is a live stream
RetroBBS v0.50 started moving towards an encoding agnostic implementation. This means reducing to a minimum instances of hard coded platform specific strings and control codes, replacing them with generic ASCII/Unicode strings and TML tags.
For this purpose a new Encoder class has been created.
This class provides platform specific encoding/decoding of strings, as well as defining the basic control codes and color palette.
Encoders implement the following functionality:
- Encoding/Decoding to and from a client's native text format.
- List of graphic modes
- Color palette information
- Native word wrapping, maintaining control codes
- Check if a file fits in the client's available RAM for memory transfer
- Get a file's load/start address
For an extensive description of the currently supported encoders check the dedicated documentation
- Just unpack this archive into a directory of your choice.
- Install the required python modules and extra software.
If you're upgrading a previous installation, make sure to not overwrite your configuration files with the ones included as example.
[!MPORTANT] For v0.20 and above, all text parameters in the config file are expected to be encoded in ASCII, if you're updating from v0.10, remember to convert your PETSCII parameters.
Important
If you're upgrading from a version older than v0.50 you'll need to change the case of your menu entries in your config.ini (If you were using uppercase, switch to lowercase and vice versa)
You can run this script from a command line by navigating to the Installation directory and then issuing:
python retrobbs.py
or
python3 retrobbs.py
depending on your python install.
Optional arguments:
-v[1-4]sets the verbosity of the log messages, a value of 1 will only output error messages, while a value of 4 will output every log line.-c [file name]sets the configuration file to be used, defaults toconfig.ini
On most cases upgrading can be done by simply extracting the new version over the previously installed.
But you might need to be aware to not overwrite these files:
config.iniif you're using an edited version of this default file instead of file with another name.- The contents of the
bbsfilessubdirectory, if you have customized the any of the default splash graphics, theterms/rules.txtorlogoff.tmlfiles, or changed the files in theintrosubdirectory but still use the same default filenames. - The contents of the
templates/defaultsubdirectory if you have customized the default template instead of making your own copy.
Once a connection with established and a supported client is detected/selected, the login/guest screen will be displayed.
Turbo56K compatible clients will enter into split screen mode and display the splash bitmap file found in the bbsfiles path preset.
The user will then be asked if he wants to log in or continue as a guest.
- The actual
splashfile depends on the detected client, and themain/splash.j2template:
splash.artfor Commodore 64 clientssplash.botifor Plus/4 clientssplash.sc2for MSX1 clients
After a successful login or directly after choosing guest access, the supported files in the subdirectory [bbsfiles]/intro will be shown/played in alphabetical order.
Starting in v0.50 an example TML script is placed at the end of the [bbsfiles]/intro sequence. This script will greet a logged-in user and show the amount of unread public and private messages if any.
From v0.60 two additional TML scripts can be placed in the [bbsfiles] directory:
newsession.tmlwill run for every new connection right before the main menu is displayed, regardless if the intro sequence has been skipped. Useful if you want to trigger certain actions at login time, such as display news, or the oneliner plugin.logoff.tmlwill run when the client closes the connection the proper way, can be used to display connection statistics or display a goodbye image/text.
Currently, the SID streaming routines are only accessed from the AUDIOLIBRARY and SLIDESHOW internal functions. These functions will set the song length by searching for the .ssl files corresponding the .sid files found, defaulting to 3 minutes when not found.
The .ssl format is used by the songlength files part of the High Voltage SID Collection (http://hvsc.c64.com). HVSC uses a SONGLENGTHS subdirectory to store the .ssl files, RetroBBS can also read these files in the same directory where the .sid files are located.
RetroBBS supports the creation of user accounts, this allows for the restriction of BBS areas according to user classes and the incorporation of the messaging system.
TinyDB is used as the database backend. The database is a JSON file located in the bbsfiles directory.
Upon registering, the user will be shown the file rules.txt located in bbsfiles/terms, you should edit this file according to your needs.
When registering, the user will be asked the following data:
- Password (stored as a salted hash in the database)
- First and last names
- Country of origin
- Date of birth (Date format is defined by the
dateformatparameter in the config file)
A registered user will have a userclass=1 by default. Unregistered users (guests) have a userclass=0. Admins/Sysops are those with a userclass=10.
You can use user classes 2 to 9 for more access granularity as you see fit.
A separate script for database management is included in the form of dbmaintenance.py
Execute it by issuing the following command (while the BBS is not running):
python dbmaintenance.py
or
python3 dbmaintenance.py
With this script you can:
- Edit user data, and change their user class.
- Delete users
- Add users
The script will also do a quick integrity check on the database file.
Important
When setting up a new BBS (or upgrading from v0.10) use dbmaintenance.py to create your account and set your class as 10 to assign yourself as admin/sysop.
The messaging system permits unlimited public or semipublic boards plus a personal messages board for each registered user.
Messages can be up to 3000 characters in length.
The message editor works on a per-line basis, completing a line by pressing RETURN, passing the client screen width limit, or selecting another line to edit (by pressing F7/F3/F5 on C64/Plus4/MSX respectively).
On entering the editor, if the user is starting a new message thread, they will be asked first to enter a topic for the thread.
Once done with the editing, the user should press F8/Esc/F10 and will be prompted if they want to continue editing, send the message, or cancel the message.
A user with admin/sysop user class (10) can delete threads or individual messages (deleting the first message in a thread will delete the whole thread).
The path preset temp is used by the BBS or its plugins to store temporal files.
Currently, the file browser, the SID streaming function and the CSDb and file-hunter plugins make use of this path.
If you're running the BBS from a Raspberry Pi or other SBC that uses an SD card as main storage we recommend creating a RAM disk and point the temp path to it. This will reduce the wear on your SD card.
First create a mount point:
sudo mkdir /mnt/ramdisk
(You can replace ramdisk by any valid name of your choice)
Next you have to mount your new RAM disk:
sudo mount -t tmpfs -o rw,size=1M tmpfs /mnt/ramdisk
Here the "1M" means the RAM disk will have a size of 1 Megabyte, this is more than enough for most use cases, but take into account that files downloaded from CSDb or file-hunter can be larger than this limit and will be saved here if the user decided to browse a .zip archive instead of direct download.
To make this change permanent you'll need to add the previous command to your fstab file.
First make a backup of your fstab file:
sudo cp -v /etc/fstab /etc/fstab.backup
Next open /etc/fstab in your favorite text editor (as administrator), and add the following line at the end of the file:
sudo mount -t tmpfs -o rw,size=1M tmpfs /mnt/ramdisk
And save it.
On your next reboot /mnt/ramdisk should be mounted and ready to use.
Lastly change the temp path in your configuration file:
...
[PATHS]
temp = /mnt/ramdisk/
...In v0.6 a template system based on Jinja2 has been introduced.
The templates reside on the templates directory.
An example directory tree:
templates
├── default
│ ├── csdb
│ │ └── menutitle.j2
│ ├── default.json
│ ├── main
│ │ ├── dialog.j2
│ │ ├── keylabel.j2
│ │ ├── menusection1col.j2
│ │ ├── menusection2col.j2
│ │ ├── menusection_macros.j2
│ │ ├── menutitle.j2
│ │ ├── navbar.j2
│ │ └── splash.j2
│ ├── mindle
│ │ ├── default.json
│ │ └── title.j2
│ ├── oneliner
│ │ └── title.j2
│ └── wiki
│ └── default.json
└── theme2
└── main
└── splash.j2
In this example, there are two template themes, the default theme and a custom theme named theme2.
A theme directory contains a subdirectory called main which contains the default templates for the BBS core, such as menus, navigation bar, splash screen, etc.
If a plugin supports templates, it will have its own subdirectory, the templates can be made ad-hoc for the plugin, or override core functions, such as the title bar.
Besides the Jinja2(.j2) template files there is also a .json file that contains the color style (preset screen and text colors) to be used by the BBS
The following variables are always available to the templates:
- conn: The Connection object
- st: A bbsstyle object
- mode: The connection mode string
- scwidth: The client's text screen width in columns
- scheight: The client's text screen height in lines
Specific variables can and are of course be passed from the code if needed, read below and the Jinja2 documentation for more info.
Although a template can be as simple as a plain text that will show for every supported client. The preferred structure is to use Jinja's conditionals to customize the rendering to each client type, for example:
<CLR>
{% if 'PET' in mode %}
<GREY3><RVSON>
This text will show on Commodore clients
{% elif mode == 'MSX1' %}
<WHITE><RVSON>
And this text will show on MSX clients
{% elif mode in ['ANSI','ATRSTL'] %}
This other text will show for ANSI and Atari ST on low res mode
{% else %}
For everything else, this will be the text.
{% endif %}This is called when displaying the Login/Guest prompt.
Defines how to display a menu entry, consisting of the key to press and the menu name/label.
- key: A single character
- label: The menu name/label string
- toggle: A boolean, define if the menu entry will use the odd or even color style
Called for each menu section with menu entries arranged in a single column.
- section: The menu section dictionary
- scount: Section number
formatX()crop()unescape()
The same as menusection1col.j2 but for menu entries arranges in two columns.
Defines the title bar of a menu screen, usually the three topmost screen lines.
Defines the navigation bar usually displayed at the second to last screen line, displaying the control keys available.
- barline: Preferred screen line to display the navbar on
- pages: The keys assigned for the page up/down function
- crsr: The keys assigned for single line up/down function
- keys: A list of
(key,function)tuples, with custom key functions
Defines the aspect of the dialog shown when the user is given an option to display, open, play or download a file.
- height: The dialog height in text lines
- title: The title to display at the top of the dialog
crop()
- More code cleanup, move more functions out of the main script and into their corresponding modules.
- Complete user style customization
- Localization
- Figure out a way to remove hard-coded file type handling.
- Add RIPscrip/Skypix support for ANSI terminals.
- Add Latin1 ANSI variant for Amiga terminals.
- Implement @idolpx's dockerization of the BBS.
- Set on an API naming convention. Right now function names are all over the place.
- Config file parser still doesn't check for all errors, a poorly built configuration file will cause a crash on startup.
- If updating from v0.10, the messages already existing in the oneliners.json file will have the wrong encoding. New messages will display correctly.
- When downloading a file using XMODEM in VIP Terminal, transfer will fail around block 46.
- VTX files cannot be opened when running RetroBBS with some Python 3.12 distributions, upgrading to Python 3.13 or above should solve the problem.
- When connecting to the BBS with the CCGMS Future terminal in 80 column mode and 2400bps (userport), deleting characters might cause loss of data, this can cause problems when displaying text with the MORE function. This is a limitation of CCGMS Future , not RetroBBS, and can be avoided by reducing the connection speed to 1200bps.
- Jorge Castillo (Pastbytes) - Original idea, creator and developer of Turbo56K, Retroterm and RetroBBS
- Pablo Roldán (Durandal) - Developer of RetroBBS and Retroterm, extension of Turbo56K protocol
Thanks go to the following persons who helped in the testing of RetroBBS
- Thierry Kurt
- Ezequiel Filgueiras
- Juan Musso
- Vaporatorius
- Gabriel Garcia
- Roberto Mandracchia
- ChrisKewl - twitter.com/chriskewltv
Also many thanks to Emanuele Laface for the Radio and Podcast plugins. And Jaime Idolpx for fixing audio streaming under Mac.
- SIDdump by Lasse Öörni (cadaver)
- FFmpeg by the FFmpeg team
- Betterpixels font by AmericanHamster
- karen2blackint font by PaulSpades
- Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.
- sid2psg.py by simondotm under MIT license (https://github.com/simondotm/ym2149f/tree/master)