Command to Open a ROX-Filer's Bookmark?

Moderator: Forum moderators

Post Reply
sonny
Posts: 626
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 454 times
Been thanked: 144 times

Command to Open a ROX-Filer's Bookmark?

Post by sonny »

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

User avatar
Flash
Moderator
Posts: 922
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 47 times
Been thanked: 112 times

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

Post by Flash »

Post the script as you have it so far.

Chaos coordinator :?
williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

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

Post by williams2 »

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

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

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

Post 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?

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

sonny
Posts: 626
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 454 times
Been thanked: 144 times

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

Post 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!

williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

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

Post 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.

sonny
Posts: 626
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 454 times
Been thanked: 144 times

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

Post 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.

williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

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

Post 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
williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

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

Post 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
Post Reply

Return to “Tips & Tweaks”