tohtml

command module
v0.0.0-...-1e9fb1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 4 Imported by: 0

README

Command tohtml converts text to formatted HTML. It's a command line
wrapper around go doc's internal formatting function, doc.ToHTML


Usage

You can try it out with this README.

        tohtml input.txt > index.html


Installation

With go get:

        go get github.com/emiliovesprini/tohtml


Formatting rules

From the doc.ToHTML docs:

        > Each span of unindented non-blank lines is converted into a single
        > paragraph. There is one exception to the rule: a span that consists of a
        > single line, is followed by another paragraph span, begins with a capital
        > letter, and contains no punctuation is formatted as a heading.
        > 
        > A span of indented lines is converted into a <pre> block, with the common
        > indent prefix removed.
        > 
        > URLs in the comment text are converted into links;

For the full docs, see

        go doc doc tohtml

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL