Switch to unified view

a b/OSSEval/OSProject/utils.py
1
from xml.dom import minidom
2
3
class Configuration():
4
    api_key = "qdD49UAt6Heu1pV9vkC0A"
5
    max_number_of_records = 10
6
    
7
    
8
class Forges(object):
9
    ALL = 0
10
    #SF = Sourceforge
11
    SF = 1
12
    #FC = Freecode was FM = Freshmeat
13
    FC = 2
14
    #FSF = Free Software Foundation
15
    FSF = 5
16
    #GH = Github
17
    GH = 11
18
    #GC = Google code
19
    GC = 12
20
    OHLOH = 100
21
    CODEPLEX = 1000
22
    APACHE = 1200
23
    ECLIPSE = 1300
24
25
class xmlElements():
26
    def __init__(self, xml):
27
        self.xml = xml
28
        
29
    def firstValue(self):
30
        try:
31
            return self.xml[0].firstChild.nodeValue
32
        except:
33
            return ""
34