Exemple #1
0
def main(zf):
    global mw
    mw = pubdisp.PubView(PlotConfig)
    readepub(zf)
    mw.gohome()

    gtk.main()
Exemple #2
0
def main(zf):
    global mw, conf
    
    mw = pubdisp.PubView(conf)
    mw.fname = ""; mw.loader = openHTML2;
    mw.callback =  openHTML2
    gobject.timeout_add(100, reader_tick)
    
    gtk.main()
Exemple #3
0
def main(zf):
    global mw
    mw = pubdisp.PubView(PlotConfig)
    mw.fname = ""; mw.loader = openHTML2
    
    readepub(zf)
    
    #mw.gohome()
    gtk.main()
Exemple #4
0
def main(zf):

    global mw, conf
    
    if not conf.nogui:
        mw = pubdisp.PubView(conf)
        mw.fname = ""; 
        mw.callback =  openHTMLcb; mw.bscallback = backcb
        
    if  conf.nogui:
        reader_tick()
        
    else:
        gobject.timeout_add(100, reader_tick)
    
    if not conf.nogui:
        gtk.main()
Exemple #5
0
def main(zf, fname=None):

    global mw, conf

    if not conf.nogui:
        mw = pubdisp.PubView(conf)
        mw.fname = ""
        mw.callback = openHTMLcb
        mw.bscallback = backcb

    if conf.nogui:
        reader_tick()
    else:
        if zf:
            gobject.timeout_add(100, reader_tick)
        else:
            gobject.timeout_add(100, html_tick, fname)

    if not conf.nogui:
        try:
            gtk.main()
        except:
            print_exception("gtk_main")
Exemple #6
0
        global mw, par

        fh = open(args[0])
        while 1:
            sss = fh.readline()
            if sss == "":
                break
            #print "got", sss
            mw.add_text(sss, True)
            mw.prog.set_text("Reading %d" % fh.tell())
            usleep(1)
            par.feed(sss)

        fh.close()

    args = conf.comline(sys.argv[1:])

    if len(args) < 1:
        print "Usage: pubhtml.py htmlfile"
        sys.exit(1)

    mw = pubdisp.PubView(conf)
    mw.fname = ""
    #mw.loader = openHTML2

    par = HTML_Parser()
    par.mw = mw
    gobject.timeout_add(100, reader_tick)
    gtk.main()