downmark

package module
v0.0.0-...-0c97120 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: MIT Imports: 7 Imported by: 0

README

downmark

build Go Report Card Coverage Status

A Go package that can convert html doc to markdown file

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conversion

type Conversion map[string]*Converted

Conversion is a concurrent safe map with key of link index and value of pointer of the converted string slice

type Converted

type Converted struct {
	// contains filtered or unexported fields
}

Converted consist of basic information about converted body

type DBody

type DBody struct {
	Index      int
	ParsedBody *html.Tokenizer
}

DBody consist of index in the DLink

type DLink []string

DLink save all the links

func NewDLink() DLink

NewDLink produce a list contains link

func (d *DLink) AddLink(url string) error

AddLink append link to the list

func (DLink) Convert

func (d DLink) Convert(h HandlerFunc) (Conversion, error)

Convert order go-routines to get the http body the concurrently and convert using handler func

type HandlerFunc

type HandlerFunc func(cv *Converted, tr *html.Tokenizer, ch chan *Converted)

HandlerFunc is a func type using during convert

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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