interim: collect metadata from one DB zip file
This commit is contained in:
committed by
=Michael Hohn
parent
d64522d168
commit
129b8cc302
@@ -23,6 +23,34 @@ import dtale
|
||||
dtale.show(dbdf_1)
|
||||
#
|
||||
|
||||
#
|
||||
#* Collect metadata from DB zip files
|
||||
#
|
||||
d = dbdf_1
|
||||
d.path[0]
|
||||
idb, ibl = extract_metadata(d.path[0])
|
||||
|
||||
idb['baselineLinesOfCode']
|
||||
idb['primaryLanguage']
|
||||
idb['creationMetadata']['sha']
|
||||
idb['creationMetadata']['cliVersion']
|
||||
idb['creationMetadata']['creationTime'].isoformat()
|
||||
idb['finalised']
|
||||
|
||||
for lang, lang_cont in ibl['languages'].items():
|
||||
print(lang)
|
||||
indent = " "
|
||||
for prop, val in lang_cont.items():
|
||||
if prop == 'files':
|
||||
print("%sfiles count %d" % (indent, len(val)))
|
||||
elif prop == 'linesOfCode':
|
||||
print("%slinesOfCode %d" % (indent, val))
|
||||
elif prop == 'displayName':
|
||||
print("%sdisplayName %s" % (indent, val))
|
||||
|
||||
|
||||
#
|
||||
# Local Variables:
|
||||
# python-shell-virtualenv-root: "~/work-gh/mrva/mrvacommander/client/qldbtools/venv/"
|
||||
# End:
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user