How to generate RF documentation for several sources?

Hello everybody,

We are using libdoc to generate our documentation of keywords for RF.
I would need it to generate one documentation .HTML singlepage file from more than one source (two, in our case) - can libdoc do that?

If not, is there another tool/library which allows you to do that?
Thanks for answer.

Would libtoc do the trick?

1 Like

Yes it would, in case if you would show me how to put together an example command for doing so?

I tried to use it, created documentation.libtoc file in my repo, containing:

[paths]
resources/pages/*.resource

Both of the files are in that location.

Now, I should be missing only command to generate the docs; according to documentation I have put together this one:

libtoc --toc_file Keyword_documentation.html documentation.libtoc

But it is not working, giving me:

NotADirectoryError: [WinError 267] The directory name is invalid: ‘documentation.libtoc’
somehow, it does not understand the documentation.libtoc should be equivavelent of example_resources in their documentation.

Can you help me to fix it?

Not quite sure of what I am adding here, since I have not used libtoc yet.

I would say that your configuration file “documentation.libtoc” should actually simply be called “.libtoc” to be detected automatically. If you really want to rename it then you should probably use the --config_file "documentation.libtoc" option to provide your custom name.

That said, it seems that only mandatory argument for the command line is the name of the directory where libtoc is supposed to find the files. So something along the lines
libtoc --config_file custom_named_config.libtoc --toc_file output_file_name.html my_resource_directory

Thanks to your reply libtoc --config_file custom_named_config.libtoc --toc_file output_file_name.html my_resource_directory it executes libtoc without errors, but it always ended with No docs were created!

So in the end we wrote our own script to generate documentation out of several sources using libdoc (the only downside is you cannot have two keywords with the same name), which solved our problem.

1 Like