Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build script and readme update #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions MarkReport/md-parsing.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"time"
"bufio"
"html"
"io/ioutil"
Expand All @@ -11,8 +10,9 @@ import (
"strconv"
"strings"
"text/template"
"time"

blackfriday "gopkg.in/russross/blackfriday.v2"
blackfriday "github.com/russross/blackfriday/v2"
)

// Data ...
Expand Down Expand Up @@ -95,7 +95,7 @@ func getMarkdownContent(dir string) []byte {

mdContent := ""
for _, f := range mdFilesPicked {
if (f == ".md") {
if f == ".md" {
continue
}
c, err := ioutil.ReadFile(dir + "/" + f)
Expand Down Expand Up @@ -255,7 +255,6 @@ func main() {
htmlOut = htmlOut + "{{define \"BUILD_DATE\"}}" + time.Now().Format("2006-01-02") + " {{end}}\n"
htmlOut = htmlOut + "{{define \"BUILD_VERSION\"}} " + os.Getenv("BUILD_VERSION") + " {{end}}\n"


// Makdown HTML
f, _ := os.Create(dir + "/md-output.html")
w := bufio.NewWriter(f)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ Some Python packages are needed to run the program. It's easy to get them with p
Compilation of md-parsing

export GOPATH=~/.go
go get gopkg.in/russross/blackfriday.v2
go build -i md-parsing.go
go get ./...
go build -i MarkReport/md-parsing.go

The firefox driver is used to interpret JavaScript inside the HTML page generated from Markdown. You need to grab `geckodriver` in order to make it work:

Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module rginestou/MarkReport

go 1.19

require github.com/russross/blackfriday/v2 v2.1.0