guild icon
Toit
#Passing assets in jag commandline
Thread channel in help
RobvanLopik
RobvanLopik 09/05/2024 04:21 PM
I have not used Toit for a couple of months and now seem unable to find how to pass assets to jag on the command line. Is it -D or --assets and what is the format. I cannot find it in the documentation(edited)
RobvanLopik
RobvanLopik 09/05/2024 04:22 PM
I mean without using an assets file
RobvanLopik
RobvanLopik 09/05/2024 05:04 PM
OK, found it in my own notes! But where do I find it in the docs?
RobvanLopikOPRobvanLopik
OK, found it in my own notes! But where do I find it in the docs?
floitsch
floitsch 09/06/2024 10:10 AM
We should probably add something to the toitlang/jaguar README.
Could you share with me what you had in your notes?
RobvanLopik
RobvanLopik 09/07/2024 09:33 AM
I suppose I copied an example I had seen. Basically I used -D key=value and retrieve the result in my program with
RobvanLopik
RobvanLopik 09/07/2024 09:34 AM
defines := assets.decode.get "jag.defines" --if_present=: tison.decode it --if_absent=: {:} if defines is not Map: print "defines are malformed" defines.get "key" --if_present=: Broker = it(edited)
RobvanLopik
RobvanLopik 09/07/2024 09:34 AM
I used it to get the address of an MQTT broker
RobvanLopik
RobvanLopik 09/07/2024 09:38 AM
Sorry the indentation shows up wrong
floitsch
floitsch 09/08/2024 07:37 AM
Thanks. I will add more information to the readme and other places.
9 messages in total