Page 1 of 1

Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 3:46 pm
by sonny

Hello,
What command do I have to add to the script to open ROX-Filer's certain bookmarks?
Very much appreciated.


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 5:24 pm
by Flash

Post the script as you have it so far.


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 6:34 pm
by williams2

Do you mean /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml ?


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 6:55 pm
by taersh
sonny wrote: Tue May 11, 2021 3:46 pm

Hello,
What command do I have to add to the script to open ROX-Filer's certain bookmarks?
Very much appreciated.

What do you mean exactly?

Open all bookmarks of e.g. directories/programs/files at once?
Open a specific entry from bookmarks?
Open the bookmarks menu of a Rox filer window?


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 6:59 pm
by sonny
taersh wrote: Tue May 11, 2021 6:55 pm
sonny wrote: Tue May 11, 2021 3:46 pm

Hello,
What command do I have to add to the script to open ROX-Filer's certain bookmarks?
Very much appreciated.

What do you mean exactly?

Open all bookmarks of e.g. directories/programs/files at once?
Open a specific entry from bookmarks?
Open the bookmarks menu of a Rox filer window?

Yes, open a specific bookmark (like /root/my-pictures) in ROX-Filer, so I can create a menu entry for it.
Thanks again, folks!


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 7:44 pm
by williams2

I do not have a clear idea of what you want.

This will open a RoxFiler window showing the files in /root/my-pictures:

rox /root/my-pictures

This will open all the dirs in the Bookmarks.xml file:

rox $( grep 'bookmark title' /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml | cut -d '>' -f 2- | cut -d '<' -f 1 )

This will not work if there are spaces in the bookmarked names.


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 9:20 pm
by sonny
williams2 wrote: Tue May 11, 2021 7:44 pm

I do not have a clear idea of what you want.

This will open a RoxFiler window showing the files in /root/my-pictures:

rox /root/my-pictures

This will open all the dirs in the Bookmarks.xml file:

rox $( grep 'bookmark title' /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml | cut -d '>' -f 2- | cut -d '<' -f 1 )

This will not work if there are spaces in the bookmarked names.

That's the one!
Thank you, Will.


Re: Command to Open a ROX-Filer's Bookmark?

Posted: Tue May 11, 2021 9:54 pm
by williams2

ok, then to make it work with spaces, it would need something like this:

Code: Select all

SAVEIFS=$IFS
IFS="
"
rox $(grep 'bookmark title' /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml | cut -d '>' -f 2- | cut -d '<' -f 1)
IFS=$SAVEIFS

Re: Command to Open a ROX-Filer's Bookmark?

Posted: Wed May 12, 2021 1:41 am
by williams2

This might work better, it puts each bookmark on a separate line.

Code: Select all

SAVEIFS=$IFS
IFS="
"
rox $( cat /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml | sed 's_<book_\n<book_g' | grep '<bookmark title' | cut -d '>' -f 2- | cut -d '<' -f 1 )
IFS=$SAVEIFS