Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to edit the docx template #11

Closed
juanluisbaptiste opened this issue Jan 4, 2020 · 5 comments
Closed

How to edit the docx template #11

juanluisbaptiste opened this issue Jan 4, 2020 · 5 comments
Labels

Comments

@juanluisbaptiste
Copy link

@juanluisbaptiste juanluisbaptiste commented Jan 4, 2020

Hi,

First of all, many thanks for this project, it comes sooo handy and time saving !!

One question though, how can I edit the included template ? when I open it on libreoffice on linux or in google drive I get a blank empty file.

@TheGroundZero

This comment has been minimized.

Copy link
Owner

@TheGroundZero TheGroundZero commented Jan 5, 2020

Hi

There currently is no possibility to create templates in the tool.
All content is generated programmatically.
Feel free to make modifications in your local copy to fit your needs.

This is due to the nature of the docx format and the libraries I'm using.

If you know of any (Python3) libraries that do offer templating solutions in docx/xlsx format, please let me know.

@TheGroundZero

This comment has been minimized.

Copy link
Owner

@TheGroundZero TheGroundZero commented Jan 23, 2020

Hi @juanluisbaptiste

First of all: my apologies.
I may have misunderstood your question.

The docx export functionality does indeed allow you to configure a template.
This template document is used for the formatting of the fonts of the text, headers, etc.

The template file indeed "looks" to be empty, as it doesn't contain any content.
However, there are certain styles configured in this file.

See the full documentation for more info: http://openvas-reporting.sequr.be/en/latest/usage/export-word.html#create-word-report-using-a-different-template

@juanluisbaptiste

This comment has been minimized.

Copy link
Author

@juanluisbaptiste juanluisbaptiste commented Jan 24, 2020

Indeed I was confused by your answer as I already had seen that documentation link, but it was not clear from reading it how to edit the template file. I really don't understand what you mean with this:

The custom template document must contain a definition for the following styles:

Title (default)
Heading 1 (default)
Heading 4 (default)
OV-H1toc (custom format for Heading 1, included in Table of Contents)
OV-H2toc (custom format for Heading 2, included in Table of Contents)
OV-Finding (custom format for finding titles, included in Table of Contents)

Define how ? where do I do that ?

@TheGroundZero

This comment has been minimized.

Copy link
Owner

@TheGroundZero TheGroundZero commented Jan 27, 2020

In Word, you'll find these styles in the style selector.
image
You can modify these by right-clicking the style and clicking Modify.

In LibreOffice you can find and modify these styles as follows:

  1. Open the style dropdown on the top-lef
    image
  2. Click "More Styles ..."
  3. In the Style selector sidebar, open the dropdown at the bottom
    image
  4. Select "All Styles"
    image
  5. You can now right-click any of these styles to modify them.

Don't forget to save the modified document after making any changes.
Also make sure you have an original copy somewhere. You can always download it from the repo as well.

@juanluisbaptiste

This comment has been minimized.

Copy link
Author

@juanluisbaptiste juanluisbaptiste commented Jan 30, 2020

Many thanks for this explanation, very clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.