PyroChiliarch [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=93089 [0.1.0d] pProxy - Webproxy for Picotron <p> <table><tr><td> <a href="/bbs/?pid=144818#p"> <img src="/bbs/thumbs/pico64_pproxy-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144818#p"> pproxy</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144818#p"> [Click to Play]</a> </td></tr></table> </p> <h3>pProxy, the first and only webproxy for Picotron!</h3> <p>This is the first release, so its still very much a work in progress, so far you can...</p> <ul> <li>Perform with requests with URLs over 256 Characters (fetch() is limited to 256 chars)</li> <li>Do GET, POST, HEAD, PUT, PATCH, DELETE, CONNECT, OPTIONS and TRACE requests</li> <li>Get more than just the body from your requests including status codes and headers</li> <li>Store cookies in a reusable client</li> </ul> <p>For ideas, bugs, or help, contact me on the Picotron discord<br /> <a href="https://discord.gg/XQStcpPeH4">https://discord.gg/XQStcpPeH4</a></p> <h2>Public Proxy List:</h2> <p><code>http pproxy.pyrochiliarch.com 8080</code></p> <h2>To install (For Users):</h2> <p>If you are trying to run a project that relies on pProxy, follow these instructions.<br /> Details for devs are further down.</p> <p>1) Load the installer with <code>load #pproxy</code> and run it <code>ctrl+r</code> to install</p> <p>2) Configure which proxy server to use with <code>pProxy config http pproxy.pyrochiliarch.com 8080</code></p> <p>3) Use <code>pProxy test</code> to check you connection, it should print the server version</p> <h2>Getting Started (For Devs):</h2> <p>The #pproxy cartridge is an installer, load it <code>load #pproxy</code> and run it <code>ctrl+r</code> to install</p> <p>Once installed, configure the pProxy library to point to your proxy server using the <code>pProxy</code> command<br /> Use the following settings to use a public server <code>pProxy config http pproxy.pyrochiliarch.com 8080</code></p> <p>You may want to setup your own server, which can help with development.<br /> <a href="https://github.com/PyroChiliarch/pProxy">https://github.com/PyroChiliarch/pProxy</a><br /> Instructions to setup are in the github readme</p> <p><code>pProxy test</code> will check your configuration settings<br /> <code>pProxy help</code> will print additional commands</p> <p>Write a script<br /> There are 4 main steps<br /> 1) Make a proxy newProxy()<br /> 2) Make a client newHttpClient()<br /> 3) Craft a request newRequest(&quot;get&quot;, &quot;<a href="http://www.google.com&quot">http://www.google.com&quot</a>;, &quot;&quot;)<br /> 4) Make the request doRequest(client, request)</p> <p>A simple script would look like this<br /> Note: the proxy and client should be reused</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;/appdata/system/lib/dynInclude.lua&quot;) dynInclude(&quot;pProxy&quot;) dynInclude(&quot;tabUtil&quot;) local function handleErr(err) if not (err==nil) then print(&quot;Error: &quot;.. err) pause(&quot;space&quot;) exit(1) end end -- 1 Make new proxy proxy = pProxy:newProxy() -- 2 Make new client client, err = proxy:newHttpClient() handleErr(err) -- 3 Craft a request request = proxy:newRequest(&quot;post&quot;, &quot;http://httpbin.org/anything&quot;, &quot;This is the body contents&quot;) -- 4 Make the request data, err = proxy:doRequest(client, request) handleErr(err) print(&quot;Printing the response to the console:\n&quot; .. tabUtil.toString(data)) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>&lt;br&gt;&lt;br&gt;<br /> The example below performs multiple different example request that should help<br /> you understand how pProxy is used.<br /> Near the end of this post is documentation on functions</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;/appdata/system/lib/dynInclude.lua&quot;) dynInclude(&quot;pProxy&quot;) dynInclude(&quot;tabUtil&quot;) local function handleErr(err) if not (err==nil) then print(&quot;Error: &quot;.. err) pause(&quot;space&quot;) exit(1) end end --==========================-- -- Reused Values -- --==========================-- -- proxy is used in all requests -- the client is only used in Advanced requests -- Make new proxy proxy = pProxy:newProxy() -- Make new client client, err = proxy:newHttpClient() handleErr(err) --==========================-- -- Test connection -- --==========================-- print(&quot;=================================&quot;) print(&quot;Testing connection to proxy&quot;) ver, err = proxy:getVersion() handleErr(err) print(&quot;Connected to proxy version &quot; .. ver) --==========================-- -- Simple Get -- --==========================-- print(&quot;\n\n=================================&quot;) print(&quot;Basic get request, like fetch but through proxy&quot;) body, err = proxy:simpleGet(&quot;http://httpbin.org/robots.txt&quot;) handleErr(err) print(&quot;Get request result:\n&quot; .. body) --==========================-- -- Get with basic auth -- --==========================-- print(&quot;\n\n=================================&quot;) print(&quot;Perform basic auth&quot;) -- Perform a get request with headers for basic auth -- Build new request request = proxy:newRequest(&quot;get&quot;, &quot;http://httpbin.org/basic-auth/%41%6C%61%64%64%69%6E/%6F%70%65%6E%20%73%65%73%61%6D%65&quot;, &quot;&quot;) -- Add basic auth header username = &quot;Aladdin&quot; password = &quot;open sesame&quot; auth = (&quot;Basic &quot; .. basexx.to_base64(username .. &quot;:&quot; .. password)) request.addHeader(&quot;Authorization&quot;, auth) -- Do the request through the proxy data, err = proxy:doRequest(client, request) handleErr(err) -- Get the result print(&quot;Username: &quot; .. username) print(&quot;Password: &quot; .. password) print(&quot;Basic auth result:\n&quot; .. data.status) --==========================-- -- Post request -- --==========================-- print(&quot;\n\n=================================&quot;) print(&quot;Do a post request and print the returned response&quot;) request = proxy:newRequest(&quot;post&quot;, &quot;http://httpbin.org/anything&quot;, &quot;This is the body contents&quot;) data, err = proxy:doRequest(client, request) handleErr(err) print(&quot;Post request, full results:\n&quot; .. tabUtil.toString(data)) --==========================-- -- Get Cookies -- --==========================-- print(&quot;\n\n=================================&quot;) print(&quot;Make a request to get some cookies in our clients cookie jar,\nthen get the cookies from the client&quot;) request = proxy:newRequest(&quot;get&quot;, &quot;http://httpbin.org/cookies/set?myFirstCookie=chocolateChip&amp;visitedPage=True&quot;, &quot;&quot;) data, err = proxy:doRequest(client, request) handleErr(err) print(&quot;response headers when getting some cookies:\n&quot; .. tabUtil.toString(data.headers)) print(&quot;\nGetting cookies from the our client&quot;) data, err = proxy:getCookies(client, &quot;http://httpbin.org/&quot;) handleErr(err) print(&quot;Here are the cookies:\n&quot; .. tabUtil.toString(data))</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Extra details:</p> <p>Whats installed:<br /> The <code>pProxy.lua</code> library is installed to <code>/appdata/system/lib/pProxy.lua</code><br /> The <code>dynInclude.lua</code> library is installed to <code>/appdata/system/lib/dynInclude.lua</code><br /> The <code>pProxy.lua</code> command line configuration utility is installed to <code>/appdata/system/lib/dynInclude.lua</code></p> <p>Functions:<br /> Format: (return) function (parameters)</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>(proxy table, error string) pProxy:newProxy() Create a new proxy table, reuse this table with all other commands (client string, error string) pProxy:newHttpClient() Returns a UUID representing the client object on the proxy (version string, error string) pProxy:getVersion() Get the version of the current proxy (response string) pProxy:simpleGet(url string) Perform a simple get request through the proxy, very similar to fetch() (request table) pProxy:newRequest(method string, url string, body string) Crafts a new request, method supports the following values: &quot;GET&quot;, &quot;POST&quot;, &quot;HEAD&quot;, &quot;PUT&quot;, &quot;PATCH&quot;, &quot;DELETE&quot;, &quot;CONNECT&quot;, &quot;OPTIONS&quot; and &quot;TRACE' () request.addHeader(name string, value string) Add a new header to your request https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers (response table, error string) pProxy:doRequest (client string, request table) Provide a client id string and a crafted request to the proxy, returns the response in a table (cookies table) pProxy:getCookies(client string, url string) Returns a table containing the cookies from the specified client, filtered by the host in the url &quot;https://www.google.com&quot; will filter all cookies matching &quot;www.google.com&quot; </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=141188 https://www.lexaloffle.com/bbs/?tid=141188 Thu, 28 Mar 2024 12:34:49 UTC [0.1.0x] tabUtil <p> <table><tr><td> <a href="/bbs/?pid=144789#p"> <img src="/bbs/thumbs/pico64_tabutil-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144789#p"> tabutil</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144789#p"> [Click to Play]</a> </td></tr></table> </p> <p>tabUtil.lua library for use with Picotron<br /> Contains useful functions for working with tables</p> <p>Install with load #base64 and run it with crtl+r<br /> A new file will be created /appdata/system/lib/tabUtil.lua</p> <p>I personally love to use tabUtil.toString(#Table), its handy for debugging</p> <p>Contains 3 functions, Usage Below</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;/appdata/system/lib/tabUtil.lua&quot;) myTable = { name=&quot;Microsoft&quot;, employees={&quot;Bill Gates&quot;, &quot;Some Dude&quot;}, myFunction=function () print(&quot;Im a function&quot;) end, } meSecondTable = tabUtil.shallowCopy(myTable) myTable = {} print(tabUtil.getKeyCount(meSecondTable)) print(tabUtil.toString(meSecondTable)) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>This prints out the following</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/93089/tabUtil.png" alt="" /> <p>Verion 0 - Initial release</p> <p>dynInclude compatible: <a href="https://www.lexaloffle.com/bbs/?tid=141042">https://www.lexaloffle.com/bbs/?tid=141042</a></p> https://www.lexaloffle.com/bbs/?tid=141180 https://www.lexaloffle.com/bbs/?tid=141180 Thu, 28 Mar 2024 06:15:46 UTC [0.1.0x] json library <p> <table><tr><td> <a href="/bbs/?pid=144398#p"> <img src="/bbs/thumbs/pico64_json-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144398#p"> json</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144398#p"> [Click to Play]</a> </td></tr></table> </p> <p>To install library, use <code>load #json</code> then <code>ctrl+r</code><br /> Library will be installed at <code>/appdata/system/lib/json.lua</code></p> <p>(Slightly) Modified version of <a href="https://github.com/rxi/json.lua">https://github.com/rxi/json.lua</a></p> <p>Example:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;/appdata/system/lib/json.lua&quot;) --Make something to encode obj = { a = &quot;hello&quot;, b = &quot;world&quot;, c = 1234 } -- Encode json encoded = json.encode(obj) print(encoded) -- Decode json decoded = json.decode(encoded) print(decoded.a) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=141075 https://www.lexaloffle.com/bbs/?tid=141075 Mon, 25 Mar 2024 11:44:42 UTC [0.1.0d] dynInclude - Dynamic Include! <p> <table><tr><td> <a href="/bbs/?pid=144273#p"> <img src="/bbs/thumbs/pico64_dyninclude-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144273#p"> dyninclude</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144273#p"> [Click to Play]</a> </td></tr></table> </p> <p>Script to dynamically include libraries, use dynInclude() instead of include()<br /> You only need to specify the library name and it will be auto downloaded and installed if not currently installed then included automatically.</p> <p>A simple and easy way to include libraries in your cart without the hassle.</p> <p>Will try to load libaries from the following locations in this order:<br /> 1 - <code>./lib</code><br /> 2 - <code>/appdata/system/lib</code><br /> 3 - <code>/system/lib</code><br /> 4 - The BBS system (Will attempt to download and install the library to /appdata/system/lib</p> <p>Usage:<br /> The below code will include the basexx library, automatically downloading and installing it if necessary</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;./dynInclude.lua&quot;) dynInclude(&quot;basexx&quot;) string = &quot;hello world&quot; print(&quot;Raw: &quot; .. string) print(&quot;Bit (Base2)&quot; .. basexx.to_bit(string)) print(&quot;Hex (Base16) &quot; .. basexx.to_hex(string)) print(&quot;Base32 &quot; .. basexx.to_base32(string)) print(&quot;Base64 &quot; .. basexx.to_base64(string)) print(&quot;Crockford &quot; .. basexx.to_crockford(string))</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Use <code>load #dyninclude</code> to load an example cartidge (Also contains dynInclude.lua)</p> <p>See <a href="https://github.com/PyroChiliarch/picoDynInclude/">https://github.com/PyroChiliarch/picoDynInclude/</a> for an example cart that uses dynInclude()<br /> See <a href="https://github.com/PyroChiliarch/picoBasexx/blob/main/src/main.lua">https://github.com/PyroChiliarch/picoBasexx/blob/main/src/main.lua</a> for an example installer that is compatible with dynInclude</p> <p>(Installers just need to copy &lt;name&gt;.lua to <code>/appdata/system/lib</code> to be compatible)</p> <ul> <li> <p>Version 3<br /> Fixed Typo</p> </li> <li>Version 2<br /> Fixed Typo</li> </ul> https://www.lexaloffle.com/bbs/?tid=141042 https://www.lexaloffle.com/bbs/?tid=141042 Sun, 24 Mar 2024 04:27:00 UTC Patch load.lua (Deprecated) <p>The bug this cart fixes was patched in v0.1.0c, no longer needed unless you still use an old version</p> <p>Use?<br /> <code>load #patch_load</code> and press <code>ctrl+r</code><br /> This only needs to be done once and is persistent over reboots</p> <p>Why?<br /> There is currently a bug where you can only <code>load #&lt;cart&gt;</code> once per reboot<br /> This is because of a typo on line 27 that doesn't properly delete the current cart<br /> Patching isn't as simple as fixing the line as <code>/system</code> will refresh itself on every reboot<br /> Run this cart to permanently fix this bug (Persistent over reboots)</p> <p>How?<br /> When run, store a patched <code>load.lua</code> in <code>/appdata/system/util</code> and append some lines to startup.lua<br /> that will copy this patched <code>load.lua</code> to the <code>/system/util</code> folder on each reboot</p> <p>Will it overwrite my startup.lua?<br /> This cart will append to <code>/appdata/system/startup.lua</code>, so your current startup config will still work.</p> <p>Src?<br /> <a href="https://github.com/PyroChiliarch/picoPatchLoad">https://github.com/PyroChiliarch/picoPatchLoad</a></p> <p>Versions:</p> <p>version 1: main.lua was empty, fixed it.<br /> version 0: Initial release</p> <p> <table><tr><td> <a href="/bbs/?pid=144265#p"> <img src="/bbs/thumbs/pico64_patch_load-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144265#p"> patch_load</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144265#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=141039 https://www.lexaloffle.com/bbs/?tid=141039 Sun, 24 Mar 2024 02:35:20 UTC Blank Cartridge [#new] <p> <table><tr><td> <a href="/bbs/?pid=144255#p"> <img src="/bbs/thumbs/pico64_new-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144255#p"> new</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144255#p"> [Click to Play]</a> </td></tr></table> </p> <p>What are you doing to clear /ram/cart at the moment?<br /> Deleting files manually?<br /> Rebooting Picotron?</p> <p>Try using the brand new fancy empty cart!<br /> Simply type <code>load #new</code> to clear out /ram/cart</p> <p>That's it!</p> https://www.lexaloffle.com/bbs/?tid=141036 https://www.lexaloffle.com/bbs/?tid=141036 Sun, 24 Mar 2024 00:33:54 UTC [0.1.0x] basexx library <p> <table><tr><td> <a href="/bbs/?pid=144252#p"> <img src="/bbs/thumbs/pico64_basexx-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144252#p"> basexx</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144252#p"> [Click to Play]</a> </td></tr></table> <br /> basexx.lua library for use with Picotron, (very) slightly modified version of <a href="https://github.com/aiq/basexx/blob/master/lib/basexx.lua">https://github.com/aiq/basexx/blob/master/lib/basexx.lua</a></p> <p>Install from BBS with load <code>load #basexx</code> and run it with <code>crtl+r</code></p> <p>A file will be created at <code>/appdata/system/lib/basexx.lua</code></p> <p>Usage:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;/appdata/system/lib/basexx.lua&quot;) string = &quot;hello world&quot; print(&quot;Raw: &quot; .. string) print(&quot;Bit (Base2)&quot; .. basexx.to_bit(string)) print(&quot;Hex (Base16) &quot; .. basexx.to_hex(string)) print(&quot;Base32 &quot; .. basexx.to_base32(string)) print(&quot;Base64 &quot; .. basexx.to_base64(string)) print(&quot;Crockford &quot; .. basexx.to_crockford(string))</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Output:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/93089/screen.png" alt="" /> <p>Functions:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>--Bit (Base2) basexx.to_bit(string) basexx.from_bit(string) --Hex (Base16) basexx.to_hex(string) basexx.from_hex(string) --Base32 basexx.to_base32(string) basexx.from_base32(string) --Base64 basexx.to_base64(string) basexx.from_base64(string) --Crockford basexx.to_crockford(string) basexx.from_crockford(string)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>dynInclude compatible: <a href="https://www.lexaloffle.com/bbs/?tid=141042">https://www.lexaloffle.com/bbs/?tid=141042</a></p> https://www.lexaloffle.com/bbs/?tid=141034 https://www.lexaloffle.com/bbs/?tid=141034 Sat, 23 Mar 2024 23:06:49 UTC [0.1.0x] base64 library <p> <table><tr><td> <a href="/bbs/?pid=144219#p"> <img src="/bbs/thumbs/pico64_base64-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144219#p"> base64</a><br><br> by <a href="/bbs/?uid=93089"> PyroChiliarch</a> <br><br><br> <a href="/bbs/?pid=144219#p"> [Click to Play]</a> </td></tr></table> </p> <p>base64.lua library for use with Picotron, (very) slightly modified version of <a href="https://github.com/iskolbin/lbase64">https://github.com/iskolbin/lbase64</a></p> <p>Install with <code>load #base64</code> and run it with <code>crtl+r</code><br /> A new file will be created <code>/appdata/system/lib/base64.lua</code></p> <p>Basic usage:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>include(&quot;/appdata/system/lib/base64.lua&quot;) print(&quot;Plain: abcdefg&quot;) print(&quot;Base64: &quot; .. base64.encode(&quot;abcdefg&quot;))</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Basic functions:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>base64.encode(string) base64.decode(string)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Visit <a href="https://github.com/iskolbin/lbase64">https://github.com/iskolbin/lbase64</a> for advanced usage</p> <p>Source: <a href="https://github.com/PyroChiliarch/picoBase64">https://github.com/PyroChiliarch/picoBase64</a></p> <p>dynInclude compatible: <a href="https://www.lexaloffle.com/bbs/?tid=141042">https://www.lexaloffle.com/bbs/?tid=141042</a></p> https://www.lexaloffle.com/bbs/?tid=141022 https://www.lexaloffle.com/bbs/?tid=141022 Sat, 23 Mar 2024 13:40:20 UTC