blob: 70129b0b0142636c67703ed2158bb8f1cf1964a6 (
plain) (
tree)
|
|
package main
import (
_ "neko/util"
"github.com/adammathes/neko/models/feed"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
)
func main() {
if len(os.Args) < 2 {
fmt.Printf("usage: nekoimport config.json <feeds.txt>\n\n format is one URL per line\n")
}
fb, err := ioutil.ReadFile(os.Args[2])
if err != nil {
log.Fatal("could not read file\n")
}
feeds := strings.Split(string(fb), "\n")
for _,f := range feeds {
feed.NewFeed(f)
}
}
|