correction yaml creation - extraction yaml + html preparation
This commit is contained in:
19
cmd/main.go
19
cmd/main.go
@@ -1,7 +1,9 @@
|
||||
package main
|
||||
|
||||
import(
|
||||
"project.hechon.fr/internal/fetcher"
|
||||
"project.hechon.fr/internal/renderer"
|
||||
/* "project.hechon.fr/internal/fetcher"
|
||||
*/
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -47,24 +49,15 @@ func main (){
|
||||
}
|
||||
cfg.ProperName = properName
|
||||
|
||||
searchedChapter := "2"
|
||||
|
||||
err = fetcher.FetchBook(&cfg)
|
||||
|
||||
err = renderer.ExtractChapter(&cfg, 2)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("GET %s %s %s failed\n", book, searchedChapter, cfg.Book.Version)
|
||||
log.Printf("******%s*******\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
/* err = fetcher.SaveChapter(cfg, &cfg.Book.Chapters[0])
|
||||
if err != nil{
|
||||
log.Printf("error in saving the chapter: %v", err)
|
||||
}
|
||||
/* log.Printf("%v", cfg.Book.Chapters)
|
||||
*/
|
||||
|
||||
log.Printf("%v", cfg.Book.Chapters)
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user