Skip to content

Commit af911d3

Browse files
committed
datadir from config
1 parent c8ddc81 commit af911d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/preprocess/preprocess.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
_ "github.com/marcboeker/go-duckdb"
88
log "github.com/sirupsen/logrus"
9+
"github.com/tebben/geocodeur/settings"
910
)
1011

1112
func ProcessAll() {
@@ -18,7 +19,10 @@ func ProcessAll() {
1819
func process(name string, query string) {
1920
log.Infof("Processing data: %s", name)
2021

21-
query = strings.ReplaceAll(query, "%DATADIR%", "../data/download/")
22+
config := settings.GetConfig()
23+
24+
query = strings.ReplaceAll(query, "%DATADIR%", config.Process.Folder)
25+
query = strings.ReplaceAll(query, "%COUNTRY%", strings.ToLower(config.Process.CountryClip))
2226

2327
db, err := getDuckDB()
2428
if err != nil {

0 commit comments

Comments
 (0)