def pretty(self, indent=0):
        lines = list()
        lines.append(("resource", self.uri))
        if self.name:
            lines.append(("identifier", repr(self.name)))
        if self.resource_type:
            lines.append(("resource type", self.resource_type))
        if self.resource_size:
            lines.append(("resource size", str(self.resource_size)))
        for lang in sorted(self.title):
            lines.append(("title[%s]" % lang, self.title[lang]))
        for icon in sorted(self.icons):
            info = "{0} ... ({1} bytes)".format(
                repr(self.icons[icon][:10]).strip("'"),
                len(self.icons[icon]))
            lines.append(("icon[%s]"%icon, info))
        lines.append(("action", self.action))
        
        indent = indent * ' '
        lwidth = max([len(line[0]) for line in lines])
        lines = [line[0].ljust(lwidth) + " = " + line[1] for line in lines]
        return ("\n").join([indent + line for line in lines])
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/ndef/smart_poster.py/SmartPosterRecord.pretty/original