Pages: 1
Print
Author Topic: File Usage Report  (Read 5619 times)
kwag_myers
Member

Posts: 69


« on: October 26, 2010, 09:02:39 AM »

Is there a way to generate a report that tells me what files are unused? Or, perhaps one that tells me where a reusable content file is applied?

I'm using Author Enterprise 6.0. It seems to me that there was some sort of relational-illustration-type-widget at a previous location. I want to be sure I don't send any unused files to the translators.

I have a work-around for topic and graphic files, but not reuse.
Logged

XMetaL 6 Author in Windows 7 Home Premium
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: October 26, 2010, 02:15:35 PM »

Nothing comes built into the product. I believe some CMS systems that we integrate with provide this type of "where used" functionality. Perhaps that is what you are thinking of or remember seeing (perhaps in a demo)?

Note: this really sounds like a DITA topic so I'm moving it. If that's wrong please let me know.
Logged
sandvik
Member

Posts: 8


« Reply #2 on: October 27, 2010, 11:51:51 AM »

If you build a DITA map, the DITA-OT generates a dita.xml.properties file in its temporary directory. This XML file contains lists of referenced files in various categories (topics included in maps, topics referenced by conref, referenced image files, etc.)

The file is generated by the debug-filter target in the Ant build files. It would not be too hard to create an Ant script that invoked this target and used the results to populate a second directory with only referenced files.

--
Craig Sandvik
Sybase (where our CMS does this kind of thing for us)
Logged
kwag_myers
Member

Posts: 69


« Reply #3 on: October 27, 2010, 12:52:36 PM »

Nothing comes built into the product. I believe some CMS systems that we integrate with provide this type of "where used" functionality.
It just so happens that I'm using the same CMS. I'll have to research this further, thx.

If you build a DITA map, the DITA-OT generates a dita.xml.properties file in its temporary directory. This XML file contains lists of referenced files in various categories (topics included in maps, topics referenced by conref, referenced image files, etc.)

The file is generated by the debug-filter target in the Ant build files. It would not be too hard to create an Ant script that invoked this target and used the results to populate a second directory with only referenced files.

--
Craig Sandvik
Sybase (where our CMS does this kind of thing for us)
The dita.xml.properties file is CSV, so I was able to get a poorly formatted Excel sheet with what I need as a back-up in case the CMS angle doesn't workout. I'm in a bit over my head, so it's good to have a Plan B. Thx.
Logged

XMetaL 6 Author in Windows 7 Home Premium
kwag_myers
Member

Posts: 69


« Reply #4 on: April 12, 2011, 02:24:50 PM »

To finish what I started, here's a procedure that is easier than it looks. I've actually had to use this several times now. This last time I had over 60 files in the Recycling Bin due to several changes in direction during development.

Publish a list of files used when generating WebHelp to omit unused files from language translation.

1. Go to ...\DITA_OT\temp and select dita.xml.properties.
2. Copy the file to an alternative location.
3. Right-click the file name and select Open with>Notepad.
4. Delete all tags, directories, and any other text to be excluded from the report. The end result is a comma separated value (CSV) list.
5. Go to the Format menu and clear Word Wrap.
6. Copy & Paste contents into Word.
7. Go to Edit>Replace.
8. Type the comma character (,) in Find what.
9. Tab to, or select Replace with and click More >>.
10. On the Special menu, select Manual Line Break and click Replace All. A list of all XML and image files displays in a single column.
Logged

XMetaL 6 Author in Windows 7 Home Premium
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #5 on: April 13, 2011, 05:59:52 PM »

