import Pkg; Pkg.activate(@__DIR__, io=IOBuffer()) using JLD2View using NativeFileDialog path = get(ARGS, 1) do pick_file(filterlist="jld2") end const HELP = """ Usage: jld2view [JLD2_PATH] Display the contents of a JLD2 file. If no file is provided in the command line, a file-picker dialog box will appear to select one interactively. """ if path == "--help" println(HELP) exit(0) elseif path == "" # pick_file cancelled exit(0) elseif isfile(path) jld2_view(path) else @error "File not found" path println("\n", HELP) exit(1) end