List all comments

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

List all comments

Unread post by John Johann »

Is there a nice way to extract all comments in a project?
I've seen posts about a separate tool, the toolbox and hints on using, e.g. Notepad++ but I was hoping there may be an integrated solution I've missed when just running the professional version.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: List all comments

Unread post by Tim Green »

Hi John,

You can't search for comments as such and they're not included in project reports. However, by default comments and bookmarks are linked with the option "Automatically manage bookmarks for every comment" in View > Program Options > Editor. When this is on you can locate comments with the Bookmarks tool in the Project tab. However, this only applies for comments that were created when this option was on. Turning it on won't retroactively create bookmarks for comments that already existed.

In addition to this you can also optionally include comments in PDF output, in the Publish screen. If you do this you can then use your PDF reader's function to locate the comments.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: List all comments

Unread post by John Johann »

Hi Tim,
thanks for that.
I can't remember turning that option off, but it is off.
I need a nice list of the comments as they contain lists of changes and such.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: List all comments

Unread post by Tim Green »

John Johann wrote:I need a nice list of the comments as they contain lists of changes and such.
Comments are actually easy to find in the XML source of your topics, provided you are using the uncompressed HMXP format (and you should be for ongoing work). A comment in the XML looks like this:

Code: Select all

<draft-comment width="300px" height="100px" modified="2019-04-23" styleclass="Comment"><![CDATA[This is a comment]]></draft-comment>
You can use any tool with multi-file search like the excellent free Notepad++ to locate them. If you are just using plain-text search you can search for "<draft-comment". If you activate the regular expressions option you can search for the entire comment with:

<draft-comment.*?<\/draft-comment>
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: List all comments

Unread post by John Johann »

Hi Tim,
That's what I'm currently looking at. I now need to find an automated way to clean the output and make it user-friendly.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: List all comments

Unread post by Martin Wynne »

Hi John,

A few years ago I created a small Windows utility to find, list, copy and print all the comments in a project. It's still available as a download if anyone wants it, see: https://helpman.it-authoring.com/viewto ... 478#p41478

It was originally for HM5, but still works fine in HM7 (or at least, it does for me). No install needed, just run the downloaded file. It is unsigned, so the first time you will need to click through the usual Windows security warnings.

cheers,

Martin.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: List all comments

Unread post by John Johann »

Thanks for the tip, Martin. Unfortunately, I won't be able to use your tool.

The Notepad++ variant only gives me the first line when searching across multiple files in which some of the comments are multi-line.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: List all comments

Unread post by John Johann »

In between times, I have created a solution which goes through the XML files and lists the names of the topics with comment date and the first line of the comment text in a table in an XML file.
I've made it so that it creates a link on the topic. I now add that "comments topic" to my project and TOC and set it to Inlude in=None.
That allows me to navigate directly to the commented topics.

I *had* switched on the "Automatic bookmark" function, but found that -- as I have a large number of comments -- the list was very long and scrolling was tedious.

On that note -- a more conmfortable way to delete large numbers of bookmarks would also be cool:-)
Nadia Gaganova
Posts: 53
Joined: Thu Sep 24, 2015 11:57 am
Location: Moscow

Re: List all comments

Unread post by Nadia Gaganova »

Hi,
I use the automatically create bookmarks option and noticed that it does indeed create a bookmark for a comment added before it was turned on - if I edit the topic which contains the comment. If that was a bug, please consider it a feature =)

Sorry for butting in on your thread, John.
Omit needles swords
Post Reply