def convert(self, actable_file): """Simple conversion script that extracts a preview from anxd ABF file. actable_file: ActionalableFile object from dispatcher.py """ try: os.makedirs(actable_file.dirname) except: pass self.logger.warning("Starting ABF previewer on " + actable_file.filename) html = ABFPreviewer.create_HTML_document(actable_file.path) f = open(actable_file.indexHTML, 'w') print >>f, html f.close() self.logger.warning("ABF previewer on " + actable_file.filename)
#!/usr/bin/env python from neo import * import dominate from dominate import * from dominate.tags import * import numpy as np import os, time from stat import * from categories import HTMLFormatter from abf import ABFPreviewer import os import logging import json import subprocess import re html = ABFPreviewer.create_HTML_document('/home/david/4a/abf/sin-stdp7.abf') f = open("junk.html", "w") print >>f, html f.close()