Package src :: Package inspectors :: Module odp_inspector
[hide private]
[frames] | no frames]

Source Code for Module src.inspectors.odp_inspector

 1  #!/usr/bin/python 
 2  # -*- coding: UTF-8 -*- 
 3  # 
 4  #The MIT License 
 5  # 
 6  #Copyright (c) 2011 
 7  # 
 8  #Permission is hereby granted, free of charge, to any person obtaining a copy 
 9  #of this software and associated documentation files (the "Software"), to deal 
10  #in the Software without restriction, including without limitation the rights 
11  #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
12  #copies of the Software, and to permit persons to whom the Software is 
13  #furnished to do so, subject to the following conditions: 
14  # 
15  #The above copyright notice and this permission notice shall be included in 
16  #all copies or substantial portions of the Software. 
17  # 
18  #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
19  #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
20  #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
21  #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
22  #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
23  #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
24  #THE SOFTWARE. 
25  # 
26  #Authors: 
27  #   Vili Auvinen (vili.k.auvinen@jyu.fi) 
28  #   Olli Kauppinen (olli.kauppinen@jyu.fi) 
29  #   Juho Tammela (juho.i.tammela@jyu.fi) 
30   
31  ''' 
32  The module provides the scratch for inspecting opd files. 
33   
34  @author: Olli Kauppinen 
35  ''' 
36  import xml.dom.minidom 
37  import common_methods 
38  import odt_inspector 
39  #from controller import documentDict 
40  filename = 'sampleFiles/odp/yliopisto_opiskelu.odp' 
41  #documentDict = odt_inspector.makeDocumentDict(filename) 
42   
43   
44  #def getFooterContent (): 
45  #    footers = documentDict['content.xml'].getElementsByTagName ('presentation:footer-decl') 
46  #    for footer in footers: 
47  #        print common_methods.getTextContent(footer) 
48       
49  #def checkPagesContent(): 
50  #    pageList = getPages() 
51  #    for page in pageList: 
52  #        page 
53       
54       
55  #def getPages(): 
56  #    pageList = [] 
57  #    pages = documentDict['content.xml'].getElementsByTagName ('draw:page') 
58  #    pageList.append(None) 
59  #    for page in pages: 
60  #        pageList.append(page) 
61  #    return pageList 
62   
63  if __name__ == "__main__": 
64      '''For testing... 
65      ''' 
66