Import from ELN

Importing data from an electronic laboratory notebook

%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
    return false;
}
from aiidalab_widgets_base import AiidaNodeViewWidget, OpenAiidaNodeInAppWidget, ElnImportWidget
import urllib.parse as urlparse
from aiidalab_widgets_base import viewer
from traitlets import dlink
url = urlparse.urlsplit(jupyter_notebook_url)
parsed_url = urlparse.parse_qs(url.query)
params = {key:value[0] for key, value in parsed_url.items()}
eln_widget = ElnImportWidget(**params)
object_displayed = AiidaNodeViewWidget()
open_in_app = OpenAiidaNodeInAppWidget()

_ = dlink((eln_widget, 'node'), (object_displayed, 'node'))
_ = dlink((eln_widget, 'node'), (open_in_app, 'node'))

Selected object:

display(object_displayed)
display(eln_widget)

What’s next?

display(open_in_app)