From e41a5a995d258fadb88c0ec380898233b2f402d4 Mon Sep 17 00:00:00 2001 From: ThArGos Date: Thu, 12 Sep 2024 13:56:00 +0200 Subject: Audit fix and usage of environment variables --- local.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'local.sh') diff --git a/local.sh b/local.sh index 0d1cda4..e6dc7ee 100755 --- a/local.sh +++ b/local.sh @@ -1,7 +1,8 @@ #!/bin/bash -read -p "Enter the ROAM_PATH: " ROAM_PATH -read -p "Enter the ROAM_DB_FILE: " ROAM_DB_FILE +# export ROAM_PATH=/path/to/org-roam/src +# export ROAM_DB_FILE=org-roam.db + ROAM_DB_PATH=$ROAM_PATH/$ROAM_DB_FILE ROAM_IMG_PATH=$ROAM_PATH/img @@ -31,4 +32,4 @@ if [ -d "../../out" ]; then fi mv out ../../ popd -popd \ No newline at end of file +popd -- cgit From 2c6f5c08beaa73b9d166370a605f9b505f29b480 Mon Sep 17 00:00:00 2001 From: ThArGos Date: Fri, 13 Sep 2024 02:32:03 +0200 Subject: Build the index and copy it next to the search data --- local.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'local.sh') diff --git a/local.sh b/local.sh index e6dc7ee..d1be019 100755 --- a/local.sh +++ b/local.sh @@ -1,8 +1,7 @@ #!/bin/bash -# export ROAM_PATH=/path/to/org-roam/src -# export ROAM_DB_FILE=org-roam.db - +read -p "Enter the ROAM_PATH: " ROAM_PATH +read -p "Enter the ROAM_DB_FILE: " ROAM_DB_FILE ROAM_DB_PATH=$ROAM_PATH/$ROAM_DB_FILE ROAM_IMG_PATH=$ROAM_PATH/img @@ -16,9 +15,13 @@ npm install npm run generate:graphdata --script_params=$ROAM_DB_PATH ./create_notes.sh $ROAM_PATH npm run generate:search +npm install fuse.js +node build-index.js # Copy files to the org-roam-ui directory cp -f searchdata.json org-roam-ui/components/Search/ +cp -f fuse-index.json org-roam-ui/components/Search/ + if [ -d $ROAM_IMG_PATH ]; then cp -r $ROAM_IMG_PATH org-roam-ui/public fi -- cgit