Compare commits

..

No commits in common. "fd000559ad26eb8734d962e7d77fc03c1fcb5dc4" and "8e2d96776fa88498fc3b03980cd412742fda39be" have entirely different histories.

2 changed files with 17 additions and 38 deletions

View File

@ -2,20 +2,13 @@
A message board for packet radio, suitable for use with ax25d. A message board for packet radio, suitable for use with ax25d.
Really Simple BBS (`rsbbs`) implements a bulletin board system that enables Really Simple BBS (`rsbbs`) implements a bulletin board system that enables radio amateurs to read and store messages at your station. It is similar to the PBBS function of popular Kantronics TNCs, and it uses similar commands (`B`, `J`, `K`, `L`, `R`, `S`, `H`, etc.).
radio amateurs to read and store messages at your station. It is similar to the
PBBS function of popular Kantronics TNCs, and it uses similar commands (`B`,
`J`, `K`, `L`, `R`, `S`, `H`, etc.).
It is designed to run on a linux system when called by `ax25d`. That is, when a It is designed to run on a linux system when called by `ax25d`. That is, when a user calls your station, `ax25d` answers the call and routes the connection to `rsbbs` via standard input (`stdin`). `rsbbs` responds to the user through `ax25d` via standard output (`stdout`).
user calls your station, `ax25d` answers the call and routes the connection to
`rsbbs` via standard input (`stdin`). `rsbbs` responds to the user through
`ax25d` via standard output (`stdout`).
## Requirements ## Requirements
In general, you need a linux system with ax25d configured and working. This is In general, you need a linux system with ax25d configured and working. This is a python 3 application, so you will need python 3 also.
a python 3 application, so you will need python 3 also.
## Installation ## Installation
@ -29,8 +22,7 @@ Until I publish this thing to PyPI, you can clone it and build it yourself:
## Configuration ## Configuration
By default, the `config.yaml` file lives in your system's user config By default, the `config.yaml` file lives in your system's user config directory, such as `~/.config/rsbbs/config.yaml`.
directory, such as `~/.config/rsbbs/config.yaml`.
To use a `config.yaml` file from a different location, use the `-f` option: To use a `config.yaml` file from a different location, use the `-f` option:
``` ```
@ -45,8 +37,7 @@ The `config.yaml` file is pretty simple and self-explanatory for now.
### With ax25d ### With ax25d
Assuming you have `ax25d` working on your system, add something like the Assuming you have `ax25d` working on your system, add something like the following to your `ax25d.conf` file:
following to your `ax25d.conf` file:
``` ```
[KI5QKX-10 via vhf0] [KI5QKX-10 via vhf0]
@ -55,15 +46,13 @@ default * * * * * * * root /usr/local/bin/rsbbs rsbbs -s %U
Notes: Notes:
- The installation path may vary on your system. - The installation path may vary on your system.
- Be sure to specify the `-s %U` parameters; this passes the ax.25 caller's - Be sure to specify the `-s %U` parameters; this passes the ax.25 caller's callsign to the `rsbbs` application.
callsign to the `rsbbs` application.
See the ax25d man page for more details. See the ax25d man page for more details.
### Directly ### Directly
You can also run it directly, for administration purposes or just to talk to You can also run it directly, for administration purposes or just to talk to yourself. It will not accept calls when run without ax25d.
yourself. It will not accept calls when run without ax25d.
``` ```
rsbbs -s URCALL rsbbs -s URCALL
@ -88,8 +77,7 @@ options:
## Operation ## Operation
Check out the [sample transcript](sample_transcript.txt) for a look at how it Check out the [sample transcript](sample_transcript.txt) for a look at how it works.
works.
## Development ## Development

View File

@ -285,21 +285,6 @@ class BBS():
self._write_output(f"") self._write_output(f"")
self._write_output(f"{message.Message.message}") self._write_output(f"{message.Message.message}")
def print_greeting(self):
# Show greeting
greeting = []
greeting.append(f"[RSBBS-{__version__}] listening on "
f"{self.config['callsign']} ")
greeting.append(f"Welcome to {self.config['bbs_name']}, "
f"{self.calling_station}")
greeting.append(self.config['banner_message'])
greeting.append("For help, enter 'h'")
self._write_output('\r\n'.join(greeting))
# #
# BBS command functions # BBS command functions
# #
@ -457,9 +442,15 @@ class BBS():
# #
def run(self): def run(self):
# Show greeting # Show greeting
self.print_greeting() greeting = []
greeting.append(f"[RSBBS-{__version__}] listening on "
f"{self.config['callsign']} ")
greeting.append(f"Welcome to {self.config['bbs_name']}, "
f"{self.calling_station}")
greeting.append(self.config['banner_message'])
greeting.append("For help, enter 'h'")
self._write_output('\r\n'.join(greeting))
# Show initial prompt to the calling user # Show initial prompt to the calling user
self._write_output(self.config['command_prompt']) self._write_output(self.config['command_prompt'])
@ -469,7 +460,7 @@ class BBS():
try: try:
args = self.parser.parse_args(line.split()) args = self.parser.parse_args(line.split())
args.func(args) args.func(args)
except Exception as e: except Exception as msg:
pass pass
# Show our prompt to the calling user again # Show our prompt to the calling user again