Skip to content

[RFC] Consideration of the package name and APIs #4

@kimikage

Description

@kimikage

This package was originally a refactored version of the utility code from another developing package. I have no clear pictures of its future as a stand-alone package.

I plan to add at least a PlainTextPrinter for "text/plain" output in the future (cf. issue #6, PR #12), and I don't intend to make this package for HTML-only. SVGPrinter may be useful, although it has some difficulties in automatic text layout compared to HTML. Also, to implement LaTeXPrinter needs helps.

This is why I intentionally didn't include "HTML" in the package name, but I also don't think the current package name is appropriate. The reason why the name is not AnsiColorPrinters.jl is that the coloring itself is done on the input side, and this package only translates the colors. In that sense, I think AnsiColorTranslators.jl or AnsiEscapeCodeTranslators.jl is a more suitable name. However, HTMLTranslator is a wrong name and names like AnsiColorTranslatorHTML are too verbose.

It is possible to define generic types such as Translator{:HTML} or Translator{MIME"text/html"}, by containing the format-specific options in a dictionary rather than a sequence of fields. However, in that case, there is almost no advantage to separate types for each output format in the first place. 😅

Apart from that discussion, "ANSI" is probably better than "Ansi" in terms of consistency. (Edit: Done in PR #9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions