forked from cmars/represent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
30 lines (25 loc) · 725 Bytes
/
main.go
File metadata and controls
30 lines (25 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2013 Casey Marshall <casey.marshall@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"flag"
. "github.com/cmars/represent/pkg/represent"
"log"
)
var src *string = flag.String("src", "", "Source path containing Present files and referenced content")
var publish *string = flag.String("publish", "", "Publish path to create static HTML pages and assets")
func die(err error, v ...interface{}) {
log.Println(append(v, err)...)
}
func main() {
flag.Parse()
represent, err := NewRepresent(*src, *publish)
if err != nil {
die(err)
}
err = represent.Publish()
if err != nil {
die(err)
}
}