* .NWBORGLAB
nwb first initialized 2022-01-11 21:10:25.840806

** SESSION IMPORTS
#+END_SRC 
#+BEGIN_SRC python
import pynwb
import os
import argparse
from orgutils import SAPOFTO
from pynwb import NWBHDF5IO
from pynwb import NWBFile
from datetime import datetime
#!!! This file was automatically generated by nwborg !!!
# Code generated primarily from the parsing of: 
#   - sessionskeletons.org
def main():
    nwborg_root_path = '/'.join(os.path.dirname(os.path.realpath(__file__)).split('/')[:-2])+'/'
    overview = SAPOFTO(filename=os.path.join(nwborg_root_path,'overview.org'))
    skeleton = SAPOFTO(filename=os.path.join(nwborg_root_path,'sessionskeletons.org'))['%-%-%SESSION_ARCHETYPE%-%-%']
    parser = argparse.ArgumentParser('Default parser generated automatically by nwborg')
    parser.add_argument('--session-id',type=str,default=-1,help='id for the session being run')
    args,unknown = parser.parse_known_args()
    session_id = args.session_id
    session_path = nwborg_root_path + 'sessions/%-%-%SESSION_ARCHETYPE%-%-%/' + session_id + '/'
    nwbfile = NWBFile(session_description=skeleton['description'],identifier=session_id,session_start_time=datetime.now(),file_create_date=datetime.today())
    print('nwborg root path: ', nwborg_root_path)
    session_dict = orgutils.orgToDict(filename=session_path+'session.org')

** SESSION HEADER
