InFile

So you have written that new, must have program. Let us see it here.
User avatar
cogier
Site Admin
Posts: 1117
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: InFile

Post 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
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: InFile

Post by PJBlack »

i've allready reported that to the bug tracker
User avatar
cogier
Site Admin
Posts: 1117
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: InFile

Post by cogier »

It's fixed now.
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: InFile

Post 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
If at first you don't succeed , try doing something differently.
BruceS
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: InFile

Post by PJBlack »

why not integrate bruces scripted into charlies infile or vice versa?
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: InFile

Post 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 :)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
cogier
Site Admin
Posts: 1117
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: InFile

Post 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!.
Attachments
InFile-2.0.tar.gz
(14.89 KiB) Downloaded 296 times
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: InFile

Post 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..
Last edited by BruceSteers on Saturday 13th February 2021 12:59am, edited 1 time in total.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: InFile

Post 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 :)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: InFile

Post by BruceSteers »

Oh and recusive , typo on long arg :roll:
If at first you don't succeed , try doing something differently.
BruceS
Post Reply