No more duplicated themes

This commit is contained in:
2018-05-09 23:30:40 +02:00
parent 5d82dbf58b
commit 6bfd12756d
15 changed files with 286 additions and 2223 deletions

View File

@@ -34,9 +34,7 @@ import (
"jsonresume/model"
"jsonresume/themes"
_ "jsonresume/themes/kendall"
_ "jsonresume/themes/kendallfr"
_ "jsonresume/themes/stackoverflow"
_ "jsonresume/themes/stackoverflowfr"
)
func main() {
@@ -45,6 +43,7 @@ func main() {
var theme string
var err error
var outf string
var lang string
var f *os.File
flag.StringVar(&resume, "resume", "resume.json", "JSON of resume")
@@ -53,6 +52,8 @@ func main() {
flag.StringVar(&theme, "t", "", "Theme of resume")
flag.StringVar(&outf, "out", "-", "Output file")
flag.StringVar(&outf, "o", "-", "Output file")
flag.StringVar(&lang, "lang", "", "Force lang")
flag.StringVar(&lang, "l", "", "Force lang")
flag.Parse()
if outf == "-" {
@@ -65,6 +66,9 @@ func main() {
if r, err = model.Parse(resume); err != nil {
log.Fatal(err)
}
if lang != "" {
r.Language = lang
}
if t, exists := themes.Themes[theme]; exists {
if err = t.Render(r, f); err != nil {