aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/nekocrawl.go4
-rw-r--r--cmd/nekoimport.go2
-rw-r--r--cmd/util.go4
-rw-r--r--crawler/crawler.go2
-rw-r--r--main.go24
-rw-r--r--models/feed/feed.go2
-rw-r--r--models/item/item.go3
-rw-r--r--web/web.go7
8 files changed, 20 insertions, 28 deletions
diff --git a/cmd/nekocrawl.go b/cmd/nekocrawl.go
index e1dd6d0..19e006b 100644
--- a/cmd/nekocrawl.go
+++ b/cmd/nekocrawl.go
@@ -1,8 +1,8 @@
package main
import (
- "neko/crawler"
- _ "neko/util"
+ "github.com/adammathes/neko/crawler"
+ _ "github.com/adammathes/neko/util"
)
func main() {
diff --git a/cmd/nekoimport.go b/cmd/nekoimport.go
index c599478..70129b0 100644
--- a/cmd/nekoimport.go
+++ b/cmd/nekoimport.go
@@ -2,7 +2,7 @@ package main
import (
_ "neko/util"
- "neko/models/feed"
+ "github.com/adammathes/neko/models/feed"
"fmt"
"io/ioutil"
"log"
diff --git a/cmd/util.go b/cmd/util.go
index ca12fdb..e559fa3 100644
--- a/cmd/util.go
+++ b/cmd/util.go
@@ -1,8 +1,8 @@
package util
import (
- "neko/config"
- "neko/models"
+ "github.com/adammathes/neko/config"
+ "github.com/adammathes/neko/models"
"os"
)
diff --git a/crawler/crawler.go b/crawler/crawler.go
index e884b23..19457be 100644
--- a/crawler/crawler.go
+++ b/crawler/crawler.go
@@ -2,7 +2,7 @@ package crawler
import (
"log"
- "neko/models/feed"
+ "github.com/adammathes/neko/models/feed"
"neko/models/item"
"net/http"
"time"
diff --git a/main.go b/main.go
index 255b194..b7f76f3 100644
--- a/main.go
+++ b/main.go
@@ -1,25 +1,21 @@
package main
import (
- "os"
- "neko/config"
- "neko/models"
- "neko/models/feed"
- "neko/crawler"
- "neko/importer"
"fmt"
- // "io/ioutil"
+ "github.com/adammathes/neko/config"
+ "github.com/adammathes/neko/crawler"
+ "github.com/adammathes/neko/importer"
+ "github.com/adammathes/neko/models"
+ "github.com/adammathes/neko/models/feed"
+ "github.com/adammathes/neko/web"
"log"
- // "neko/models/item"
- // "neko/util"
- "neko/web"
+ "os"
)
func main() {
-
- // FIX
+ // TODO: change this
config.Read("./config.json")
-
+
models.InitDB(config.Config.DBServer)
if len(os.Args) < 2 {
fmt.Printf("usage: neko [web|addfeed|crawl]\n")
@@ -42,7 +38,6 @@ func main() {
}
}
-
func addFeed() {
if len(os.Args) < 2 {
log.Fatal("need a valid url")
@@ -57,7 +52,6 @@ func importLegacy() {
importer.ImportJSON(json_file)
}
-
func crawl() {
crawler.Crawl()
}
diff --git a/models/feed/feed.go b/models/feed/feed.go
index 4abebb4..f0e1291 100644
--- a/models/feed/feed.go
+++ b/models/feed/feed.go
@@ -2,7 +2,7 @@ package feed
import (
"log"
- "neko/models"
+ "github.com/adammathes/neko/models"
)
type Feed struct {
diff --git a/models/item/item.go b/models/item/item.go
index da613ee..882ccc1 100644
--- a/models/item/item.go
+++ b/models/item/item.go
@@ -3,8 +3,7 @@ package item
import (
"fmt"
"log"
- "neko/models"
- // "database/sql"
+ "github.com/adammathes/neko/models"
"github.com/microcosm-cc/bluemonday"
)
diff --git a/web/web.go b/web/web.go
index 1f01241..a52293f 100644
--- a/web/web.go
+++ b/web/web.go
@@ -3,11 +3,10 @@ package web
import (
"encoding/json"
"fmt"
- // "github.com/abbot/go-http-auth"
"log"
- "neko/config"
- "neko/models/feed"
- "neko/models/item"
+ "github.com/adammathes/neko/config"
+ "github.com/adammathes/neko/models/feed"
+ "github.com/adammathes/neko/models/item"
"net/http"
"strconv"
"golang.org/x/crypto/bcrypt"