[scribus] Scripting a Paragraph Style

José Antonio Rocha joseantoniorocha at gmail.com
Fri Mar 29 16:16:57 UTC 2013


# Apply style
def applyStyle(style,frame):
    '''Apply a style in selected text.
    If style doesn't exist, create it.'''
    try:
        scribus.setStyle(style,frame)
    except:

scribus.createParagraphStyle(name=style,leftmargin=indent,firstindent=(indent*-1))
        scribus.setStyle(style,frame)
    return frame



2013/3/29 José Antonio Rocha <joseantoniorocha at gmail.com>

> # "Default Character Style" character style
> scribus.createCharStyle(name=u'Default Character Style',font='Liberation
> Serif
> Regular',fontsize=12,features='inherit',fillcolor='Black',fillshade=1,strokecolor='Black',strokeshade=1,baselineoffset=0,shadowxoffset=0,shadowyoffset=0,outlinewidth=0,underlineoffset=0,underlinewidth=0,strikethruoffset=0,strikethruwidth=0,scaleh=1,scalev=1,tracking=0,language='Portuguese
> (BR)')
>
> # "Default Paragraph Style" paragraph style
> scribus.createParagraphStyle(name=u'Default Paragraph
> Style',linespacingmode=2,linespacing=14.17,alignment=3,leftmargin=0,rightmargin=0,gapbefore=0,gapafter=0,firstindent=12,hasdropcap=0,dropcaplines=2,dropcapoffset=0,charstyle='Default
> Character Style')
>
>
>
> 2013/3/28 David Cohen <dgcohen61430 at hotmail.com>
>
>> If this is a duplicate please disregard.I am trying to write a script
>> that will identify a text box by its pre-defined content and apply a
>> paragraph style. I have no problem locating the desired text box, but
>> cannot find the syntax to apply the named paragraph style using its name in
>> properties dialog. I have been doing this manually but have many instances
>> and a script would be a time saver.Thanks for any
>> guidance.dgcohen61430 at hotmail.com
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://lists.scribus.net/pipermail/scribus/attachments/20130329/a6d37f2a/attachment.html
>> >
>> ___
>> Scribus Mailing List: scribus at lists.scribus.net
>> Edit your options or unsubscribe:
>> http://lists.scribus.net/mailman/listinfo/scribus
>> See also:
>> http://wiki.scribus.net
>> http://forums.scribus.net
>>
>
>
>
> --
> [image: Meira]
> ------------------------------
> nome: "José Antonio Meira da Rocha"
> googletalk: email: MSN: joseantoniorocha at gmail.com
> veículo: [ http://meiradarocha.jor.br ]
> fones: 55-8411-3047 / 55-3744-2994
> ------------------------------
>



-- 
[image: Meira]
------------------------------
nome: "José Antonio Meira da Rocha"
googletalk: email: MSN: joseantoniorocha at gmail.com
veículo: [ http://meiradarocha.jor.br ]
fones: 55-8411-3047 / 55-3744-2994
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20130329/548f79d0/attachment.html>


More information about the scribus mailing list