Description
The peakrdl html CLI appears to treat --title as effectively required, even though the exporter API and docs describe it as an override.
HTMLExporter.export() documents title as an optional override, and when title is omitted it falls back to the top node's name property. However, the CLI plugin defines --title with a default of None and always forwards title=options.title into html.export(...). That means the exporter receives an explicit None instead of having the kwarg omitted, so the fallback never triggers.
Current behavior
When peakrdl html is run without --title, generated output shows None in places where a derived title is expected.
For example, the generated HTML can show:
- page title:
None
- navigation/sidebar title:
None
Expected behavior
If --title is not provided, the CLI should not force title=None into the exporter. The exporter should be allowed to use its normal fallback based on the top node name.
In other words, --title should behave as an override, not as a de facto requirement.
Suggested fix
Only pass title=... to HTMLExporter.export() when options.title is not None.
Pseudo-patch:
kwargs = {"home_url": options.home_url}
if options.title is not None:
kwargs["title"] = options.title
html.export(top_node, options.output, **kwargs)
Notes
The PyPI/repo docs describe title as "Override title text", which also suggests it is intended to be optional rather than mandatory.
Description
The
peakrdl htmlCLI appears to treat--titleas effectively required, even though the exporter API and docs describe it as an override.HTMLExporter.export()documentstitleas an optional override, and whentitleis omitted it falls back to the top node'snameproperty. However, the CLI plugin defines--titlewith a default ofNoneand always forwardstitle=options.titleintohtml.export(...). That means the exporter receives an explicitNoneinstead of having the kwarg omitted, so the fallback never triggers.Current behavior
When
peakrdl htmlis run without--title, generated output showsNonein places where a derived title is expected.For example, the generated HTML can show:
NoneNoneExpected behavior
If
--titleis not provided, the CLI should not forcetitle=Noneinto the exporter. The exporter should be allowed to use its normal fallback based on the top nodename.In other words,
--titleshould behave as an override, not as a de facto requirement.Suggested fix
Only pass
title=...toHTMLExporter.export()whenoptions.titleis notNone.Pseudo-patch:
Notes
The PyPI/repo docs describe
titleas "Override title text", which also suggests it is intended to be optional rather than mandatory.