#!/usr/bin/env python

import mobius
import sys

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

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

   imagefile = mobius.imagefile.imagefile (uri)

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