__init__.py
Go to the documentation of this file.00001 from parser import IncParser as Parser
00002 from structure import IncStructure as Structure
00003 from serializer import IncSerializer as Serializer
00004
00005 class IncFormatParser():
00006 name = 'inc'
00007 desc = "INC reader/writer"
00008 extensions = ['inc']
00009 encoding = 'utf_8'
00010 fallback = None
00011
00012 @classmethod
00013 def dump_l10nobject (cls, l10nobject):
00014 text = Serializer.serialize(l10nobject)
00015 return text
00016
00017 @classmethod
00018 def dump_entitylist (cls, elist):
00019 text = Serializer.dump_entitylist(elist)
00020 return text
00021
00022 @classmethod
00023 def get_entitylist (cls, text, code='default'):
00024 l10nobject = Parser.parse_to_entitylist(text, code=code)
00025 return l10nobject
00026
00027 @classmethod
00028 def get_l10nobject (cls, text, code='default'):
00029 l10nobject = Parser.parse(text, code=code)
00030 return l10nobject
00031
00032
00033 def register(Manager):
00034 Manager.register(IncFormatParser)