comparison alveo_get_primary_text.py @ 15:3fd0f8f1f3ce draft

planemo upload for repository https://github.com/Alveo/alveo-galaxy-tools commit 63c347461a5d4fed06799e1d3b699e0d30b48191
author stevecassidy
date Thu, 16 Nov 2017 06:52:17 -0500
parents a38315ecf593
children
comparison
equal deleted inserted replaced
14:a38315ecf593 15:3fd0f8f1f3ce
47 md = item.metadata() 47 md = item.metadata()
48 fname = os.path.join(output_path, galaxy_name(md['alveo:metadata']['dcterms:identifier'], 'txt')) 48 fname = os.path.join(output_path, galaxy_name(md['alveo:metadata']['dcterms:identifier'], 'txt'))
49 content = item.get_primary_text() 49 content = item.get_primary_text()
50 if content is not None: 50 if content is not None:
51 with open(fname, 'w') as out: 51 with open(fname, 'w') as out:
52 out.write(content) 52 out.write(content.decode('utf-8'))
53 53
54 return downloaded 54 return downloaded
55 55
56 56
57 def main(): 57 def main():