Import text with style, but only the used styles

Previous topic - Next topic

PK

Hi,

I import a text from on odt document. This document uses only a few number of styles, but it contains a style for all the cases, then it contains a lot of styles. When I import it in a text frame, Scribus import all the styles, and I would like to have only the used style.

First, I tried to import only the used style from a previous Scribus doc crash test and then to import the odt document as 'text only', but Scribus imports all the styles.

There is no way to destroy by hands the unused styles: they are too many... Except if it is possible by doing it with editing a configuration file by an text editor...

Is is possible to keep only my used styles?

Thanks,

PatJr

not sure I follow everything, to import just text I usually cut and paste the text to a text editor, notepad, geany, bluefish,... and the save that or just cut and paste the text again to a scribus text frame

PK

Quote from: PatJr on January 18, 2024, 03:32:25 PMnot sure I follow everything, to import just text I usually cut and paste the text to a text editor, notepad, geany, bluefish,... and the save that or just cut and paste the text again to a scribus text frame

This is a complex book and I need to preform it with styles with a front-end tool like LibreOffice. Scribus is a little bit poor for managing styles on a long text. My target is to spare time with getting all the styles (or almost all the style) in my Scribus document as a beginning document, that I can eventually correct by hands for having my final doc. To do a few hand modifications is feasible, not a lot ;-)

Nermander

Maybe look for a way to remove unused styles in Libreoffice before importing?

But googling seems to indicate you can not remove the default styles, only your own unused styles...

PK

Yes, it would be ideal. I tried, but it is full-time work  :'(

All the scripts that I found did not work... and I'm not very friendly with the LibreOffice scripting...

a.l.e

scribus already has a "remove unused colors" and when deleting a style scribus already seems to check it is in use...

it might be easy to add a "delete unused styles": would you mind opening a ticket?

PK

Quote from: a.l.e on January 18, 2024, 05:26:10 PMscribus already has a "remove unused colors" and when deleting a style scribus already seems to check it is in use...

yes, but when there is many styles, it is hard to do by hands.

Quoteit might be easy to add a "delete unused styles": would you mind opening a ticket?

OK. I do ASAP.

Thanks.

AdmFubar

I've not looked at .sla file directly that contains text style, but shouldnt there be a section in the .sla that has the defined styles and one could delete them using a text editor and then re-save.
Using Scribus 1.6.1, openSUSE 15.5
Advanced hobbyist

Nermander

How would you know which ones you can delete? Say there are 70 styles and you are going to delete 50-60 of them. Will the SLA tell you which ones are used or not?

a.l.e

i have to correct myself: i was under the impression, that when deleting styles, scribus was detecting if the style was in use or not.
that's not true: it always ask to replace it.

on the other side, for once i agree that the xml based approach might this time at least be part of a temporary solution.

but before that, i wonder why so many styles get created and if there is a way to avoid that useless styles get created.

AdmFubar

Quote from: Nermander on January 20, 2024, 08:15:00 AMHow would you know which ones you can delete? Say there are 70 styles and you are going to delete 50-60 of them. Will the SLA tell you which ones are used or not?
I'd start with a fresh document, and check what styles are present if any, then import the text, and recheck the .sla for the differences.
Using Scribus 1.6.1, openSUSE 15.5
Advanced hobbyist