aboutsummaryrefslogtreecommitdiff
path: root/generate_json.js
diff options
context:
space:
mode:
authorikoamu <ikoamu@gmail.com>2024-04-02 17:53:03 +0900
committerikoamu <ikoamu@gmail.com>2024-04-02 17:53:03 +0900
commit576693b00aa2be6ab4d2e9a24f3b6ffca627a304 (patch)
tree9db9e2f0a776af483ee8e9341116dd52f5733d7c /generate_json.js
parent48565e8ffb3be70eaef84c538644f8321a3bef53 (diff)
Modified to convert olp to array
Diffstat (limited to 'generate_json.js')
-rw-r--r--generate_json.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/generate_json.js b/generate_json.js
index fd20ae4..9649443 100644
--- a/generate_json.js
+++ b/generate_json.js
@@ -91,8 +91,10 @@ db.all(queryNodes, (_, nodes) =>
db.all(queryTags, (_, tags) => {
graphdata.data.nodes = nodes.map(node => {
const splitTags = node.tags?.split(',') ?? [null];
+ const olp = node.olp?.replace(/\(\"|\"\)/g, '').split(' ') ?? null;
return{
...node,
+ olp,
tags: splitTags,
file: getFilename(node.file),
properties: parseProperties(node.properties),