Skip to content

Commit

Permalink
added quick-plot help option
Browse files Browse the repository at this point in the history
  • Loading branch information
mkstoyanov committed Dec 12, 2024
1 parent fb337a9 commit dc82551
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion python/asgard.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,27 @@ def __str__(self):
return s

if __name__ == "__main__":
if len(sys.argv) < 2:
if len(sys.argv) < 2 or sys.argv[1] in ("-v", "-version", "--version"):
libasgard.asgard_print_version_help()
elif sys.argv[1] in ("-h", "-help", "--help"):
print("")
print("python -m asgard plt.data")
print(" makes a quick 1D or 2D plot of output contained in out.data")
print("")
print("python -m asgard -g plt.data")
print(" makes a quick 1D or 2D plot of the grid contained in out.data")
print("")
print("python -m asgard -s plt.data")
print(" shows summary of the snapshot contained in the out.data")
print("")
print("options:")
print(" -h, -help, --help : shows this help text")
print(" -v, -version, --version : shows the library version info")
print(" -s, -stat, -stats, -summary : shows the summary of a snapshot")
print(" -g, -grid : plot the grid")
print("")
print("no file and no option provided, shows the version of the")
print("")
elif sys.argv[1] in ("-s", "-stat", "-stats", "-summary"):
if len(sys.argv) < 3:
print("stats summary option requires a filename")
Expand Down

0 comments on commit dc82551

Please sign in to comment.