Configuring basexgui - keeping directory context

Friday, 28 April 2017 · 4 messages · last reply 15 May 2017
BD
Bridger Dyson-Smith28 Apr 2017 06:13 #
Hi all -- apologies for the strange title: I'm not quite sure how to word my question. I'm having a problem with maintaining the correct context of basexgui, particularly with testing some .bxs files. I have a directory where I've been keeping my BaseX installs: /usr/home/bridger/src/basex = $baseXhome. I've been in the habit of starting new tests and projects in the repo directory in $baseXhome; e.g. $baseXhome/repo/new-test. In the new-test directory, I have the following: new-test/ data/ resources/ add.xq .basex .basexgui .basexhome check.bxs add.bxs check.bxs is a simple script: CHECK foo RUN add.bxs CLOSE add.bxs runs an xquery script: RUN resources/add.xq
and the `add.xq` is (surprisingly) another simple script:
let $msg := file:current-dir()
return
  $msg
The problem I'm having is that, unless I cd ~/src/basex/repo/new-test && basexgui, basexgui isn't able to determine the relative file path(s) of any of the secondary scripts (add.bxs and resources/add.xq). While it wouldn't be a terrible burden to launch the GUI from a new terminal (thank heavens for multiplexers!), the problem there is that basexgui seems to default to (re)opening the last directory where it was launched; in other words 1. cd ~/src/basex/repo/new-test && basexgui and the GUI launches and things look great. 2. in a new terminal window: cd ~/src/basex/repo/old-test && basexgui and the GUI launches and opens the new-test directory. So, I guess that's two problems, but they're both somewhat related to the relative directory path context of the GUI. I've tried adding .basexhome (manually) and .basexgui (manually and letting the GUI add them automatically), but those files don't seem to help matters. Is there anything else that I can try to resolve this? I know that I can use absolute file paths, but I have a simple project that I want to share with a colleague. Is the solution to add some XQuery that will determine file paths, and add/insert that into the command .bxs files? Thanks so much for your time and trouble. Best, Bridger
CG
Christian Grün11 May 2017 19:04 #
Dear Bridger, Sorry for letting you wait; I’ve been on vacation. I have opened a new GitHub issue [1], and I will soon check if it’s possible to modify or extend path resolution of the RUN command. All the best, Christian [1] https://github.com/BaseXdb/basex/issues/1454
Quoted text · Bridger Dyson-Smith · 71 lines
On Fri, Apr 28, 2017 at 4:13 AM, Bridger Dyson-Smith <bdysonsmith at gmail.com> wrote: > Hi all -- > > apologies for the strange title: I'm not quite sure how to word my question. > I'm having a problem with maintaining the correct context of basexgui, > particularly with testing some .bxs files. > > I have a directory where I've been keeping my BaseX installs: > /usr/home/bridger/src/basex = $baseXhome. > > I've been in the habit of starting new tests and projects in the repo > directory in $baseXhome; e.g. $baseXhome/repo/new-test. In the new-test > directory, I have the following: > > new-test/ > data/ > resources/ > add.xq > .basex > .basexgui > .basexhome > check.bxs > add.bxs > > check.bxs is a simple script: > CHECK foo > RUN add.bxs > CLOSE > > add.bxs runs an xquery script: > RUN resources/add.xq > > and the `add.xq` is (surprisingly) another simple script: > let $msg := file:current-dir() > return > $msg > > The problem I'm having is that, unless I `cd ~/src/basex/repo/new-test && > basexgui`, `basexgui` isn't able to determine the relative file path(s) of > any of the secondary scripts (add.bxs and resources/add.xq). While it > wouldn't be a terrible burden to launch the GUI from a new terminal (thank > heavens for multiplexers!), the problem there is that basexgui seems to > default to (re)opening the last directory where it was launched; in other > words > 1. `cd ~/src/basex/repo/new-test && basexgui` and the GUI launches and > things look great. > 2. in a new terminal window: `cd ~/src/basex/repo/old-test && basexgui` and > the GUI launches and opens the new-test directory. > > So, I guess that's two problems, but they're both somewhat related to the > relative directory path context of the GUI. > > I've tried adding .basexhome (manually) and .basexgui (manually and letting > the GUI add them automatically), but those files don't seem to help matters. > Is there anything else that I can try to resolve this? I know that I can use > absolute file paths, but I have a simple project that I want to share with a > colleague. Is the solution to add some XQuery that will determine file > paths, and add/insert that into the command .bxs files? > > Thanks so much for your time and trouble. > Best, > Bridger > > > > > > > >
BD
Bridger Dyson-Smith11 May 2017 21:26 #
Christian - No worries. Hope you had a pleasant vacation! Thank you for opening an issue - I'll keep an eye on github, too. Best, Bridger
Quoted text · Christian Grün · 96 lines
On Thu, May 11, 2017 at 1:04 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Dear Bridger, > > Sorry for letting you wait; I’ve been on vacation. > > I have opened a new GitHub issue [1], and I will soon check if it’s > possible to modify or extend path resolution of the RUN command. > > All the best, > Christian > > [1] https://github.com/BaseXdb/basex/issues/1454 > > > > On Fri, Apr 28, 2017 at 4:13 AM, Bridger Dyson-Smith > <bdysonsmith at gmail.com> wrote: > > Hi all -- > > > > apologies for the strange title: I'm not quite sure how to word my > question. > > I'm having a problem with maintaining the correct context of basexgui, > > particularly with testing some .bxs files. > > > > I have a directory where I've been keeping my BaseX installs: > > /usr/home/bridger/src/basex = $baseXhome. > > > > I've been in the habit of starting new tests and projects in the repo > > directory in $baseXhome; e.g. $baseXhome/repo/new-test. In the new-test > > directory, I have the following: > > > > new-test/ > > data/ > > resources/ > > add.xq > > .basex > > .basexgui > > .basexhome > > check.bxs > > add.bxs > > > > check.bxs is a simple script: > > CHECK foo > > RUN add.bxs > > CLOSE > > > > add.bxs runs an xquery script: > > RUN resources/add.xq > > > > and the `add.xq` is (surprisingly) another simple script: > > let $msg := file:current-dir() > > return > > $msg > > > > The problem I'm having is that, unless I `cd ~/src/basex/repo/new-test && > > basexgui`, `basexgui` isn't able to determine the relative file path(s) > of > > any of the secondary scripts (add.bxs and resources/add.xq). While it > > wouldn't be a terrible burden to launch the GUI from a new terminal > (thank > > heavens for multiplexers!), the problem there is that basexgui seems to > > default to (re)opening the last directory where it was launched; in other > > words > > 1. `cd ~/src/basex/repo/new-test && basexgui` and the GUI launches and > > things look great. > > 2. in a new terminal window: `cd ~/src/basex/repo/old-test && basexgui` > and > > the GUI launches and opens the new-test directory. > > > > So, I guess that's two problems, but they're both somewhat related to the > > relative directory path context of the GUI. > > > > I've tried adding .basexhome (manually) and .basexgui (manually and > letting > > the GUI add them automatically), but those files don't seem to help > matters. > > Is there anything else that I can try to resolve this? I know that I can > use > > absolute file paths, but I have a simple project that I want to share > with a > > colleague. Is the solution to add some XQuery that will determine file > > paths, and add/insert that into the command .bxs files? > > > > Thanks so much for your time and trouble. > > Best, > > Bridger > > > > > > > > > > > > > > > > >
CG
Christian Grün15 May 2017 13:59 #
Dear Bridger, I have just uploaded a new snapshot, which considers the base URI of the command script [1,2]. We plan to release a little patch release today. Hope this helps, Christian [1] http://files.basex.org/releases/latest/ [2] https://github.com/BaseXdb/basex/issues/1454
Quoted text · Bridger Dyson-Smith · 111 lines
On Thu, May 11, 2017 at 7:25 PM, Bridger Dyson-Smith <bdysonsmith at gmail.com> wrote: > Christian - > > No worries. Hope you had a pleasant vacation! Thank you for opening an issue > - I'll keep an eye on github, too. > > Best, > Bridger > > On Thu, May 11, 2017 at 1:04 PM, Christian Grün <christian.gruen at gmail.com> > wrote: >> >> Dear Bridger, >> >> Sorry for letting you wait; I’ve been on vacation. >> >> I have opened a new GitHub issue [1], and I will soon check if it’s >> possible to modify or extend path resolution of the RUN command. >> >> All the best, >> Christian >> >> [1] https://github.com/BaseXdb/basex/issues/1454 >> >> >> >> On Fri, Apr 28, 2017 at 4:13 AM, Bridger Dyson-Smith >> <bdysonsmith at gmail.com> wrote: >> > Hi all -- >> > >> > apologies for the strange title: I'm not quite sure how to word my >> > question. >> > I'm having a problem with maintaining the correct context of basexgui, >> > particularly with testing some .bxs files. >> > >> > I have a directory where I've been keeping my BaseX installs: >> > /usr/home/bridger/src/basex = $baseXhome. >> > >> > I've been in the habit of starting new tests and projects in the repo >> > directory in $baseXhome; e.g. $baseXhome/repo/new-test. In the new-test >> > directory, I have the following: >> > >> > new-test/ >> > data/ >> > resources/ >> > add.xq >> > .basex >> > .basexgui >> > .basexhome >> > check.bxs >> > add.bxs >> > >> > check.bxs is a simple script: >> > CHECK foo >> > RUN add.bxs >> > CLOSE >> > >> > add.bxs runs an xquery script: >> > RUN resources/add.xq >> > >> > and the `add.xq` is (surprisingly) another simple script: >> > let $msg := file:current-dir() >> > return >> > $msg >> > >> > The problem I'm having is that, unless I `cd ~/src/basex/repo/new-test >> > && >> > basexgui`, `basexgui` isn't able to determine the relative file path(s) >> > of >> > any of the secondary scripts (add.bxs and resources/add.xq). While it >> > wouldn't be a terrible burden to launch the GUI from a new terminal >> > (thank >> > heavens for multiplexers!), the problem there is that basexgui seems to >> > default to (re)opening the last directory where it was launched; in >> > other >> > words >> > 1. `cd ~/src/basex/repo/new-test && basexgui` and the GUI launches and >> > things look great. >> > 2. in a new terminal window: `cd ~/src/basex/repo/old-test && basexgui` >> > and >> > the GUI launches and opens the new-test directory. >> > >> > So, I guess that's two problems, but they're both somewhat related to >> > the >> > relative directory path context of the GUI. >> > >> > I've tried adding .basexhome (manually) and .basexgui (manually and >> > letting >> > the GUI add them automatically), but those files don't seem to help >> > matters. >> > Is there anything else that I can try to resolve this? I know that I can >> > use >> > absolute file paths, but I have a simple project that I want to share >> > with a >> > colleague. Is the solution to add some XQuery that will determine file >> > paths, and add/insert that into the command .bxs files? >> > >> > Thanks so much for your time and trouble. >> > Best, >> > Bridger >> > >> > >> > >> > >> > >> > >> > >> > > >

⚡Generated with XQuery