Scribus xhtml using Scripter

Why not just do this straight up to xhtml with Scripter? Well, why not?

This might serve as a quick way to get the content to a format easily importable to an ePub editor like Sigil.

Don't forget the siblings: Scribus XML using Scripter and Scribus files as XML.

export2xhtml.py
\n')               content.append(contents)            elif (item[1] == 2):                imgname = scribus.getImageFile(item[0])                imgsize = scribus.getSize(item[0])                picwidth = int(700 * imgsize[0]/pagesize[0])                T.append('  \n')        page += 1    T.append(' \n \n')    output_file = open(textfile,'w')    output_file.writelines(T)    output_file.close    endmessage = textfile + ' was created'    scribus.messageBox("Finished", endmessage,icon=0,button1=1)

if scribus.haveDoc: textfile = scribus.fileDialog('Enter name of file to save to', \                                 filter='Text Files (*.xhtml);;All Files (*)') try: if textfile == '': raise Exception exportText(textfile) except Exception, e:       print e

else: scribus.messageBox('Export Error', 'You need a Document open.', \                      icon=0, button1=1)