mycomarkup

package module
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 7 Imported by: 3

README

Mycomarkup

godocs.io

Mycomarkup is a markup language designed to be used in Mycorrhiza Wiki. This project is both a library for the wiki engine and a command-line tool for processing Mycomarkup files in other projects.

See the Mycorrhiza docs on the markup language itself. The rest of the document provides documentation on the library and the command only.

We track tickets on SourceHut.

Running

Usage of mycomarkup:
  -file-name string
        File with mycomarkup. (default "/dev/stdin")
  -hypha-name string
        Set hypha name. Relative links depend on it.

Set the parameters and run the program. The output will be written to stdout. The output is a poorly-formatted HTML code. In the future, more front-ends will be available.

Please note that transclusion is not supported in CLI.

Embedding

Mycomarkup provides an API for Go projects. Consult the docs and Mycorrhiza Wiki source code for inspiration.

Contributing

We accept patches. Please run go fmt.

Documentation

Overview

Package mycomarkup provides an API for processing Mycomarkup-formatted documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockTree

func BlockTree(ctx mycocontext.Context, visitors ...func(block blocks.Block)) []blocks.Block

BlockTree returns a slice of blocks parsed from the Mycomarkup document contained in ctx.

Pass visitors. Visitors are functions (usually closures) that are called on every top-level found block.

Some pre-implemented visitors are in the tools package.

func BlocksToHTML

func BlocksToHTML(ctx mycocontext.Context, ast []blocks.Block) string

BlocksToHTML turns the blocks into their HTML representation.

Types

This section is empty.

Directories

Path Synopsis
Package blocks provides some of the Mycomarkup's blocks.
Package blocks provides some of the Mycomarkup's blocks.
cmd
Package genhtml provides utilities for converting Mycomarkup blocks into HTML documents.
Package genhtml provides utilities for converting Mycomarkup blocks into HTML documents.
tag
Package tag provides the data type for (X)HTML tags/DOM nodes.
Package tag provides the data type for (X)HTML tags/DOM nodes.
Package mycocontext provides a context type for all things Mycomarkup.
Package mycocontext provides a context type for all things Mycomarkup.
Package options provides a configuration data structure to pass when invoking the Mycomarkup parser.
Package options provides a configuration data structure to pass when invoking the Mycomarkup parser.
Package parser turns the source text into a sequence of blocks.
Package parser turns the source text into a sequence of blocks.
ctxio
Package ctxio provides input and output operations on the input buffer in mycocontext.Context.
Package ctxio provides input and output operations on the input buffer in mycocontext.Context.
Package temporary_workaround is a temporary workaround to break import cycle for some transclusion tricks.
Package temporary_workaround is a temporary workaround to break import cycle for some transclusion tricks.
Package tools provides visitors for external usage and will provide other tools one day.
Package tools provides visitors for external usage and will provide other tools one day.
Package util provides simple utility functions usable in all modules.
Package util provides simple utility functions usable in all modules.
lines
Package line provides a datatype for text lines that are generated by package tag.
Package line provides a datatype for text lines that are generated by package tag.

Jump to

Keyboard shortcuts

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