Code Monkey home page Code Monkey logo

doctreegenerator's Introduction

doctreegenerator's People

Contributors

ebekker avatar msorens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

doctreegenerator's Issues

exact makeup of the overview.html files remains unclear

Basic HTML returns unclear errors:
** Cannot convert value "System.Object[]" to type "System.Xml.XmlDocument". Error: "'"' is an unexpected token. Expecting white space. Line 1, position 63."

This goes for all overview files.

Wildcard in Namespace selector should be resolved before using for page title

If multiple namespaces are specified for the Namespaces parameter, the page title for the home and contents pages is just the DocTitle parameter (or default). But if there is only a single namespace specified, the page title is that single namespace concatenated with the DocTitle parameter (or default). This determination is made on the literal Namespaces value passed in, even if it contains globbing wildcards and thus might resolve to multiple namespaces.

While technically that approach is valid, it would be more natural that the following two commands produce the same behavior:

PS> Convert-HelpToHtmlTree -Namespaces ns1, ns2
PS> Convert-HelpToHtmlTree -Namespaces ns*

Which is to say, to determine that multiple namespaces have been specified.

Problem when two modules contain a function with the same name

While trying out DocTreeGenerator, I seem to have found a problem:
DocTreeGenerator imports all modules before extracting documentation from each module. If two modules both contain a function having the same name, only the function from the last module imported is seen by DocTreeGenerator. Message displayed:

** No functions found in ModuleA-v1; (typically this means your functions or cmdlets are not exported)

In the situation above, I had a ModuleA-v2 containing all the same functions as ModuleA-v1.
This case simulates two versions of the same module.

Even if not handling module versions, it is not unlikely for two modules to contain functions having the same name.

Publish DTG on PowerShell Gallery

Would it be possible to publish DocTreeGenerator to the PS Gallery? That would make the tool much more accessible in the PowerShell way.

Add support for modules located in arbitrary directory

Currently any modules to be documented, quoting the documentation "must be installed as user modules (i.e. in C:\Users\username\Documents\WindowsPowerShell\Modules) rather than system modules (i.e. C:\Windows\System32\WindowsPowerShell\v1.0\Modules)." This also means that DocTreeGenerator does not support an arbitrary directory location. Would be useful to add a -Path parameter to allow an arbitrary location.

Indentation issues in Example section

Examples don't get properly indented even after applying one of the workarounds mentioned in README.md. We've found a fix for this in DocTreeGenerator source.

We need to add the following two lines on line 847 in Convert-HelpToHtmlTree.ps1

image

/cc @prithvibv

Anomalies in Example section

An example typically consists a single line of code (or multiple lines with backticks), followed by a description. There is one or more issues with incorrect rendering that may or may not all stem from the same cause:
A. A preformatted block immediately following the line of code has the first line incorrectly rendered as standard text. The second and subsequent lines are then rendered correctly as a pref-formatted block.
B. Backticks to continue the line of code are not being honored, so the continued lines are incorrectly rendered as plain text instead of stylized to be code.
C. Also with backticks, sometimes the first bit of code is incorrectly rendered as plain text, then the continued line rendered as preformatted text.

Hyperlinks not being generated for custom functions from other local modules

One is supposed to be able to introduce a link (.LINK) for either standard PowerShell cmdlets, standard PowerShell topics, or one's own custom functions. The documentation generator correctly recognizes standard items, and links to custom functions in the same module, but it fails on custom functions in a different module. Thus, such an item is just rendered as plain text, with no hyperlink.

Cause: When each module is processed it is loaded, then processed, then unloaded. Thus, its functions are not known when some other module tries to create a link.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.