forked from MapComplete/MapComplete
Merge branch 'develop' into feature/maproulette
This commit is contained in:
commit
f174a3d776
43 changed files with 2097 additions and 371 deletions
|
@ -1,4 +1,4 @@
|
|||
#! /bin/bash
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# Automerge translations automatically fetches the translations from weblate
|
||||
|
||||
|
|
20
scripts/mergeJsonFiles.ts
Normal file
20
scripts/mergeJsonFiles.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import {readFileSync, writeFileSync} from "fs";
|
||||
import {Utils} from "../Utils";
|
||||
|
||||
function main(args: string[]) {
|
||||
|
||||
console.log("File Merge")
|
||||
|
||||
if (args.length != 3) {
|
||||
console.log("Usage: input1.json input2.json output.json")
|
||||
console.log("You passed in the arguments: " + args.join(","))
|
||||
return
|
||||
}
|
||||
const [input1, input2, output] = args
|
||||
const f1 = JSON.parse(readFileSync(input1, "utf8"))
|
||||
const f2 = JSON.parse(readFileSync(input2, "utf8"))
|
||||
Utils.Merge(f1, f2)
|
||||
writeFileSync(output, JSON.stringify(f2, null, " "))
|
||||
}
|
||||
|
||||
main(process.argv.slice(2))
|
Loading…
Add table
Add a link
Reference in a new issue