update to recent goutil split

This commit is contained in:
gutmet 2020-10-11 13:39:17 +02:00
parent 5647b75705
commit fe6b152b19
2 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,8 @@
package main
import (
"git.gutmet.org/goutil.git"
goutil "git.gutmet.org/goutil.git/html"
"git.gutmet.org/goutil.git/misc"
"github.com/fsnotify/fsnotify"
"golang.org/x/net/html"
"log"
@ -63,7 +64,7 @@ func readLine(line string) string {
}
func getDirectory() string {
home, err := goutil.HomeDir()
home, err := misc.HomeDir()
if err != nil {
log.Fatal("Cannot identify home directory", err)
}
@ -148,14 +149,14 @@ func clean(files []string) {
func digest(dir string, created []string) {
for _, file := range created {
if filepath.Ext(file) == ".html" && goutil.PathExists(file) {
if filepath.Ext(file) == ".html" && misc.PathExists(file) {
b := readHTML(file)
if b.title != "" {
err := goutil.AppendToFile(filepath.Join(dir, BOOKFILE), b.yaml())
err := misc.AppendToFile(filepath.Join(dir, BOOKFILE), b.yaml())
if err != nil {
log.Println(err)
}
goutil.Notify(NAME, b.String())
misc.Notify(NAME, b.String())
}
}
}

4
go.mod
View File

@ -1,7 +1,9 @@
module git.gutmet.org/ambrowse.git
go 1.14
require (
git.gutmet.org/goutil.git v0.0.0-20190113180148-bb2d3e26ea6c
git.gutmet.org/goutil.git v0.0.0-20201011110813-b9f7ae29b4e6
github.com/fsnotify/fsnotify v1.4.7
golang.org/x/net v0.0.0-20190110200230-915654e7eabc
golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb // indirect