[Scribus] EasyPose Python Core

Celso Junior celsojr2007
Mon Oct 15 14:56:23 CEST 2007


Hello everyone ^_^v


I'd like to announce that EasyPose now has a Python proto-core. It is 
nothing but a XML driven command line program, wich reads the settings 
from a xml based file and does the imposition that way.
The syntax is very simple:

easypose xml_plan.xml filelist.txt output.pdf

Where the xml plan works like the options found in the gui, but 
appearing to have more flexbility than before ^_^
By now one must determinate the page sequence the way they are imposed, 
more like a simple template, but the aim is to port the "virtual 
folding" method to the core it self.
The idea is to have a core that anyone can use, or even create his own 
gui for it.
Here it is an example of the xml file. In this case, a Simple two up 
middle folded sheet.
Obs: I'm working on a auto booklet re-ordering, no the option 
"order=booklet" is not working yet u_u
The example is commented below ^_^
 

<imposition unit="mm" name="Imposition Test 0001" order="normal">
#here we have simple main options about the imposition plan, no secrets
    <layout
        side="front"
        width="480"
        height="330"
        left_margin="auto"
        right_margin="auto"
        top_margin="auto"
        bottom_margin="auto"
        columns="2"
        rows="1">
    #This options reffer to the layout it self, "side" attribute is
    #only used to be printed in the margin area, the others are
    #self explanatory ^_^
        <cell
            width="210"
            height="297"
            column="1"
            row="1"
            rotation="0"
            page="2">
    #Now the cell is indexed directly, the "column" and "row" attributes
    #determinate it's position on the page-layout and the "page" is the
    #page number, respecting the imposition order
        </cell>
        <cell
             width="210"
             height="297"
             column="2"
             row="1"
             rotation="0"
             page="3">
        </cell>
    </layout>
#Now the layout for the "back" of the paper
    <layout
        side="back"
        width="480"
        height="330"
        left_margin="auto"
        right_margin="auto"
        top_margin="auto"
        bottom_margin="auto"
        columns="2"
        rows="1">
        <cell
             width="210"
             height="297"
             column="1"
             row="1"
             rotation="0"
             page="4">
        </cell>
        <cell
             width="210"
             height="297"
             column="2"
             row="1"
             rotation="0"
             page="1">
        </cell>
    </layout>
#The opitions will naturally become huge... u_u
#but this is the syntax they are expected to respect
    <options
        crop="true"
        crop_distance="1"
        bleed="2"
        fold="true"
        ink_bar="true"
        mono="false"
        logo_top="true"
        logo_bottom="true"
        logo_left="true"
        logo_right="true"
        write_name="true">
#Custom controls were not implemented yet but the're on the way
        <custom_controls>
            <obj
                x="3"
                y="3"
                rotation="0"
                file="/usr/share/easypose/controls/dotgain.pdf">
            </obj>
            <obj
                x="3"
                y="202"
                rotation="0"
                file="/usr/share/easypose/controls/dotgain.pdf">
            </obj>
        </custom_controls>
    </options>
</imposition>

The file_list.txt (it doesn't need to call file_list.txt ^_^) is a 
single list with
filename.pdf page_number

like

test.pdf 1
test.pdf 2
test.pdf 3
test.pdf 4
test.pdf 5
test.pdf 6
test.pdf 7
blank 1



Yes, it is boring, but in the future it will accept page scope, like 
1,2,3 and 1-3. blank is if you don't have enought pages to complete the 
sheets.

So, there it is...it is not the final presentation of easypose's core 
but it is the way it is going to grow ^_^

you can have it at:

http://easypose.die-buehne.net/core/

there are .deb, rpm and tgz packages ^_^

but remember, it does require pdflatex.

Regards!
Celso Junior




More information about the scribus mailing list