Skip to content
Snippets Groups Projects
Commit 50d1a29a authored by François  LAURENT's avatar François LAURENT
Browse files

feat: metadata stored in json files

parent a51f464f
No related branches found
No related tags found
1 merge request!2UX improvements
......@@ -3,6 +3,7 @@ module MuscleActivities
using StructTypes
using NyxWidgets.Muscles
using Random
using Dates
using JSON3
using StructTypes
using OrderedCollections: OrderedDict
......@@ -217,8 +218,18 @@ from_json_file(::Type{T}, filepath) where {T} = JSON3.read(read(filepath, String
StructTypes.StructType(::Type{MuscleActivity}) = StructTypes.CustomStruct()
function StructTypes.lower(seq::MuscleActivity)
version = string(pkgversion(@__MODULE__))
if endswith(version, ".0")
version = version[1:end-2]
end
datetime = Dates.format(Dates.now(), "yyyymmdd_HHMMSS")
Dict = OrderedDict
Dict("name" => seq.program_name,
"metadata" =>
Dict("software" =>
Dict("name" => "NyxUI",
"version" => version),
"date_time" => datetime),
"time" =>
Dict("start" => seq.times[1],
"step" => step(seq.times),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment