Open korbinian90 opened 4 months ago
This currently only works with absolute paths
filePath=$(realpath "$1")
niivue='/usr/bin/google-chrome --app-id=pgienjkbgeffjnbagkbcacejihclfdeg' "$filePath"
New version for multiple input images:
Store this file as niivue
under /usr/bin
(requires sudo) and run sudo chmod +x+r /usr/bin/niivue
to make it executable. Afterwards, the command niivue Image1.nii Image2.nii
should work
#!/bin/bash
filePaths=""
for filePath in "$@"; do
absolutePath=$(realpath "$filePath")
filePaths="$filePaths \"$absolutePath\""
done
eval /usr/bin/google-chrome --app-id=pgienjkbgeffjnbagkbcacejihclfdeg $filePaths
When the pwa is installed via chrome as local app, the following alias makes it work via command line:
alias niivue='/usr/bin/google-chrome --app-id=pgienjkbgeffjnbagkbcacejihclfdeg'
Opening images vianiivue test.nii
orniivue test1.nii test2.nii
TODO: create explanation somewhere useful