docs: def extract(ctx, input, output):
      """Run ChemDataExtractor on a document."""
      log.info('chemdataextractor.extract')
      log.info('Reading %s' % input.name)
      doc = Document.from_file(input, fname=input.name)
      records = [record.serialize(primitive=True) for record in doc.records]
      jsonstring = json.dumps(records, indent=2, ensure_ascii=False)
      output.write(jsonstring)