update to recent goutil split
This commit is contained in:
parent
5647b75705
commit
fe6b152b19
11
ambrowse.go
11
ambrowse.go
|
@ -1,7 +1,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.gutmet.org/goutil.git"
|
goutil "git.gutmet.org/goutil.git/html"
|
||||||
|
"git.gutmet.org/goutil.git/misc"
|
||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
"golang.org/x/net/html"
|
"golang.org/x/net/html"
|
||||||
"log"
|
"log"
|
||||||
|
@ -63,7 +64,7 @@ func readLine(line string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getDirectory() string {
|
func getDirectory() string {
|
||||||
home, err := goutil.HomeDir()
|
home, err := misc.HomeDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Cannot identify home directory", err)
|
log.Fatal("Cannot identify home directory", err)
|
||||||
}
|
}
|
||||||
|
@ -148,14 +149,14 @@ func clean(files []string) {
|
||||||
|
|
||||||
func digest(dir string, created []string) {
|
func digest(dir string, created []string) {
|
||||||
for _, file := range created {
|
for _, file := range created {
|
||||||
if filepath.Ext(file) == ".html" && goutil.PathExists(file) {
|
if filepath.Ext(file) == ".html" && misc.PathExists(file) {
|
||||||
b := readHTML(file)
|
b := readHTML(file)
|
||||||
if b.title != "" {
|
if b.title != "" {
|
||||||
err := goutil.AppendToFile(filepath.Join(dir, BOOKFILE), b.yaml())
|
err := misc.AppendToFile(filepath.Join(dir, BOOKFILE), b.yaml())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
goutil.Notify(NAME, b.String())
|
misc.Notify(NAME, b.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
go.mod
4
go.mod
|
@ -1,7 +1,9 @@
|
||||||
module git.gutmet.org/ambrowse.git
|
module git.gutmet.org/ambrowse.git
|
||||||
|
|
||||||
|
go 1.14
|
||||||
|
|
||||||
require (
|
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
|
github.com/fsnotify/fsnotify v1.4.7
|
||||||
golang.org/x/net v0.0.0-20190110200230-915654e7eabc
|
golang.org/x/net v0.0.0-20190110200230-915654e7eabc
|
||||||
golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb // indirect
|
golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb // indirect
|
||||||
|
|
Loading…
Reference in New Issue
Block a user