basic weather-based "uptime"
This commit is contained in:
parent
3584ecce96
commit
f427c0fbae
7 changed files with 267 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
// Converts raw data from ff14-fish-tracker to JSON files that we can use with Serde.
|
||||
// Converts raw data from ff14-fish-tracker to JSON files that we can use with serde.
|
||||
// The only thing that manually needs to be done is to export the variables from said files.
|
||||
// Run using `node convert-to-json.js`.
|
||||
|
||||
|
@ -11,6 +11,13 @@ const result = {
|
|||
fish_entries: FISH_INFO,
|
||||
};
|
||||
|
||||
// For some reason, there are sometimes double-nested `bestCatchPath` attributes?
|
||||
Object.values(result.db_data.FISH).forEach((fish) => {
|
||||
if (fish.bestCatchPath[0] instanceof Array) {
|
||||
result.db_data.FISH[fish._id].bestCatchPath = fish.bestCatchPath[0];
|
||||
}
|
||||
});
|
||||
|
||||
const json = JSON.stringify(result);
|
||||
|
||||
await fs.writeFile("data.json", json, { encoding: "utf8" });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue