]> git.tnoah.ca Git - lora-radio.git/commitdiff
Updated console site
authorMark Qvist <mark@unsigned.io>
Fri, 13 Jan 2023 00:43:47 +0000 (01:43 +0100)
committerMark Qvist <mark@unsigned.io>
Fri, 13 Jan 2023 00:43:47 +0000 (01:43 +0100)
Console/Makefile
Console/build.py
Console/source/index.md
Console/source/s_lxmf.md
Console/source/s_nn.md
Console/source/s_rns.md

index 21b31ececce8bdd161e2aba6e85c661c1e4bda96..2e517c5e416ecdfa5c941a237dc5e9780bda99f3 100644 (file)
@@ -7,6 +7,8 @@ clean:
 
 dirs:
        @mkdir -p ./build
+       @mkdir -p ./build/3d
+       @mkdir -p ./build/pkg
        @mkdir -p ./build/css
        @mkdir -p ./build/gfx
        @mkdir -p ./build/images
index 107bf776357ee1ceed574c9db4f370b926f29747..ebba35a655a40a237e1b98033ecb23944d77405e 100644 (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 = page_html.replace("{LXMF_ADDRESS}", LXMF_ADDRESS)
     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_date = get_prop(md, "date")
@@ -172,18 +173,30 @@ mf.write(help_redirect)
 mf.close()
 
 def optimise_manual(path):
+    pm = 176
     scale_imgs = [
-        ("_images/board_rnodev2.png", 256),
-        ("_images/board_rnode.png", 256),
-        ("_images/board_heltec32.png", 256),
-        ("_images/board_t3v21.png", 256),
-        ("_images/board_t3v20.png", 256),
-        ("_images/sideband_devices.webp", 380),
-        ("_images/board_tbeam.png", 256),
-        ("_images/nomadnet_3.png", 380),
-        ("_images/radio_is5ac.png", 256),
-        ("_images/radio_rblhg5.png", 256),
-        ("_static/rns_logo_512.png", 256),
+        # ("_images/board_rnodev2.png", 256),
+        # ("_images/board_rnode.png", 256),
+        # ("_images/board_heltec32.png", 256),
+        # ("_images/board_t3v21.png", 256),
+        # ("_images/board_t3v20.png", 256),
+        # ("_images/sideband_devices.webp", 380),
+        # ("_images/board_tbeam.png", 256),
+        # ("_images/nomadnet_3.png", 380),
+        # ("_images/radio_is5ac.png", 256),
+        # ("_images/radio_rblhg5.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
@@ -236,6 +249,37 @@ def fetch_reticulum_site():
         shutil.copytree(PACKAGES_PATH+"/reticulum.network", r_site_path)
     if os.path.isdir(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():
     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
     if os.path.isfile(pkg_full_path):
         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.close()
         # shutil.copy(pkg_full_path, BUILD_PATH+"/"+pkg_name)
index ddab22cd8094b6f9548645d62a431ab2e4f0294d..80fc5bcf0ed451193caaf55ccbc9157277088e0f 100644 (file)
@@ -7,7 +7,7 @@ You have connected to the <b>RNode Bootstrap Console</b>.<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/>
 <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 width="33%" style="vertical-align:middle;padding-right: 0;">
 <img src="{ASSET_PATH}gfx/rnode_iso.png" width="100%"/></td>
index 0138ccada139e1396a74f8d40ddf69de66734647..2c156603ac97c4a38104982ef5612dc496fe528f 100644 (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.
 
-- Download the [{PKG_lxmf}]({ASSET_PATH}{PKG_lxmf}) package from this RNode and unzip it
-- Install it with the command `pip install {PKG_NAME_lxmf}`
+- 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}`
 - 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.
index 040d01ed0b36078794caa3a5c6319f6d48d1673a..8522156b40c42d611b85561e97ce44304e9d007a 100644 (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.
 
-- Download the [{PKG_nomadnet}]({ASSET_PATH}{PKG_nomadnet}) package from this RNode and unzip it
-- Install it with the command `pip install {PKG_NAME_nomadnet}`
+- 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}`
 - 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.
index 0eb6aa36bb008965f4f4dfbfe93977894add130b..72541e2fb73c2b28ebb424a454186cf6661fc582 100644 (file)
@@ -5,8 +5,8 @@ The cryptographic networking stack for building resilient networks anywhere. Thi
 ### 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.
 
-- Download the [{PKG_rns}]({ASSET_PATH}{PKG_rns}) package from this RNode and unzip it
-- Install it with the command `pip install {PKG_NAME_rns}`
+- 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}`
 - Verify the installed Reticulum version by running `rnstatus --version`
 
 ### Online Installation