#!/usr/bin/env python

import mobius.api
import sys

def print_filesystems (filesystems):
  for fs in filesystems:
    print
    for attr in mobius.api.get_filesystem_metadata (fs):
      print '   %s: %s' % (attr.description, attr.value)

for uri in sys.argv[1:]:
   print
   print ">>", uri

   imagefile = mobius.api.imagefile (uri)

   if imagefile.is_available:
     print_filesystems (mobius.api.get_filesystems (imagefile.new_reader (), imagefile.sector_size))
