Procházet zdrojové kódy

gin commit from Ivory

Modified files: 3
Achilleas Koutsou před 5 roky
rodič
revize
fe7d9e2c87
3 změnil soubory, kde provedl 7 přidání a 5 odebrání
  1. 1 1
      EEG for MNE/LED_28_06_2012_104.nix
  2. 3 4
      mnetonix.py
  3. 3 0
      readrawnix.py

+ 1 - 1
EEG for MNE/LED_28_06_2012_104.nix

@@ -1 +1 @@
-/annex/objects/MD5-s151365647--97e0822d3e95b94a9c1e3a5b35605be0
+/annex/objects/MD5-s39581154--ca6f33ef9bc9831c91d072a082d35497

+ 3 - 4
mnetonix.py

@@ -92,12 +92,11 @@ def create_md_tree(section, values, block):
             if isinstance(v[0], Mapping):
                 # Create a new subsection to hold each nested dictionary as
                 # sub-subsections
-                print(k)
-                print(v)
                 subsec = section.create_section(k, str(v.__class__))
                 for idx, subd in enumerate(v):
-                    print(subd)
-                    create_md_tree(subsec, subd, block)
+                    subsubsec = subsec.create_section(f"{k}-{idx}",
+                                                      str(subd.__class__))
+                    create_md_tree(subsubsec, subd, block)
                 continue
 
         try:

+ 3 - 0
readrawnix.py

@@ -13,6 +13,9 @@ def md_to_dict(section):
         sdict[prop.name] = values
 
     for sec in section.sections:
+        if sec.name == "chs":
+            print(str(sec) + "\n\n")
+            print("\n".join(str(s) for s in sec.sections))
         sdict[sec.name] = md_to_dict(sec)
 
     return sdict