eneam / mboxviewer

A small but powerfull app for viewing MBOX files
Other
432 stars 24 forks source link

Feature request: Customise HTML/PDF header output #8

Closed matthewpburgess closed 4 years ago

matthewpburgess commented 4 years ago

It would be great to have some options for the email header when exporting to HTML or PDF. Particularly, whether to include or exclude certain fields (eg, To, From) as well as formatting options on font and making the field names bold (From, To, Date etc)

zigm commented 4 years ago

Hi Matthew,

Thanks for raising the ticket. Currently, the mbox viewer maintains the following header fields: from, to, bc, bcc, subject and date. Let me know if you are looking for other uncommon fields. Also, are you looking for the total header customization, i.e ability to customize order of fields, "sender" instead of "from" i.e. user defined field names, separate fonts for each field name and content , etc. Potential solution could more or less complex.

Let me know and I will investigate.

Zbigniew

On Tue, Apr 28, 2020 at 12:05 AM Matthew Burgess notifications@github.com wrote:

It would be great to have some options for the email header when exporting to HTML or PDF. Particularly, whether to include or exclude certain fields (eg, To, From) as well as formatting options on font and making the field names bold (From, To, Date etc)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eneam/mboxviewer/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITWSJ5HPT32FN4X7PX7NE3ROZP2XANCNFSM4MSP7GRQ .

matthewpburgess commented 4 years ago

In my particular use case at the moment, I am interested in removing information about the recipient in the export so would like to have the ability to exclude "to" in the header for selected outputs. But I could see use cases in future where someone may want to include or exclude all header fields. I work with forensic programs which don't provide this level of customisation, but do include all of the other header fields at the bottom of the HTML export (with From, Sent (date/time), To and Subject at the top). Being able to include and exclude all header fields would be nice to have.

For customisation, at a minimum it would be good to be able to choose the font (for the entire header) and for the field names to be in bold (similarly to how it displays when viewing an email in mboxviewer itself). Any additional customisation could be useful but would not be a priority from my point of view.

zigm commented 4 years ago

I investigated the request and I am a bit hesitant to commit to support selection of the font names. Other requested functionality can be supported more easily, i.e. selection of header fields, setting header field names as bold and setting font size for the header. Setting the font name is a bit tricky and could be challenging for users. The from, to, cc, bcc and subject header fields are UTF-8 encoded and require family of fonts to display properly The following links provide good overview of fonts:

https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm https://www.granneman.com/webdev/coding/css/fonts-and-formatting

Let me know what you think.

zigm commented 4 years ago

Decided to support configuration of the font name. I will add Help button to clarify limitations, i.e. single font may not work reliably across all mails if the mails are in multiple languages such as japanese, arabic, etc. Default will be the default font family used by the installed browser.

zigm commented 4 years ago

Hi Matthew,

I released v1.0.3.11 of the mbox viewer to address the request. Hope you find time to evaluate and provide feedback. Yo can access new feature via File -> Print Config -> HTML/PDF Header Configuration button. There is a small limitations. When you start Font Dialog it doesn't always populate the previous values you configured. This is rare issue. I am leveraging standard Microsoft Font Dialog object. Will investigate how to resolve the limitation but didn't want to delay the release.

Zbigniew

zigm commented 4 years ago

Hi Matthew,

Let me know if you will be able to verify the fix I posted lately on Github and Sourceforge.

Cheers, Zbigniew

matthewpburgess commented 4 years ago

Thank you for adding the feature. I have tested excluding fields with success.

I find the font settings slightly confusing. It took me a few attempts to realise that I needed to customise the field name and apply that change before returning and doing the same for the text. I certainly wouldn't have a use case for using different fonts for the field and the text/value - only making the field name bold in a similar fashion to the default option in the dialogue with the checkbox.

zigm commented 4 years ago

Hi Matt,

Thank you for the feedback. You are right that Custom Font Configuration could be more user friendly. I should be able to make a few changes to make it easier to use. I don't think it wil be super intuitive but I would also enhance the HELP text to clarify the usage.

I am thinking of replacing the radio buttons Name and Text with the check boxes. By checking both boxes, users will be able to apply the same Font configuration to both the Name and Text. Once both are configured, the user can uncheck the Name checkbox and update Text Font (for example, set Font style to regular instead of Bold).

I am leveraging the standard Microsoft Font Dialog class to configure fonts. To make Custom Font Configuration super easy I would likely have to implement custom font configuration dialog, not a simple task.

Let me know what you think. I will let you know when I create a new mbox viewer release.

Thanks you, Zbigniew

On Wed, Jul 1, 2020 at 11:08 PM Matthew Burgess notifications@github.com wrote:

Thank you for adding the feature. I have tested excluding fields with success.

I find the font settings slightly confusing. It took me a few attempts to realise that I needed to customise the field name and apply that change before returning and doing the same for the text. I certainly wouldn't have a use case for using different fonts for the field and the text/value - only making the field name bold in a similar fashion to the default option in the dialogue with the checkbox.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eneam/mboxviewer/issues/8#issuecomment-652769779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITWSJ2B2MOMCNWUIK2XHBTRZQB4DANCNFSM4MSP7GRQ .

zigm commented 4 years ago

Hi Matt,

I will investigate changing the radio buttons to check boxes as I described in previous post. Would also like to understand better your statement as below:

I find the font settings slightly confusing. It took me a few attempts to realize that I needed to customize the field name and apply that change before returning and doing the same for the text.

There is small bug when you start the mbox viewer the first time. The Font Configuration was set to Default but the Name radio button was not grayed out and user was allowed to select/configure Name and Text even when the Font Configuration was set to Default.

User should select the Custom Hdr Field Font option and then configure Name and Text. User should be able to configure Name and Text and then select Ok button. The separate steps to configure Name and Text should not be needed. Not sure if I understood correctly your concern.

Zbigniew

matthewpburgess commented 4 years ago

I see now that I can configure both the name and text before applying any changes, but I was a bit confused when I first used it. I think the best option from a user point of view may be not having the option to change the font for Name and Text separately, but just have the option to change the font and radio button to Bold Field Name as with the default setting. Overall, I don't think it is a huge problem either way.

zigm commented 4 years ago

Hi Matthew,

Thank you for taking time to provide feedback. As you pointed out, too much flexibility might be less intuitive to use in most situations. The feature is typically not frequently used so the current approach may not be a huge problem as you pointed out. For now I leave the implementation as is. If I come up with a more elegant approach in the future I will make changes.

Cheers, Zbigniew

On Mon, Jul 13, 2020 at 11:19 PM Matthew Burgess notifications@github.com wrote:

I see now that I can configure both the name and text before applying any changes, but I was a bit confused when I first used it. I think the best option from a user point of view may be not having the option to change the font for Name and Text separately, but just have the option to change the font and radio button to Bold Field Name as with the default setting. Overall, I don't think it is a huge problem either way.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eneam/mboxviewer/issues/8#issuecomment-657957051, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITWSJ2VNXM7I7FF6VOMIN3R3PMFXANCNFSM4MSP7GRQ .