Author Topic: Find All Styles Used  (Read 1919 times)

CodeFarmer

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
  • Scribus User
Find All Styles Used
« on: March 19, 2016, 05: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:

Code: [Select]
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.

solaero

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
  • Scribus Moonlighter
Re: Find All Styles Used
« Reply #1 on: March 20, 2016, 03: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.

Nermander

  • Hero Member
  • *****
  • Posts: 1280
  • Karma: 17
Re: Find All Styles Used
« Reply #2 on: March 20, 2016, 11: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.

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1936
  • Karma: 26
    • the graphics lab
Re: Find All Styles Used
« Reply #3 on: March 21, 2016, 11: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...)

solaero

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
  • Scribus Moonlighter
Re: Find All Styles Used
« Reply #4 on: March 22, 2016, 01: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.

Nermander

  • Hero Member
  • *****
  • Posts: 1280
  • Karma: 17
Re: Find All Styles Used
« Reply #5 on: March 22, 2016, 03:24:32 pm »
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

solaero

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
  • Scribus Moonlighter
Re: Find All Styles Used
« Reply #6 on: March 22, 2016, 09:40:34 pm »
Ha! So it is. Seems I've been lazy  ;D

 

palmate