Looking at the file dita.xml.properties I see that it actually specifies a DTD, and that the DTD is accessible at the referenced location (http://java.sun.com/dtd/properties.dtd), so if you open dita.xml.properties in XMetaL Author it will download the DTD and auto-generate a basic customization for it.

There would normally be no point in opening this file for editing as it is meant to be generated by the DITA OT directly, however, opening it in XMetaL Author allows you to run scripts on it to extract the information you want rather than mucking around copying and pasting into various apps and doing manual deletions, find and replace, etc.

I've created a simple demonstration macro you can try:
1) Unzip and copy attached file here: <xmetal installation path>\Author\Startup\derekreadPrototype-ExtractDITATopicList.mcr
2) Restart XMetaL Author Enterprise.
3) Generate output and then open the file dita.xml.properties that you are currently manually extracting your data from.
4) Open the Macros toolbar and run the macro called "DITA Extension: Extract DITA Topic List".
5) Answer "yes" when asked if you want to copy the list to the clipboard. Any text you currently have on the clipboard will be overwritten.

Hopefully this is the right data in the right format. If not let me know so I can tweak this script.
The script extracts the text from the element <entry key="fullditatopiclist">, formats it, and puts the formatted text on the clipboard.

If anyone besides kwag_myers thinks a feature like this would be useful to have in the product please let us known through our standard support channels so that we can try to track the demand. I think this is a pretty specific need (given that nobody else has asked for it yet) but one never knows.

Legal:
* Licensed Materials - Property of JustSystems, Canada, Inc.
*
* (c) Copyright JustSystems Canada, Inc. 2011
* All rights reserved.
*
*-------------------------------------------------------------------
* The sample contained herein is provided to you "AS IS".
*
* It is furnished by JustSystems Corporation as a simple example and has not been
* thoroughly tested under all conditions. JustSystems Canada, Inc., therefore, cannot
* guarantee its reliability, serviceability or functionality.
*
* This sample may include the names of individuals, companies, brands and products
* in order to illustrate concepts as completely as possible. All of these names are
* fictitious and any similarity to the names and addresses used by actual persons or
* business enterprises is entirely coincidental.
*---------------------------------------------------------------------

* derekreadPrototype-ExtractDITATopicList.zip (1.42 KB - downloaded 280 times.)
« Last Edit: April 13, 2011, 06:16:47 PM by Derek Read » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #6 on: April 13, 2011, 07:01:54 PM »

I've played around with the first version and it just feels wrong.

Here's a second version that lets you browse to and select any dita.xml.properties file without opening it as a document (for editing) in XMetaL. It reads the file in as a string and parses it without opening it as a document (so the DTD is not downloaded and customization files are not auto-generated, so it is faster and there's less clutter on your machine).

Slightly different instructions:
1) Unzip and copy attached file here: <xmetal installation path>\Author\Startup\derekreadPrototype-ExtractDITATopicList_v2.mcr
2) Restart XMetaL Author Enterprise.
3) Generate output.
4) Open the Macros toolbar and run the macro called "DITA Extension: Extract DITA Topic List v2".
5) Browse to and select (any) dita.xml.properties that you are currently manually extracting your data from then click OK.
6) Answer "yes" when asked if you want to copy the list to the clipboard. Any text you currently have on the clipboard will be overwritten.

The data is being extracted from the same element as my first version.

As before, if this looks like a feature you would be interested in seeing in an official release please make a feature request through our standard support channels.

Legal:
* Licensed Materials - Property of JustSystems, Canada, Inc.
*
* (c) Copyright JustSystems Canada, Inc. 2011
* All rights reserved.
*
*-------------------------------------------------------------------
* The sample contained herein is provided to you "AS IS".
*
* It is furnished by JustSystems Corporation as a simple example and has not been
* thoroughly tested under all conditions. JustSystems Canada, Inc., therefore, cannot
* guarantee its reliability, serviceability or functionality.
*
* This sample may include the names of individuals, companies, brands and products
* in order to illustrate concepts as completely as possible. All of these names are
* fictitious and any similarity to the names and addresses used by actual persons or
* business enterprises is entirely coincidental.
*---------------------------------------------------------------------

* derekreadPrototype-ExtractDITATopicList_v2.zip (1.73 KB - downloaded 301 times.)
« Last Edit: April 13, 2011, 07:06:41 PM by Derek Read » Logged
Pages: 1
Print
Jump to: