Detect textframe overflow flags and auto expand Scribus pages/textframes

Previous topic - Next topic

dragonfly

I am searching for a method to auto detect (by python script) any textframe(s) which shows the "Overflow Characters" {x} button at bottom.

I do not see this button by inspecting the *.sla code so I assume that this overflow button is created by the Scribus rendering engine?  If I hover the cursor over the {x} button a popup message gives  information about the extent of textframe overflow.
e.g. Overflow Characters: 95 (13 White Spaces)
How can I access this meta information from python script?

My interest is to develop a script which imports document chunks (perhaps chapters or sections) which automatically expands the host Scribus template (required extra pages with linked textframes inserted as overflow template by script) to accommodate the imported document.  Pages containing existing content will be pushed down.

I did read this thread ...

https://wiki.scribus.net/canvas/How_can_I_make_a_document_of_100%2B_pages%3F

And also an old tutorial found here ...

https://www.packtpub.com/mapt/book/hardware_and_creative/9781849513005/4/ch04lvl1sec07/time-for-action---import-it-from-shakespeare-land%252c-going-on%2521

reads .. in para 5 ..

QuoteOf course if you have hundreds of pages (for example the complete works of Shakespeare) it can be boring to link each page to the next.

This is my point.

a.l.e

in scribus 1.5 there is a textOverflows() function you can call on the text frames...

it might or not be there in 1.4... i haven't checked...

and don't try to link hundreds of pages in one chain... you scribus will crawl!

also, you can use insert > frames to create linked frames... but, sadly, this feature misses the option to use the current selection as the reference for the newly created frames.
this might or not be of some help for you.

and if you have less then hundreds of pages, in 1.5 you can zoom out your document and you can create full page (filling the guides) frames by simply pressing N and the shift-clicking on the empty page. if you make the tools sticky, you don't even have to press the N each time.

dragonfly

@ale
Thanks for your helpful ideas.
After considering options I conclude that what I am searching for is a "storyboard" function (like a slides presentation) where I can drag around various frames (in HTML dom) in storyboard before converting layout to *.sla and submitting code to Scribus for final tweaking.

In other words a document pre-processor.
This preprocessor will allow dynamic content (along lines of ScriptusGenerator).
I will document how I get on with building this pre-processing stage into my workflow.
There is no urgency.


dragonfly

Update.

I started this thread because I found it inconvenient to reconfigure the Scribus document as the document expands to an undefined number of pages.

My initial thought was to create a storyboard which would show a timeline of the text and image flow and allowing frames in the text flow to be edited.

Then I realised that one place to control the document flow as pages roll out would be  in the source document(s) piped to Scribus.

I will write up my workflow in later weeks, probably now into Tips subforum.

For now I am using Atom Editor with plugins to generate HTML5 content which emulates the view I expect to see in Scribus. Then I will parse HTML5 into *.sla format for printing.

This work flow will allow me to expand *.sla as the page content grows and I should in theory have no need to tweak textframe overflows or indeed redefine frame sizes.  Layout will derive from HTML5.

Also I will be able to sync web content with printed content.

The common source will be markdown.

I will not add to this thread since the approach I have settled on differs from the initial subject.