Ejemplo n.º 1
0
    for page in r['query']['pages']:
        try:
            if int(page) > 0:
                found.append('\t%swiki/%s' %
                             (smoonURL, r['query']['pages'][page]['title']))
        except KeyError:
            pass

    if found:
        print(_("\tErrata Found!"))
        for f in found:
            print("\t%s" % f)
    else:
        print(
            _("\tNo errata found, if this machine is having issues please go to"
              ))
        print(
            _("\tyour profile and create a wiki page for the device so others can"
              ))
        print(_("\tbenefit"))


if __name__ == "__main__":
    from gate import create_passing_gate
    gate = create_passing_gate()
    smoonURL = get_config_attr("SMOON_URL", "http://smolts.org/")
    profile = smolt.create_profile(gate, smolt.read_uuid())
    scan(profile, smoonURL, gate)
    rating(profile, smoonURL, gate)
Ejemplo n.º 2
0
    scanData = 'action=query&titles=%s&format=json' % searchDevices
    try:
         r = json.load(urllib.urlopen(scanURL, scanData))
    except ValueError:
        print "Could not wiki for errata!"
        return
    found = []

    for page in r['query']['pages']:
        try:
            if int(page) > 0:
                found.append('\t%swiki/%s' % (smoonURL, r['query']['pages'][page]['title']))
        except KeyError:
            pass

    if found:
        print _("\tErrata Found!")
        for f in found: print "\t%s" % f
    else:
        print _("\tNo errata found, if this machine is having issues please go to")
        print _("\tyour profile and create a wiki page for the device so others can")
        print _("\tbenefit")
      
if __name__ == "__main__":  
    from gate import create_passing_gate
    gate = create_passing_gate()
    smoonURL = get_config_attr("SMOON_URL", "http://smolts.org/")
    profile = smolt.create_profile(gate, smolt.read_uuid())
    scan(profile, smoonURL, gate)
    rating(profile, smoonURL, gate)
Ejemplo n.º 3
0
        self._rst = '\n'.join(rst_lines)
        self._excerpt = '\n'.join(excerpt_lines)

    def data(self):
        return self._data

    def html(self):
        return self._html

    def rst(self):
        return self._rst

    def rst_excerpt(self):
        return self._excerpt


def create_mythtv():
    return _Mythtv()


if __name__ == '__main__':
    # Enable auto-flushing for stdout
    import sys
    sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)

    from gate import create_passing_gate
    mythtv = create_mythtv()
    mythtv.gather(create_passing_gate(), debug=True)

    print mythtv.rst()
Ejemplo n.º 4
0
    def data(self):
        return self._data

    def html(self):
        return self._html

    def rst(self):
        return self._rst

    def rst_excerpt(self):
        return self._excerpt


def create_mythtv():
    return _Mythtv()


if __name__ == "__main__":
    # Enable auto-flushing for stdout
    import sys

    sys.stdout = os.fdopen(sys.stdout.fileno(), "w", 0)

    from gate import create_passing_gate

    mythtv = create_mythtv()
    mythtv.gather(create_passing_gate(), debug=True)

    print mythtv.rst()