rename web.py to meshchat.py

This commit is contained in:
liamcottle
2024-07-09 17:38:45 +12:00
parent dad956ab14
commit 879632a953
4 changed files with 11 additions and 11 deletions

View File

@@ -120,20 +120,20 @@ Remember, in order to connect with other peers or nodes, they must announce on t
## How does it work?
- A python script ([web.py](./web.py)) runs a Reticulum instance and a WebSocket server.
- A python script ([meshchat.py](./meshchat.py)) runs a Reticulum instance and a WebSocket server.
- The web page sends and receives LXMF packets encoded in json via the WebSocket.
- Web Browser -> WebSocket -> Python Reticulum -> (configured interfaces) -> (destination)
- LXMF messages sent and received are saved to a local SQLite database.
## How to use it?
If you don't want to, or can't [download](#download) a standalone application, you will need to install [Python 3](https://www.python.org/downloads/), clone the source code from this repo, install dependencies and then run `web.py`.
If you don't want to, or can't [download](#download) a standalone application, you will need to install [Python 3](https://www.python.org/downloads/), clone the source code from this repo, install dependencies and then run `meshchat.py`.
```
git clone https://github.com/liamcottle/reticulum-meshchat
cd reticulum-meshchat
pip install -r requirements.txt
python web.py
python meshchat.py
```
> NOTE: You should now be able to access the web interface at http://localhost:8000
@@ -141,11 +141,11 @@ python web.py
For a full list of command line options, you can run;
```
python web.py --help
python meshchat.py --help
```
```
usage: web.py [-h] [--host [HOST]] [--port [PORT]] [--headless] [--identity-file IDENTITY_FILE] [--identity-base64 IDENTITY_BASE64] [--generate-identity-file GENERATE_IDENTITY_FILE] [--generate-identity-base64]
usage: meshchat.py [-h] [--host [HOST]] [--port [PORT]] [--headless] [--identity-file IDENTITY_FILE] [--identity-base64 IDENTITY_BASE64] [--generate-identity-file GENERATE_IDENTITY_FILE] [--generate-identity-base64]
[--reticulum-config-dir RETICULUM_CONFIG_DIR] [--storage-dir STORAGE_DIR]
ReticulumMeshChat
@@ -181,7 +181,7 @@ If you want to use an existing identity;
To use a custom identity file, provide the `--identity-file` argument followed by the path to your custom identity file.
```
python web.py --identity-file ./custom_identity_file
python meshchat.py --identity-file ./custom_identity_file
```
If you would like to generate a new identity, you can use the [rnid](https://reticulum.network/manual/using.html#the-rnid-utility) utility provided by Reticulum.
@@ -193,13 +193,13 @@ rnid --generate ./new_identity_file
If you don't have access to the `rnid` command, you can use the following:
```
python web.py --generate-identity-file ./new_identity_file
python meshchat.py --generate-identity-file ./new_identity_file
```
Alternatively, you can provide a base64 encoded private key, like so;
```
python web.py --identity-base64 "GCN6mMhVemdNIK/fw97C1zvU17qjQPFTXRBotVckeGmoOwQIF8VOjXwNNem3CUOJZCQQpJuc/4U94VSsC39Phw=="
python meshchat.py --identity-base64 "GCN6mMhVemdNIK/fw97C1zvU17qjQPFTXRBotVckeGmoOwQIF8VOjXwNNem3CUOJZCQQpJuc/4U94VSsC39Phw=="
```
> NOTE: this is a randomly generated identity for example purposes. Do not use it, it has been leaked!

View File

@@ -4,7 +4,7 @@ from peewee import *
from playhouse.migrate import migrate as migrate_database, SqliteMigrator
latest_version = 2 # increment each time new database migrations are added
database = DatabaseProxy() # use a proxy object, as we will init real db client inside web.py
database = DatabaseProxy() # use a proxy object, as we will init real db client inside meshchat.py
migrator = SqliteMigrator(database)

View File

@@ -25,7 +25,7 @@ from src.audio_call_manager import AudioCall, AudioCallManager
# NOTE: this is required to be able to pack our app with cxfreeze as an exe, otherwise it can't access bundled assets
# this returns a file path based on if we are running web.py directly, or if we have packed it as an exe with cxfreeze
# this returns a file path based on if we are running meshchat.py directly, or if we have packed it as an exe with cxfreeze
# https://cx-freeze.readthedocs.io/en/latest/faq.html#using-data-files
def get_file_path(filename):
if getattr(sys, "frozen", False):

View File

@@ -6,7 +6,7 @@ setup(
description='A simple mesh network communications app powered by the Reticulum Network Stack',
executables=[
Executable(
script='web.py', # this script to run
script='meshchat.py', # this script to run
base=None, # we are running a console application, not a gui
target_name='ReticulumMeshChat', # creates ReticulumMeshChat.exe
shortcut_name='ReticulumMeshChat', # name shown in shortcut