drop title for now
This commit is contained in:
parent
7211578d9f
commit
bf2c0e032a
@ -39,12 +39,11 @@ type seg struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if len(os.Args) != 3 {
|
if len(os.Args) != 2 {
|
||||||
fmt.Fprintln(os.Stderr, "usage: tool/generate input.go title > output.html")
|
fmt.Fprintln(os.Stderr, "usage: tool/generate input.go > output.html")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
sourcePath := os.Args[1]
|
sourcePath := os.Args[1]
|
||||||
title := os.Args[2]
|
|
||||||
|
|
||||||
markdownPath, err := exec.LookPath("markdown")
|
markdownPath, err := exec.LookPath("markdown")
|
||||||
check(err)
|
check(err)
|
||||||
@ -108,18 +107,18 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf(`<!DOCTYPE html>
|
fmt.Print(`<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-eqiv="content-type" content="text/html;charset=utf-8">
|
<meta http-eqiv="content-type" content="text/html;charset=utf-8">
|
||||||
<title>%s</title>
|
<title>Go by Example</title>
|
||||||
<link rel=stylesheet href="../style/book.css">
|
<link rel=stylesheet href="../style/book.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="background"></div>
|
<div id="background"></div>
|
||||||
<table cellspacing="0" cellpadding="0">
|
<table cellspacing="0" cellpadding="0">
|
||||||
<tbody>`, title)
|
<tbody>`)
|
||||||
|
|
||||||
for _, seg := range segs {
|
for _, seg := range segs {
|
||||||
fmt.Printf(
|
fmt.Printf(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user