An Electron-based JLD2 data file viewer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

main.jl 572B

12345678910111213141516171819202122232425262728
  1. import Pkg; Pkg.activate(@__DIR__, io=IOBuffer())
  2. using JLD2View
  3. using NativeFileDialog
  4. path = get(ARGS, 1) do
  5. pick_file(filterlist="jld2")
  6. end
  7. const HELP = """
  8. Usage:
  9. jld2view [JLD2_PATH]
  10. Display the contents of a JLD2 file. If no file is provided in the command line,
  11. a file-picker dialog box will appear to select one interactively.
  12. """
  13. if path == "--help"
  14. println(HELP)
  15. exit(0)
  16. elseif path == "" # pick_file cancelled
  17. exit(0)
  18. elseif isfile(path)
  19. jld2_view(path)
  20. else
  21. @error "File not found" path
  22. println("\n", HELP)
  23. exit(1)
  24. end