Edit an experience entry by double-clicking on the tree
[crapvine.git] / chronicle.py
blob0c12946e89b7c3c62c80a011980e73da4a0a73bb
1 ## This file is part of Crapvine.
2 ##
3 ## Copyright (C) 2007 Andrew Sayman <lorien420@myrealbox.com>
4 ##
5 ## Crapvine is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## Crapvine is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
18 import pdb
19 from grapevine_xml import Attributed, AttributedListModel
20 from attribute import AttributeBuilder
21 from xml.sax.saxutils import escape
23 class Chronicle(Attributed):
24 text_attrs = ['chronicle', 'website', 'email', 'phone', 'stcommentstart', 'stcommentend', 'randomtraits', 'menupath']
25 number_as_text_attrs = ['version', 'size']
26 date_attrs = ['usualtime']
27 bool_attrs = ['linktraitmax']
29 text_children = ['usualplace', 'description']
31 # special kids:
32 # ['calendar' => 1, 'award' => many, 'template' => many, 'aprsettings' => 1, 'player' => many, {creatures} => many, 'query' => many, 'items' => many]
34 def __init__(self):
35 self.calendar = None
36 self.awards = []
37 self.templates = []
38 self.aprsettings = None
39 self.players = []
40 self.creatures = {}
41 self.queries = []
42 self.items = []