-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
28 lines (24 loc) · 821 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"log"
"github.com/jasiu001/maestro/bucket"
"github.com/jasiu001/maestro/catalog"
"github.com/jasiu001/maestro/cli"
"github.com/jasiu001/maestro/comparison"
"github.com/jasiu001/maestro/importer"
"github.com/jasiu001/maestro/list"
)
func main() {
pathToFile := "./data/20190611200712.json"
words, err := bucket.NewBundleCollectionFromFile(pathToFile)
if err != nil {
log.Fatalf("Failed during fetch data from file %q: %s", pathToFile, err)
}
var buckets []list.Bucket
for _, word := range words {
buckets = append(buckets, word)
}
wordsList := list.CreateList(buckets, comparison.NewComparison(), list.NewIndexList())
cm := catalog.NewCatalogManager(catalog.NewFile("", catalog.FileReadWrite{}, catalog.Directory{}))
cli.RunMaestro(wordsList, importer.NewBucketWriter(cm))
}