Skip to content

Commit 1f532f9

Browse files
committed
refactor(etl): Update museum ID handling and fix formatting
1 parent 7ce8eba commit 1f532f9

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/etl/src/museums-json.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function convertMuseumsToJson(inputPath, outputPath) {
3838
country: org.location[0].country[0]?.replace(/\s{2,}/g, " "),
3939
address: org.location[0].address[0].addrLine[0]?.replace(
4040
/\s{2,}/g,
41-
" "
41+
" ",
4242
),
4343
geo: {
4444
lat: parseFloat(org.location[0].geo[0].split(",")[0].trim()),
@@ -47,9 +47,11 @@ export async function convertMuseumsToJson(inputPath, outputPath) {
4747
},
4848
};
4949

50-
// Add Pleiades ID if it exists
5150
if (org.idno) {
52-
museum.pleiades = org.idno[0]._;
51+
museum.idno = {
52+
type: org.idno[0].$.type,
53+
url: org.idno[0]._,
54+
};
5355
}
5456

5557
return museum;
@@ -71,7 +73,7 @@ export async function main() {
7173
"data",
7274
"raw",
7375
"alists",
74-
"museums.xml"
76+
"museums.xml",
7577
);
7678

7779
const outputPath =

0 commit comments

Comments
 (0)