<font></font>2012/1/28 Rob Oakes <span dir="ltr"><<a href="mailto:rob.oakes.msn@gmail.com">rob.oakes.msn@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Is there a way to get the path and name of the currently open document?</blockquote></div><br>The last function do that:<br><br><span style="font-family:courier new,monospace">def parseDoc():
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    ''' Get attributes from current Scribus doc.'''
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    debug()
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    global styleList
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    parser = xml.parsers.expat.ParserCreate('UTF-8')
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    parser.StartElementHandler = start_element
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    try: 
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        docName = scribus.saveDoc()
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        <b># Undocumented Scribus 1.3.9 function:
</b></span><b><br style="font-family:courier new,monospace"></b><span style="font-family:courier new,monospace"><b>        docName = unicode(scribus.getDocName())</b>  
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        file = open(docName,'r')
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        parser.ParseFile(file)
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        file.close()
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    except:
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        print "Error analising doc."
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">        earlyExit()
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    styleList = scribus.getAllStyles()
</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    styleList.sort()
</span><div class="yj6qo ajU"><div id=":bf" class="ajR" tabindex="0"><img class="ajT" src="images/cleardot.gif"></div></div><br clear="all"><br>-- <br>
<font style="font-family:Helvetica,Arial,sans-serif" color="#888888"><font style="font-family:Helvetica,Arial,sans-serif" color="#888888"><font style="font-family:Helvetica,Arial,sans-serif" color="#888888"><font size="1"><font><img style="width:75px;min-height:100px" alt="Meira" src="http://lh4.ggpht.com/_75EesisxR5g/TENbAQVXMLI/AAAAAAAADHs/ChNQzn8eOT0/meira-75x100.jpg" hspace="8" align="left" vspace="6"></font></font></font></font><hr>


</font><span style="font-family:Helvetica,Arial,sans-serif">nome: "</span><span style="font-weight:bold;font-family:Helvetica,Arial,sans-serif">José Antonio Meira da Rocha</span><span style="font-family:Helvetica,Arial,sans-serif">" </span><br style="font-family:Helvetica,Arial,sans-serif">



<small style="font-family:Helvetica,Arial,sans-serif">googletalk: email: MSN: <a href="mailto:joseantoniorocha@gmail.com" target="_blank">joseantoniorocha@gmail.com</a><br>
veículo: [ <a href="http://meiradarocha.jor.br/" target="_blank">http://meiradarocha.jor.br</a>
] <br></small>
<hr style="width:100%;height:2px;font-family:Helvetica,Arial,sans-serif">
<br>