aoloe / scribus-script-repository

Repository with python scripts from the Scribus community
36 stars 11 forks source link

check monomon's script for generating pages #17

Open aoloe opened 9 years ago

aoloe commented 9 years ago

imo, two things are possible:

one idea would to make it configured through a yaml / json file... or even make a dialog that can save that can optionally save/read that json file.
(and, for that, we could have a script that can generate that dialog... mmm... that looks like work :-)

monomon commented 9 years ago

hey, thanks for creating the ticket.

I have given it a thought, and would like to generalize the code to make it useful for others. Your second point follows immediately from that, since such a system has to be configurable.

I haven't dabbled with Scripter UI code yet, but seems straightforward enough, so some of the configuration could be through dialogs.

Some potential ideas:

  1. First thing that comes to mind (which may have been done already) is a tiling script. You pass an object (in my case textboxes), you generate as many of those as fit the page and tile them.
  2. Generating a catalog (that's the other script) - you pass data consisting of text and images and the script creates a list of these on as many pages as the data takes.
  3. Creating line grids (which is related to idea 1). Give some dimensions for the grid (either number of lines spaced equally on the page, or fixed spacing with as many lines as fit the page) and create the lines.
  4. Some small things that might be useful are the autoresize of textboxes in one script and autoresize of font in the other, which I admittedly lifted from another script in the scripts wiki.

In 2) especially, it is an open question how the user would [prefer to] configure the layout, since there are quite a few possibilities. Templates come to mind. Let me know what you think.