How to write a program as a Julia package?

What if your users had to create this type of script file?

user_custom_script.jl_script:

#!JLScript -iq --startup-file=no --project=@GlobalScripting_ASME
using ASME_Materials

#raw"": Allows paths with "\" without escaping (ex: "S:\\Material..."):
data_root = raw"S:\Material Properties"

options = (
	input_file = joinpath(data_root, "Section II-D Tables.xlsx"),
	output_dir = joinpath(data_root, raw"Excel Material Data\AIP Q&T Steels"),
)

result = ASME_Materials.RunTheScript(options)
display(result) #Because: Why not?
:DONE

…and execute it from with a right-click in Windows Explorer?
image

Example code

→ see: GitHub - ma-laforge/JuliaScripting.jl

You could provide (copy) the basic “Scripting interface” from JuliaScripting.jl:
(copying mostly JuliaScripting/src/install.jl)

  • Creates a sample “shared” Julia environment ( GlobalScripting_ASME ).
  • Copies a powershell script ( launch_julia_script.ps1 ) to the active Julia directory.
    • This might require Windows admin privileges.
  • Adds RMB “Execute with Julia” action for .jl_script files in Windows Explorer.
    • Also requires Windows admin privileges.