コード例 #1
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "space": SingleCase("space", CharactersSH),
         "id": SingleCase("id", CharactersSH, True),
         "get_quotes": NoCase,
         "quote_source": SingleCase("quote_source",
                                    CharactersSH),
         "quote_tz": NoCase})
コード例 #2
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "id": SingleCase("id", CharactersSH, True),
         "account": DictCase("accounts", AccountSH,
                             lambda ac: ac.id),
         "transaction": DictCase("transactions",
                                 TransactionSH, lambda tr: tr.id),
         "count-data": NoCase,
         "commodity": DictCase("commodities", CommoditySH,
                               lambda cm: cm.id),
         "budget": NoCase})
コード例 #3
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "id": SingleCase("id", CharactersSH, True),
         "value": SingleCase("value", FractionSH, True),
         "quantity": SingleCase("quantity",
                                FractionSH, True),
         "account": SingleCase("account",
                               CharactersSH, True),
         "memo": SingleCase("memo", CharactersSH),
         "reconciled-state": SingleCase(
             "reconciled-state", CharactersSH)
     })
コード例 #4
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "id": SingleCase("id", CharactersSH, True),
         "description": SingleCase("description",
                                   CharactersSH),
         "num": SingleCase("num", CharactersSH),
         "splits": SingleCase("splits", SplitsSH),
         "currency": SingleCase("currency",
                                CommoditySH, True),
         "slots": NoCase,
         "date-posted": SingleCase(
             "date-posted", TimeStampSH),
         "date-entered": SingleCase(
             "date-entered", TimeStampSH)})
コード例 #5
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "name": SingleCase("name", CharactersSH, True),
         "id": SingleCase("id", CharactersSH, True),
         "type": SingleCase("type", CharactersSH, True),
         "parent": SingleCase("parent", CharactersSH),
         "description": SingleCase("description",
                                   CharactersSH),
         "code": SingleCase("code", CharactersSH),
         "commodity": SingleCase("commodity",
                                 CommoditySH),
         "commodity-scu": SingleCase("commodity-scu",
                                     IntSH),
         "slots": NoCase
     })
コード例 #6
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Commodity(result))
コード例 #7
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Book(result, sh.scheme))
コード例 #8
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, File(result))
コード例 #9
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "split": DictCase("splits", SplitSH, lambda s: s.id)})
コード例 #10
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, result['gnc'])
コード例 #11
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {"gnc-v2": SingleCase("gnc", GncSH)})
コード例 #12
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, TimeStamp(result))
コード例 #13
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "date": SingleCase("date", TimeSH, True),
         "ns": SingleCase("ns", IntSH)
     })
コード例 #14
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Split(result))
コード例 #15
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, result['splits'])
コード例 #16
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Account(result))
コード例 #17
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "book": DictCase("books", BookSH,
                          lambda bk: bk.id),
         "count-data": NoCase})
コード例 #18
0
ファイル: xmlformat.py プロジェクト: bwesterb/koert
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Transaction(result))