comparison dbkit_create.py @ 2:81c7d4668a7e draft

"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
author guerler
date Wed, 16 Dec 2020 12:02:48 +0000
parents 987e55ea29b8
children 03e124ff7e26
comparison
equal deleted inserted replaced
1:987e55ea29b8 2:81c7d4668a7e
14 entry = entry[:idLength] 14 entry = entry[:idLength]
15 if args.idcase == "lower": 15 if args.idcase == "lower":
16 entry = entry.lower() 16 entry = entry.lower()
17 elif args.idcase == "upper": 17 elif args.idcase == "upper":
18 entry = entry.upper() 18 entry = entry.upper()
19 if args.idextension is not None: 19 if args.idextension:
20 entry = "%s.%s" % (entry, args.idextension) 20 entry = "%s.%s" % (entry, args.idextension)
21 entries.add(entry) 21 entries.add(entry)
22 return sorted(entries) 22 return sorted(entries)
23 23
24 24
45 logFile.write("Entry `%s` not found.\n" % entryId) 45 logFile.write("Entry `%s` not found.\n" % entryId)
46 else: 46 else:
47 indexFile.write("%s\t%d\t%d\n" % (entryId, start, size)) 47 indexFile.write("%s\t%d\t%d\n" % (entryId, start, size))
48 start = start + size 48 start = start + size
49 system("cat %s >> %s" % (fileName, outputDatabase)) 49 system("cat %s >> %s" % (fileName, outputDatabase))
50 else:
51 logFile.write("Content not found: %s.\n" % fileName)
50 logFile.flush() 52 logFile.flush()
51 logFile.close() 53 logFile.close()
52 54
53 55
54 if __name__ == "__main__": 56 if __name__ == "__main__":