Scribus Forums

Scribus => Text and Typography => Topic started by: CodeFarmer on March 19, 2016, 04:33:08 AM

Title: Find All Styles Used
Post by: CodeFarmer on March 19, 2016, 04:33:08 AM
When reusing a Scribus document to begin a new iteration of it, I always seem to end up adding new styles as well as reusing existing ones.  But some of the existing styles are no longer used in my current document and should be removed.  But how do I find which styles are actively being used?  I wrote a short bash script (linux) to find these:

grep PARENT=  <targetFile>.sla | sort | uniq | grep -o '".*"' | sed 's/"\([^"]*\)".*/\1/' | sort | uniq

This seems to work for me, but perhaps someone with actual Scribus knowledge can comment.

A useful addition to Scribus would be, in the Styles Manager dialog to see an indicator for each sytle listed, showing whether it is actively used in the current document or not.
Title: Re: Find All Styles Used
Post by: solaero on March 20, 2016, 02:01:40 AM
I would love to see this built into the style manager. I, too, continuously use a template that evolves and would love to see a feature that allows me to view (un)used styles . . . maybe just highlight those styles? Just a thought.
Title: Re: Find All Styles Used
Post by: Nermander on March 20, 2016, 10:51:40 AM
Why not a filter option of what styles to show?

All styles
Used styles
Unused styles
Styles used on current page

In MS Word there are also options like "Standard styles", "Heading styles" etc.
Title: Re: Find All Styles Used
Post by: a.l.e on March 21, 2016, 10:59:00 AM
personally, i'd prefer not to have a drop down allowing to filter the styles by usage...
(i know that you can find similar options in office... but i always have the feeling that it's a top-heavy over-engineered feature...)

i'd prefer

- a "delete unused styles" button
- that shows a dialog asking for confirmation,
- with a list of the styles that will be deleted,
- with a checkbox that lets you uncheck the styles that you want to keep even if they are unused. (maybe with a revert selection button...)

this + a way to import single styles from another document seems to be more powerful to me and does not clutter the UI with even more information that is only rarely used (it can be an important information, don't get me wrong!, but most of the time, most users are not interested in that information...)
Title: Re: Find All Styles Used
Post by: solaero on March 22, 2016, 12:49:05 AM
I would definitely find the checkbox useful to unselect styles for deletion.

Importing styles from another document (without dragging in the entire document) would also be incredibly useful.
Title: Re: Find All Styles Used
Post by: Nermander on March 22, 2016, 02:24:32 PM
Quote from: solaero on March 22, 2016, 12:49:05 AM
Importing styles from another document (without dragging in the entire document) would also be incredibly useful.

Isn't this already present?

https://wiki.scribus.net/canvas/Help:Manual_Styles#Importing_Styles
Title: Re: Find All Styles Used
Post by: solaero on March 22, 2016, 08:40:34 PM
Ha! So it is. Seems I've been lazy  ;D