<font><font>Copy-paste script in </font></font><font><font>(<a href="http://permalink.gmane.org/gmane.comp.graphics.scribus/39489" target="_blank">http://permalink.gmane.org/gmane.comp.graphics.scribus/39489</a>) led to some <font>bad-formated lin<font>e</font>s</font></font>. The true script is:<br>
<br><font>#!/usr/bin/python<br><br>"""<br>create "printable" guides and page margins for a draft<br>@author: ale rimoldi<br>@version: 1.0 / 20110901<br>@copyright (c) 2011 alessandro rimoldi under the mit license<br>
<a href="http://www.opensource.org/licenses/mit-license.html">http://www.opensource.org/licenses/mit-license.html</a><br>"""<br>import sys<br>try:<br> import scribus<br>except ImportError:<br>
print "This script only works from within Scribus"<br>
sys.exit(1)<br><br>page = scribus.getPageSize()<br>margin = scribus.getPageMargins()<br><br>layer = scribus.getActiveLayer()<br><br>if ('guides' in scribus.getLayers()) :<br> scribus.setActiveLayer('guides')<br>
else:<br> scribus.createLayer('guides')<br><br># add the page margins<br>rectangle = scribus.createRect(margin[1], margin[0], (page[0] - margin[1] - margin[2]), (page[1] - margin[0] - margin[3]))<br>scribus.setFillColor('none', rectangle) <br>
scribus.setLineColor('Blue', rectangle) <br>scribus.setLineWidth(0.4, rectangle)<br><br># add horizontal and vertical guides<br>for item in scribus.getHGuides():<br> line = scribus.createLine(0, item , page[0], item)<br>
scribus.setLineColor('Black', line)<br> scribus.setLineWidth(0.6, line)<br> scribus.setLineStyle(scribus.LINE_DASHDOT, line)<br><br>for item in scribus.getVGuides():<br> line = scribus.createLine(item, 0 , item, page[0])<br>
scribus.setLineColor('Black', line)<br> scribus.setLineWidth(0.6, line)<br> scribus.setLineStyle(scribus.LINE_DASHDOT, line)<br><br># add a "crossed frame" for missing images<br>for item in scribus.getAllObjects():<br>
if scribus.getObjectType(item) == 'ImageFrame':<br> image = scribus.getImageFile(item)<br> if image == '':<br> pos = scribus.getPosition(item)<br> size = scribus.getSize(item)<br>
rectangle = scribus.createRect(pos[0], pos[1], size[0],size[1]) <br> scribus.setFillColor('none', rectangle)<br> scribus.setLineColor('Black', rectangle)<br> scribus.setLineWidth(0.4, rectangle)<br>
line = scribus.createLine(pos[0], pos[1] , pos[0] + size[0], pos[1] + size[1]) <br> scribus.setLineColor('Black', line)<br> scribus.setLineWidth(0.4, line)<br> line = scribus.createLine(pos[0], pos[1] + size[1], pos[0] + size[0], pos[1]) <br>
scribus.setLineColor('Black', line)<br> scribus.setLineWidth(0.4, line)<br><br>scribus.setActiveLayer(layer)</font><br></font><br><div class="gmail_quote">2012/10/12 Gabriel Grosso <span dir="ltr"><<a href="mailto:ggrosso.dg@gmail.com" target="_blank">ggrosso.dg@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi a.l.e,<br>
<br>
thanks for such a quick answer. We'll be in contact at #scribus.<br>
Thanks again!<div class="HOEnZb"><div class="h5"><br>
<br>
On 10/12/2012 11:06 AM, a.l.e wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi gabriel,<br>
<br>
here a developer called a.l.e speaking ...<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all. I'm a 27 years old graphic design student based in Argentina, at the University of Art and Design of Oberá, state of Misiones. I use GNU/Linux from redhat 4.8 (i guess the first attempt to bring gnu to the masses) and now my main OS is Archlinux. I work entirely with open source software Gimp, Inkscape, Blender, Scribus. Well, enough of introductions and go to the point. I need to do some sketches for a project i'm about to make, and i'm wondering if there's a way of "print" the guides and the "no printing objects" to a PDF file (maybe to print it in a greaseproof paper). I do some research and came to this script developed by a user called a.l.e. (<a href="http://permalink.gmane.org/gmane.comp.graphics.scribus/39489" target="_blank">http://permalink.gmane.org/<u></u>gmane.comp.graphics.scribus/<u></u>39489</a>).<br>
<br>
Now in Scribus, importing it and executing throws me an error:<br>
<br>
Traceback (most recent call last):<br>
<br>
File "", line 8, in<br>
<br>
File "/home/gabo/guides.py", line 30<br>
<br>
scribus.setFillColor('Black', rectangle) scribus.setLineColor('Blue',<br>
<br>
^<br>
<br>
SyntaxError: invalid syntax<br>
<br>
I want to know if somebody has used it before or has another turnaround to work with printed guides.<br>
Well, thanks in advance and sorry about my English.<br>
<br>
</blockquote>
<br>
i can have a look at it this evening CET...<br>
<br>
i think that -- at the end -- frédéric continued his work and "published" a finished script (which also printed crossed boxes for image fiels, iirc)<br>
<br>
i will be at home between 19 and 21 swiss time. you can ping me on irc...<br>
#scribus on <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a><br>
<a href="http://wiki.scribus.net/canvas/Special:WebChat" target="_blank">http://wiki.scribus.net/<u></u>canvas/Special:WebChat</a><br>
<br>
ciao<br>
a.l.e<br>
<br>
___<br>
Scribus Mailing List: <a href="mailto:scribus@lists.scribus.net" target="_blank">scribus@lists.scribus.net</a><br>
Edit your options or unsubscribe:<br>
<a href="http://lists.scribus.net/mailman/listinfo/scribus" target="_blank">http://lists.scribus.net/<u></u>mailman/listinfo/scribus</a><br>
See also:<br>
<a href="http://wiki.scribus.net" target="_blank">http://wiki.scribus.net</a><br>
<a href="http://forums.scribus.net" target="_blank">http://forums.scribus.net</a><br>
</blockquote>
<br>
<br>
___<br>
Scribus Mailing List: <a href="mailto:scribus@lists.scribus.net" target="_blank">scribus@lists.scribus.net</a><br>
Edit your options or unsubscribe:<br>
<a href="http://lists.scribus.net/mailman/listinfo/scribus" target="_blank">http://lists.scribus.net/<u></u>mailman/listinfo/scribus</a><br>
See also:<br>
<a href="http://wiki.scribus.net" target="_blank">http://wiki.scribus.net</a><br>
<a href="http://forums.scribus.net" target="_blank">http://forums.scribus.net</a><br>
</div></div></blockquote></div><br><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" vspace="6" align="left"></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>fones: 55-8411-3047 / 55-3744-2994<br></small>
<hr style="width:100%;height:2px;font-family:Helvetica,Arial,sans-serif">
<br>