Bug 724850 - RFE: print_unused images?
Summary: RFE: print_unused images?
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.0
Assignee: Jeff Fearn 🐞
QA Contact: Ruediger Landmann
URL:
Whiteboard:
Depends On:
Blocks: 820023
TreeView+ depends on / blocked
 
Reported: 2011-07-22 01:18 UTC by Stephen Gordon
Modified: 2012-10-31 03:11 UTC (History)
2 users (show)

Fixed In Version: 3.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-31 03:11:33 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Gordon 2011-07-22 01:18:17 UTC
Description of problem:

The command `publican print_unused` prints any and all xml files which are not linked into what publican would build, read they are orphaned. It would be useful if this functionality either extend to, or was available through an additional verb, for unreferenced image files.

Comment 1 Jeff Fearn 🐞 2011-10-10 13:44:48 UTC
Added print_unused_images action.

Added to branches/publican-2x and trunk.

Committed revision 1910.

Comment 2 Martin Prpič 2012-04-24 12:12:47 UTC
Verified with:

]$ rpm -q publican
publican-3.0-0.fc16.t166.noarch
]$ cat /etc/redhat-release 
Fedora release 16 (Verne)

Result:

Unused images (either unreferenced or commented out) are listed when "publican print_unused_images" is run.

Comment 3 Andrew Ross 2012-07-18 06:12:51 UTC
Reading bug 754340 and thought I'd check if print_unused_images works with <graphic> tags. It doesn't.


Setup:

1. Have image.svg in images.
$ ls en-US/images/
icon.svg  image.svg

2. Refn the image using a <graphic> tag.
$ grep "image.svg" en-US/Chapter.xml 
		<graphic fileref="image.svg" />

3. run print_unused_images
$ publican print_unused_images

List of unused Image files in en-US
    images/image.svg

List of missing Image files in en-US
    Common_Content/images/title_logo.svg


Note: tab completion also does not work with print_unused_images.

Comment 4 Jeff Fearn 🐞 2012-07-18 07:06:11 UTC
A: $ publican print_known  | grep -c graphic
0

Graphic is not a supported tag, it's ridiculous to fail it for this reason.

B: Tab completion works but because there are two very similar actions you have to get a long way along for it to know which one to pick.

C: Please stop wasting my time by causing churn on validated bugs.

Comment 5 Andrew Ross 2012-07-19 01:55:27 UTC
(In reply to comment #4)
> A: $ publican print_known  | grep -c graphic
> 0
> 
> Graphic is not a supported tag, it's ridiculous to fail it for this reason.
> 
> B: Tab completion works but because there are two very similar actions you
> have to get a long way along for it to know which one to pick.
> 
> C: Please stop wasting my time by causing churn on validated bugs.

Moving to verified.


Note You need to log in before you can comment on or make changes to this bug.