Library phase 1: SQLite item library with folders, migration of old files as layers, import split into items
This commit is contained in:
1 parent
4216211a20
commit
ad8b72c3d3
16 files changed
+897
-499
No files matched your search
@@ -54,6 +54,20 @@ namespace :places do
|
||||
end
|
||||
end
|
||||
|
||||
namespace :library do
|
||||
desc "Migrate data/gpx/ files into the library (runs on first start anyway; idempotent)"
|
||||
task :migrate do
|
||||
require_relative "lib/maptool/library"
|
||||
|
||||
data_dir = ENV.fetch("MAPTOOL_DATA_DIR") { File.join(__dir__, "data") }
|
||||
library = Maptool::Library.new(File.join(data_dir, "library.sqlite"),
|
||||
gpx_store: Maptool::GpxStore.new(File.join(data_dir, "gpx")),
|
||||
sources_dir: File.join(data_dir, "library", "sources"))
|
||||
library.migrate
|
||||
puts "Library at rev #{library.rev}"
|
||||
end
|
||||
end
|
||||
|
||||
namespace :gpx do
|
||||
desc "Backfill properties.id on Note-category features saved before edit/delete (and its id targeting) existed"
|
||||
task :backfill_note_ids do
|
||||
|
||||
Reference in new issue
Block a user