Updated console site

This commit is contained in:
Mark Qvist 2023-01-13 01:43:47 +01:00
parent 70f40e3a77
commit 832ee413ba
6 changed files with 66 additions and 20 deletions

View File

@ -7,6 +7,8 @@ clean:
dirs: dirs:
@mkdir -p ./build @mkdir -p ./build
@mkdir -p ./build/3d
@mkdir -p ./build/pkg
@mkdir -p ./build/css @mkdir -p ./build/css
@mkdir -p ./build/gfx @mkdir -p ./build/gfx
@mkdir -p ./build/images @mkdir -p ./build/images

View File

@ -153,7 +153,8 @@ def generate_html(f, root_path):
page_html = markdown.markdown(md, extensions=["markdown.extensions.fenced_code"]).replace("{ASSET_PATH}", root_path) page_html = markdown.markdown(md, extensions=["markdown.extensions.fenced_code"]).replace("{ASSET_PATH}", root_path)
page_html = page_html.replace("{LXMF_ADDRESS}", LXMF_ADDRESS) page_html = page_html.replace("{LXMF_ADDRESS}", LXMF_ADDRESS)
for pkg_name in packages: for pkg_name in packages:
page_html = page_html.replace("{PKG_"+pkg_name+"}", pkg_name+".zip") page_html = page_html.replace("{PKG_"+pkg_name+"}", "pkg/"+pkg_name+".zip")
page_html = page_html.replace("{PKG_BASE_"+pkg_name+"}", pkg_name+".zip")
page_html = page_html.replace("{PKG_NAME_"+pkg_name+"}", packages[pkg_name]) page_html = page_html.replace("{PKG_NAME_"+pkg_name+"}", packages[pkg_name])
page_date = get_prop(md, "date") page_date = get_prop(md, "date")
@ -172,18 +173,30 @@ mf.write(help_redirect)
mf.close() mf.close()
def optimise_manual(path): def optimise_manual(path):
pm = 176
scale_imgs = [ scale_imgs = [
("_images/board_rnodev2.png", 256), # ("_images/board_rnodev2.png", 256),
("_images/board_rnode.png", 256), # ("_images/board_rnode.png", 256),
("_images/board_heltec32.png", 256), # ("_images/board_heltec32.png", 256),
("_images/board_t3v21.png", 256), # ("_images/board_t3v21.png", 256),
("_images/board_t3v20.png", 256), # ("_images/board_t3v20.png", 256),
("_images/sideband_devices.webp", 380), # ("_images/sideband_devices.webp", 380),
("_images/board_tbeam.png", 256), # ("_images/board_tbeam.png", 256),
("_images/nomadnet_3.png", 380), # ("_images/nomadnet_3.png", 380),
("_images/radio_is5ac.png", 256), # ("_images/radio_is5ac.png", 256),
("_images/radio_rblhg5.png", 256), # ("_images/radio_rblhg5.png", 256),
("_static/rns_logo_512.png", 256), # ("_static/rns_logo_512.png", 256),
("_images/board_rnodev2.png", pm),
("_images/board_rnode.png", pm),
("_images/board_heltec32.png", pm),
("_images/board_t3v21.png", pm),
("_images/board_t3v20.png", pm),
("_images/sideband_devices.webp", pm),
("_images/board_tbeam.png", pm),
("_images/nomadnet_3.png", pm),
("_images/radio_is5ac.png", pm),
("_images/radio_rblhg5.png", pm),
("_static/rns_logo_512.png", pm),
] ]
import subprocess import subprocess
@ -236,6 +249,37 @@ def fetch_reticulum_site():
shutil.copytree(PACKAGES_PATH+"/reticulum.network", r_site_path) shutil.copytree(PACKAGES_PATH+"/reticulum.network", r_site_path)
if os.path.isdir(r_site_path+"/manual"): if os.path.isdir(r_site_path+"/manual"):
optimise_manual(r_site_path+"/manual") optimise_manual(r_site_path+"/manual")
remove_files = [
"gfx/reticulum_logo_512.png",
]
for file in remove_files:
fp = r_site_path+"/"+file
print("Removing file: "+str(fp))
os.unlink(fp)
replace_paths()
def replace_paths():
repls = [
("gfx/reticulum_logo_512.png", "/m/_static/rns_logo_512.png")
]
for root, dirs, files in os.walk(BUILD_PATH):
for file in files:
fpath = root+"/"+file
if fpath.endswith(".html"):
print("Performing replacements in "+fpath+"")
f = open(fpath, "rb")
html = f.read().decode("utf-8")
f.close()
for s,r in repls:
html = html.replace(s,r)
f = open(fpath, "wb")
f.write(html.encode("utf-8"))
f.close()
# if not os.path.isdir(BUILD_PATH+"/d"):
# os.makedirs(BUILD_PATH+"/d")
# shutil.move(fpath, BUILD_PATH+"/d/")
def remap_names(): def remap_names():
for root, dirs, files in os.walk(BUILD_PATH): for root, dirs, files in os.walk(BUILD_PATH):
@ -269,7 +313,7 @@ for pkg_name in packages:
pkg_full_path = PACKAGES_PATH+"/"+pkg_file pkg_full_path = PACKAGES_PATH+"/"+pkg_file
if os.path.isfile(pkg_full_path): if os.path.isfile(pkg_full_path):
print("Including "+pkg_file) print("Including "+pkg_file)
z = ZipFile(BUILD_PATH+"/"+pkg_name+".zip", "w") z = ZipFile(BUILD_PATH+"/pkg/"+pkg_name+".zip", "w")
z.write(pkg_full_path, pkg_full_path[len(PACKAGES_PATH+"/"):]) z.write(pkg_full_path, pkg_full_path[len(PACKAGES_PATH+"/"):])
z.close() z.close()
# shutil.copy(pkg_full_path, BUILD_PATH+"/"+pkg_name) # shutil.copy(pkg_full_path, BUILD_PATH+"/"+pkg_name)

