Add export to html (markdown conversion) function

This commit is contained in:
Glenn Y. Rolland 2018-08-22 14:02:06 +02:00
parent e407d95649
commit fc301b48ef

View file

@ -5,6 +5,8 @@ import (
"fmt"
"github.com/adlio/trello"
// "github.com/davecgh/go-spew/spew"
"gopkg.in/russross/blackfriday.v2"
"log"
"net/url"
"os/exec"
@ -112,6 +114,12 @@ func (board *TrelloBoard) ExportToMarkdown() string {
return markdown.String()
}
func (board *TrelloBoard) ExportToHtml() string {
markdown := board.ExportToMarkdown()
html := blackfriday.Run([]byte(markdown))
return string(html)
}
/*
func RunTaskell(boardUrl string) {
cmd := fmt.Sprintf("taskell -t %s -", boardUrl)