AI generated SLA file and programmatically create design

Previous topic - Next topic

lib

Hello!
Does anybody play with AI models for generating SLA files with the use with AI models? I have tried few times and didn't get good results. Obviously, there is no enough data for AI to be able to generate SLA file from zero.
Also, does anybody uses programming languages for creating or updating SLA files?
If so, what useful information and where can be found?

a.l.e

Let's start from the end.
Scribus does have a Python API that lets you generate .sla and .pdf files.
You can get the documentation by pressing F1 in your copy of Scribus.

On the other side, generating .sla files with AI seems "curious" (let's be kind) to me.
If you're going to generate your documents with AI, why don't you directly go for generating the PDF, with AI generated text and images?
It's not the data that is missing...

P.S.: someone other's AI will summarize it for the reader... your document doesn't even need to be nice!

lib

I understand why this question is "curious" to you.
My idea is to, when writing the magazine, to get pages "designed" from various templates at the beginning using AI and then I use Scribus to change it, give it "human touch" and fix the possible  errors (that is why SLA is needed, not PDF).
The main goal is the first draft of magazine pages and speed.
Thanks for Python API info, I'll give it a look.

PastaShock

I've used AI to generate python scripts to allow me to do quickly do repetitive tasks. You can probably have the AI design a python script to read from a LibreOffice document or text file and place it in a Scribus file.

datavectors

#4
I have just returned to Scribus after a long period away. I had to register again but my old posts are lurking around. I spotted this post which aligns with my workflow often called unconventional. But what I am doing right now is "pairing" Scribus with Sublime Text. That is I tinker with teaming several apps to achieve a workflow. If you install Sublime Text the first step is install Exalt package (XML syntax). Then you can open Scribus *.sla file inside Sublime Text.  You see all the messy SLA XML innards but soon get used to modifying raw *.sla text. The useful part of this teaming is that you can now create and inject Subl snippets (SLA parts) into your *.sla code. Now comes the hard part. You have to reverse this process and "Build" a Scribus *.sla from the edited Subl code to update the original *.sla. For this a Scribus.sublime.build code is built. So there you have it. You can automate Scribus as well as using ScribusGenerator. Team work. I can expand on workflow if you wish.  I am batch processing using this raw method. And using AI to generate the "driving" code .. not the content which is left to the author.

datavectors

Just noticed "the need for speed" requirement. Presumably fast editing of columns. If you are on Ubuntu, another "pairing" is launcher Albert (use the Snippets extension). Then your Albert snippets opening in Sublime Text can be merged into the main *.sla also open (raw XML) in Sublime Text. The number of pairings grows.  If you are in Mac use Alfred. To launch a snip in Ubuntu/Albert it is simply . Ctrl+Shift+Space .. then type "snip (space)". Unconventional I agree.

MrB

You might want to look into https://github.com/caewa/scribus-mcp . Not our code but they did request a minor change to Scribus that I committed some time ago.

datavectors

It is terribly complicated. My approach these days is not to go down that tight integration route but in fact launch a "UI drone" (helped by Claude or Gemmini - doesn't matter) to autodrive the Scribus UI (and other like UI's). Emulating eyes and fingers. i had that working today but then I pivoted. Some time ahead I'll demonstrate but not today. Think of a drone surveying the Scribus terrain. And other terrains.

a.l.e

Question:

Would anybody who has access to some vibe coding tool, be so kind and get their tool to generate some sort of schema / DTD that we can use to validate the .sla files?

Once we have one, I guess that it should be easy to keep it up to date...

And the AI tool could then use it to validate that it's doing something meaningful.

datavectors

#9
I am busy at moment but I requested Co Pilot (browser) to respond thus:

CoPilot discourse: How your workflow fits the Scribus ecosystem
Your current pipeline:

Albert → capture
Sublime → forge
Zettlr → slice/tag
Reveal.js → present

Now you add:

UI‑Drone → Scribus Python API → .sla

This gives you:
sponsor‑ready slides
magazine‑ready layouts
automated first drafts
human‑refined final designs

Exactly what the forum user wanted — but with your sovereign edge‑workflow discipline.

Me: ... I  am debating my approach so thinking is rather raw. But it is along the lines of using Sublime Text to edit and validate *.sla.  That much is working. But admittedly thoughts are early.

PS: I have used XMLCopyEditor to validate *.sla as well. Or XML Oxygen. But Sublime Text is powerful (with XML syntax installed .. Package Exalt..  You can add a Build of *.sla held in Sublime Text and this launches Scribus. I have a custom Scribus.sublime.build file.