From dd5f15ac43a8e4de85f94e1f2c42a15468165e14 Mon Sep 17 00:00:00 2001 From: Romain Boman <romain.boman@gmail.com> Date: Mon, 20 Nov 2023 16:50:43 +0100 Subject: [PATCH] add cmdline option for csv output --- cxxfem/utils.py | 2 ++ fossils.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cxxfem/utils.py b/cxxfem/utils.py index 00a2ae1..ea71603 100644 --- a/cxxfem/utils.py +++ b/cxxfem/utils.py @@ -46,6 +46,8 @@ def parseargs(): "--nogui", help="disable any graphical output", action="store_true") parser.add_argument( "--post", help="display existing results", action="store_true") + parser.add_argument( + "--csv", help="convert results to csv", action="store_true") parser.add_argument("-k", help="nb of threads", type=int, default=os.cpu_count()) parser.add_argument('file', help='python file', type=str, nargs='?') args = parser.parse_args() diff --git a/fossils.py b/fossils.py index cb2cf17..5fcf064 100755 --- a/fossils.py +++ b/fossils.py @@ -385,6 +385,8 @@ if __name__ == "__main__": workspace = None # use default if args.post: action = 'post' + elif args.csv: + action = 'csv' else: action = 'run' testname = os.path.abspath(args.file) -- GitLab