janusxr-cli/README.md

58 lines
2.3 KiB
Markdown
Raw Normal View History

# JanusXR cli
2025-11-11 22:02:56 +01:00
Portable swiss-army knife to automate [janusXR](https://janusxr.org) / JML things on a server
2025-11-11 22:05:20 +01:00
> *What is [janusXR](https://janusxr.org)?* It's an open, user-operated immersive web layer, open-sourced by the JanusVR company, that seamlessly lives within websites, even 12 years later thanks to [janusweb](https://github.com/jbaicoianu/janusweb). It provides a highly viable and easy-to-adopt ecosystem of portals, enabling immersive experiences that challenge the traditional app store paradigm. Get started with [this guide](https://madjin.github.io/janus-guide/#/).
2025-11-11 22:02:56 +01:00
2025-11-11 21:09:14 +01:00
# Usage
```
Usage: ./janusxr --health <room_url> [--max-time-per-asset 5]
./janusxr --scrape <room_url> <outdir>
```
## Examples
2025-11-11 21:14:33 +01:00
> scan a room URL for broken links in JML+HTML
2025-11-11 21:11:09 +01:00
```bash
2025-11-11 21:09:14 +01:00
$ ./janusxr --health http://localhost:8790/models/m5gr26w0wqqs
✅ http://localhost:8791/templates/xrfragment/%232/website.glb
✅ http://localhost:8790/models/assets/offscreen_renderer-186b8c52.js
✅ https://lychee.co/static/metas/favicon-32x32.png
✅ https://raw.githubusercontent.com/supermerill/SuperSlicer/refs/heads/master_27/resources/icons/SuperSlicer.svg
✅ http://localhost:8790/models/models/m5gr26w0wqqs/model_files/website.glb
✅ https://raw.githubusercontent.com/ELEGOO-3D/ElegooSlicer/refs/heads/main/resources/images/ElegooSlicer.svg
✅ http://localhost:8790/models/assets/roundel-1d688b1e.svg
✅ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/webp/orcaslicer.webp
✅ http://localhost:8790/models/models/m5gr26w0wqqs/model_files/gjc0jp33r6zl.jpg?derivative=carousel
✅ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/webp/cura.webp
✅ http://localhost:8790/models/assets/application-01a8ec1d.js
✅ http://localhost:8790/models/assets/janusxr.svg
⚕️ health: 100%
```
> scrape a room URL and rewrite JML to serve local assets
```bash
$ ./janusxr --scrape https://www.janusxr.org/newlobby/index.html mydir
🔗 http://dizzket.com/archive/dotmatrix/
🔗 https://vesta.janusvr.com/nazrin/minecraft-sandbox
✅ http://www.janusvr.com/newlobby/scripts/home.txt
...
$ ls -la mydir
index.html
home.txt
...
```
## Awk?
Why not some superfancy scripting for this task?
* awk is great for all things text and templating usecases
2025-11-11 21:11:09 +01:00
* dependencyfree
* lightweight to add to docker-image for automation