View File

@ -7,7 +7,7 @@ You have connected to the <b>RNode Bootstrap Console</b>.<br/>
<br/> <br/>
The tools and information contained in this RNode will allow you to replicate the design, build more RNodes and grow your communications ecosystems.<br/> The tools and information contained in this RNode will allow you to replicate the design, build more RNodes and grow your communications ecosystems.<br/>
<br/> <br/>
This repository also contains tools, software and information necessary to bootstrap networks and communications systems based on Reticulum and RNodes. This repository also contains tools, software and information necessary to bootstrap networks and communications systems based on RNodes and Reticulum.
</td> </td>
<td width="33%" style="vertical-align:middle;padding-right: 0;"> <td width="33%" style="vertical-align:middle;padding-right: 0;">
<img src="{ASSET_PATH}gfx/rnode_iso.png" width="100%"/></td> <img src="{ASSET_PATH}gfx/rnode_iso.png" width="100%"/></td>

View File

@ -10,8 +10,8 @@ Installing this LXMF library allows other programs on your system, like Nomad Ne
If you do not have access to the Internet, or would prefer to install LXMF directly from this RNode, you can use the following instructions. If you do not have access to the Internet, or would prefer to install LXMF directly from this RNode, you can use the following instructions.
- Download the [{PKG_lxmf}]({ASSET_PATH}{PKG_lxmf}) package from this RNode and unzip it - Download the [{PKG_BASE_lxmf}]({ASSET_PATH}{PKG_lxmf}) package from this RNode and unzip it
- Install it with the command `pip install {PKG_NAME_lxmf}` - Install it with the command `pip install ./{PKG_NAME_lxmf}`
- Verify the installed Reticulum version by running `lxmd --version` - Verify the installed Reticulum version by running `lxmd --version`
If you do not have an Internet connection while installing make sure to install the [Reticulum](./s_rns.html) package first. If you do not have an Internet connection while installing make sure to install the [Reticulum](./s_rns.html) package first.

View File

@ -14,8 +14,8 @@ Nomad Network does not need any connections to the public internet to work. In f
If you do not have access to the Internet, or would prefer to install Nomad Network directly from this RNode, you can use the following instructions. If you do not have access to the Internet, or would prefer to install Nomad Network directly from this RNode, you can use the following instructions.
- Download the [{PKG_nomadnet}]({ASSET_PATH}{PKG_nomadnet}) package from this RNode and unzip it - Download the [{PKG_BASE_nomadnet}]({ASSET_PATH}{PKG_nomadnet}) package from this RNode and unzip it
- Install it with the command `pip install {PKG_NAME_nomadnet}` - Install it with the command `pip install ./{PKG_NAME_nomadnet}`
- Verify the installed Reticulum version by running `nomadnet --version` - Verify the installed Reticulum version by running `nomadnet --version`
If you do not have an Internet connection while installing make sure to install the [Reticulum](./s_rns.html) and [LXMF](./s_lxmf.html) packages first. If you do not have an Internet connection while installing make sure to install the [Reticulum](./s_rns.html) and [LXMF](./s_lxmf.html) packages first.

View File

@ -5,8 +5,8 @@ The cryptographic networking stack for building resilient networks anywhere. Thi
### Local Installation ### Local Installation
If you do not have access to the Internet, or would prefer to install Reticulum directly from this RNode, you can use the following instructions. If you do not have access to the Internet, or would prefer to install Reticulum directly from this RNode, you can use the following instructions.
- Download the [{PKG_rns}]({ASSET_PATH}{PKG_rns}) package from this RNode and unzip it - Download the [{PKG_BASE_rns}]({ASSET_PATH}{PKG_rns}) package from this RNode and unzip it
- Install it with the command `pip install {PKG_NAME_rns}` - Install it with the command `pip install ./{PKG_NAME_rns}`
- Verify the installed Reticulum version by running `rnstatus --version` - Verify the installed Reticulum version by running `rnstatus --version`
### Online Installation ### Online Installation