Book creation with scribus

Previous topic - Next topic

kroben

I have developed a toolkit, designed to be usable by everyone at a low cost, and therefore the target computer was chosen to be Raspberry Pi, used against an already existing TV. This means that the tool is currently only usable in a Linux environment.
I use it to write user manuals using scribus, for documentation of my projects, which are mainly in the "Home Automation" field. I use Raspberry pi as a control computer in various automation projects.

I have called the tool scibusbook, and it works well, but, it requires at least scribus version 1.6.x, for scribus scripts to work! The tool is built around scripts, and is therefore naturally open source, and works as a wrapper for scribus, to compile an e-book from the components of a book, produced in scribus. Some parts are completely automated, such as generating tables of contents for headings, images and tables, and also generating indexes from inserted index marks in the different chapters. There is also a function to generate a list of inserted TBD marks (To Be Determined), which, however, are not included in the final book.

The tool is a prototype, or "proof of design", to see if it is possible to imitate my previously used "Framemaker-bookfiles", which are far too expensive for private individuals. But before the final scribusbook a cleaning job is needed. For now, the design of templates is done in A4 page format, which requires some change of layout if another page format is chosen.

This all sounds great, but there is one ugly spot.
Generating tables only works partially from scribus scripts.
When the table is generated, from a text frame with inserted text in cvs format, generated from a spreadsheet, with ';' as a separator, all text gets the paragraph style "Default". There doesn't seem to be any way to access the text frame in a table cell from scripter. If the file is opened directly in scribus, after a little fiddling with a pointing device, you can select a cell and open it in "Story Editor", and there the style for the paragraph can be changed, so there is demonstrably a text frame in the cell. My current method is to run an OS command from a script, which, using the stream editor sed, changes the XML code of the sla file directly, which is not an acceptable solution.

If anyone has an idea for a solution to the problem, or just wants to try scribusbook, the manual and tar file for scribusbook can be downloaded from the website:

https://privat.bahnhof.se/wb187803/hygget251001/eng/scribusbook/scribusbook.html

/kroben

a.l.e

Interesting project!

First (a short one): In Scribus, the table are bad. Not sure you really want to support them in your framework.

Second (something slightly longer):

Currently, none of the actions typical for the text frames are available for the content of table cells.

As far as I can tell, the cells cannot be accessed by a name, and I'm not sure that it would be a good idea to implement that.

Also, I've tested setTextColor() and it refuses to apply when the selection is a table cell.

But there might be a simple way out:

  • Add a Scripter function to select a cell by it's "coordinates" (row and column).
  • Tweak all the text related to accept also table cells as targets.

I've created a ticket for this:
https://bugs.scribus.net/view.php?id=17655

No promise it will be added soon, but it might be an easy task.

Third:

I did not download the script, just had a look at the screenshots and documentation and it looks like an interesting work!

I will try to find some time for a deeper review and for trying it out...

Just one first thing: since you call it a prototype, you might rather target Scribus 1.7 instead of 1.6...