With reference to @peli’s post here, with @mmoskal’s reply immediately below, I am really interested in mapping what URL flag options that are available for configuring the pxt-arcade/MakeCode Arcade Monaco editor, compiler targets etc.?
From searching the this forum, the GitHub code repositories and the web, I have only been able to find these URL flags/options for pxt-arcade/MakeCode Arcade:
Compiler switches:
?compile=rawElf etc. (set compiler file target = rawElf)
?hw=rpi etc. (set compiler hardware target = Raspberry Pi)
?nolocalhub=1 (not connected to usb hardware?)
?dbg=1 (some sort of debug code output?)
Editor options:
#pub: (for opening editor with public/github project share links)
/—multi (for opening two editors in split screen view)
But judging from e.g. this source file, there are plenty of more options to choose from, but I am unfortunately utterly unable to find out how they are parsed/to be included in URLs…
In the short run, I would like to make an URL link that opens a certain project link with certain compiler options directly in the Python Monaco editor instead of in the default Blockly editor.
Other ideas could a URL that opens two project links with certain other options directly in the “multi” view. The possibilities are endless.
Here are some of the public ones off of the top of my head. Please note that all of these are subject to change at any time, I’m just listing the ones that are semi-public/useful for content creators. There are a bunch of other “private” ones that I will not mention because we don’t want people to use them.
/---skillmap opens the skillmap for the editor (arcade only)
?saveblocks=1 makes it so that the save button next to the project name downloads the .blocks file for the current project. This is useful for looking at the XML for debugging
?savetemplate=1 makes it so that the save button downloads the project as a json blob that can be included in a tutorial file as template code.
?light=1 turns on “light mode” which has some performance enhancements like fewer animations, less frequent compiles, no transparency in sprite editor, etc.
#editor opens the most recent project directly in the editor
#home opens the home page
#newproject creates a new project
#newjavascript creates a new javascript-only project
#tutorial:xxxx opens the given tutorial argument. There are a few ways to use this one:
#tutorial:py:xxxx will open as a python tutorial
#tutorial:js:xxxx or #tutorial:ts:xxxx will open as a javascript tutorial
#tutorial:blocks:xxxx will open as a blocks tutorial
A github repo and path (e.g. #tutorial:owner/repo/path/to/markdown)
And for the skillmap specifically, we have:
---skillmap#github:owner/repo/blob/master/skillmap.md. Note that the argument for this one is just the end of the URL you get when you open the markdown file in github
This was really elaborate and useful, @richard! -Thanks!
I also understand that there are some that you don’t want us to use.
I am therefore a bit hesitant to ask, but is there a “hash”, link, query or argument that would open the editor directly in the texteditor/Monaco mode directly - both Python(py) and JavaScript(js) - instead of the blockseditor/Blockly mode?
In class lately, I’ve been using the ---multi URL flag to open the micro:bit editor for programming a radio transmitter on the left side and a receiver on the right side, using the simulator for lack of enough hardware; https://makecode.microbit.org/—multi#
(The same would be interesting for 2-player Arcade games, hence the this post in this Arcade category…)
I am not able to figure this out, but is it possible to make a link which opens one shared project in the left editor window and another shared project in the right window?
Also, I am still curious whether it would be possible to make a link that opens a shared project directly to the textbased JavaScript editor, ref. my previous post?
Just share it in the JavaScript or Python editor view…
Still hoping for a way to open two different, but radio linked, projects in each of the windows using the --multi magic URL, or something similar. And opening to instances of e.g. a multiplayer arcade game in a similar way.
PS: Beware that the character | (vertical bar) in the URL often is reencoded to %7C, which does not work. For instance, the links work as Google Classroom “link attachments” to a classroom assignment, but no as a link embedded in the assignment description text.