Page 3 of 4

Re: InFile

Posted: Thursday 11th February 2021 4:53pm
by cogier
Thanks again Bruce. I am only going to test for Nautilus and Nemo (Ubuntu and Linux Mint) as I know what to expect. The rest will fall back to standard or 'sort it out yourself' mode.

I'll update it on the Farm when it's working as all I get now (16:52 11/02/2021) is: -

Image

Re: InFile

Posted: Thursday 11th February 2021 5:22pm
by PJBlack
i've allready reported that to the bug tracker

Re: InFile

Posted: Thursday 11th February 2021 5:39pm
by cogier
It's fixed now.

Re: InFile

Posted: Thursday 11th February 2021 7:15pm
by BruceSteers
cogier wrote: Thursday 11th February 2021 5:39pmIt's fixed now.
All i can find is 1.0.1 on farm
I have 1.0.2
cogier wrote: Thursday 11th February 2021 4:53pm Thanks again Bruce. I am only going to test for Nautilus and Nemo (Ubuntu and Linux Mint) as I know what to expect. The rest will fall back to standard or 'sort it out yourself' mode.
Yeah , probably best to , xdg open is good enough.
Not sure how you'd test , multiple linux types and desktops is how i do it.
Been a bit busy but i mostly only have gnome and mate desktops to test it on and have done.
(btw your comment about nautilus being ubuntu and mint wasn't quite correct as i have both linux's and they both use caja because i use mate desktop. i think nautilus is gnome default not ubuntu or mint) (lol, sorry i feel i'm being picky now)
All the best
Bruce

Re: InFile

Posted: Thursday 11th February 2021 7:46pm
by PJBlack
why not integrate bruces scripted into charlies infile or vice versa?

Re: InFile

Posted: Thursday 11th February 2021 8:32pm
by BruceSteers
PJBlack wrote: Thursday 11th February 2021 7:46pm why not integrate bruces scripted into charlies infile or vice versa?
All things are possible :)

Can you make it take args Charlie?

I was thinking about doing something plugin like with ScriptEd
I love "External Tools" in Pluma, very handy , was thinking of something similar.

InFile could be easily added to a customisable list of tools.
would be good to auto-fill the fields and search by adding some args at runtime.
gb.args can take the effort out of it :)

Re: InFile

Posted: Friday 12th February 2021 5:11pm
by cogier
..would be good to auto-fill the fields and search by adding some args at runtime.
OK here is a start.

WARNING This is a development version of the program

Code: Select all

./InFile.gambas --help
Will get you: -

Code: Select all

Usage: InFile <options> <arguments>

Options:
 -p --pattern <Pattern>                 File pattern to search e.g.'*.jpg,*.jepg'
 -s --search <Search>                   Text to search for
 -f --folder <Folder>                   Folder to search e.g.'~/pictures'
 -i --ignorecase <IgnoreCase>           Ignore the case when searching
 -R --recusive <Recursive>              Search in the sub folder of 'Folder'
 -V --version                           Display version
 -h --help                              Display this help


A sample command: -

Code: Select all

./InFile.gambas -p *.class -s WebView -f ~/Dropbox/gambas -i t -R t
The -i and -R commands need to start with "t" to be True. If it starts with anything else its False, but it must contain some text. I haven't worked out how to set it up without text - YET!.

Re: InFile

Posted: Friday 12th February 2021 8:45pm
by BruceSteers
cogier wrote: Friday 12th February 2021 5:11pm
..would be good to auto-fill the fields and search by adding some args at runtime.
OK here is a start.

WARNING This is a development version of the program

Code: Select all

./InFile.gambas --help
Will get you: -

Code: Select all

Usage: InFile <options> <arguments>

Options:
 -p --pattern <Pattern>                 File pattern to search e.g.'*.jpg,*.jepg'
 -s --search <Search>                   Text to search for
 -f --folder <Folder>                   Folder to search e.g.'~/pictures'
 -i --ignorecase <IgnoreCase>           Ignore the case when searching
 -R --recusive <Recursive>              Search in the sub folder of 'Folder'
 -V --version                           Display version
 -h --help                              Display this help


A sample command: -

Code: Select all

./InFile.gambas -p *.class -s WebView -f ~/Dropbox/gambas -i t -R t
The -i and -R commands need to start with "t" to be True. If it starts with anything else its False, but it must contain some text. I haven't worked out how to set it up without text - YET!.
try this.. :)

  bArgCase = Args.Has("i", "ignorecase", "Ignore the case when searching")
  bArgRecursive = Args.Has("R", "recusive", "Search in the sub folder of 'Folder'")

Note: change to Boolean not string.


Another useful thing is getting leftover args with Args.End
If once you have catered for args using Get() and Has() calls you can use the following to read any other args (it handy if you want to pass multiple args like a bunch of file names , search strings, etc withoug having to prefix them all)

 Dim sTheRestOfTheArgs As String[] = Args.End


Awesome stuff :)
I almost have a "External Tools" like thing going with my Editor now.
i can parse file name / file dir / selected text or all text to any shell command so should be able to select some text then search.
just having an issue with my variables at mo..

Re: InFile

Posted: Saturday 13th February 2021 12:55am
by BruceSteers
Here it is working a treat :)

I had to fix the -i -R flag stuff.
i changed the vars to boolean and used Args.Has()

I've added it to my "External Tools" list of commands so it searches my gambas source code folder for selected text in class and module files.
InFile.zip
It's quick :)

Re: InFile

Posted: Saturday 13th February 2021 1:01am
by BruceSteers
Oh and recusive , typo on long arg :roll: