The time now is Sat 23 Jan 2021, 12:35
All times are UTC - 4 |
Page 3 of 3 [43 Posts] |
Goto page: Previous 1, 2, 3 |
Author |
Message |
smokey01

Joined: 30 Dec 2006 Posts: 2820 Location: South Australia :-(
|
Posted: Tue 03 Mar 2015, 07:21 Post subject:
|
|
Updated locator-1.0 to 1.1 which includes a progress bar.
http://murga-linux.com/puppy/viewtopic.php?p=830933#830933
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Tue 03 Mar 2015, 07:40 Post subject:
|
|
gcmartin wrote: |  |
Hi, gc.
Thanks again for testing. The slocate wrapper window in the pic above
is too small for these olds eyes to properly read what's written.
Glad to see it runs properly in BK's latest 64-bit creation, though.
Is that an illustration of the "1g" version? Because I see "ticker tape"
background, even if I can't read what's on it. I thought I had removed
the background ticker tape effect in version "1g".
No, that's not version "1g" in your illustration, because the new version
has 4 lines of information to the user at the top, not just 2.
And with version "1g", I now get no ticker tape effect:
and you should be getting none either if using version "1g". BFN.
musher0
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Fri 03 Apr 2015, 22:29 Post subject:
|
|
Hello!
Another version on the way: it will look like this:
I decided not to use a GUI to pluck and run a line from the slocate search
list, but, as disciple suggested on another thread, "educate" the user
instead. So this version has a little panel that explains how to pluck and
run a file from the slocate listing.
Linux's CLI copy and paste management is actually top notch, it's just a
matter of learning to use it -- and that's really easy once you've thrown
your prejudices against CLI out the window.
As you can see in the above capture, plucking and running a song works
just fine using the CLI copy and paste gesture and the rox mime-types.
Top to bottom and left to right: the little how-to, the listing, the launching
console and aqualung playing the song.
I might try to add a "select partition" question if the user remembers less
than more on which drive a file is located, to speed up the search. I'll
check if it can be done.
So please be patient: new pet in construction, I'll likely upload it on Easter
Day? Thanks. (And remove/edit this paragraph.)
Almost forgot: thanks to stemsee for new ideas and incentive.
BFN.
musher0
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Thu 21 May 2015, 21:35 Post subject:
|
|
Hi, folks!
This in answer to a question by Puppus Dogfellow here.
I had answered Puppus D. with a total "nope", but since then I've
discovered that there's a way to mish-mash slocate so the "nope" isn't so
total anymore. There is a way to extract a partial text output from one
slocate db's for a particular term or expression.
I did try to obtain a global extraction of a particular term on all slocate
db's on all partitions, but it doesn't seem to work. Maybe it's because the
db's change during such a global search.
In any case, here it goes; it's still in draft format.
Code: | #!/bin/ash
# $SLOC/Slocate-srch-lim.sh # Link: $MBINS/Lim-Search
#
# Purpose: perform a limited search in already created slocate db's
# and offer the choice of saving the search in *.txt format.
#
# (c) Christian L'Écuyer (alias/aka musher0), Tous droits réservés /
# All Rights reserved, Gatineau (Québec), Canada, 2015-05-21.
#
# This is still a draft. It still needs a French translation,
# some ASCII colors, a better layout, etc. Feedback welcome.
#
####
SLOC="/root/my-applications/SLocate" # Variables
MBINS="/root/my-applications/bin"
DrV="";DatBas="";TeRm="";Entries="";HowMany="";Answer=""
# Making sure they're empty when we start.
Bye="\tBye for now!\n"
# 1st interactive
echo -e "\n\tOn which drive is the slocate database stored?"
read DrV
cd /mnt/$DrV &>/dev/null
[ $? -gt 0 ] && echo -e "\tSorry, there is no such partition. Please try again.\n$Bye" && exit
DatBas="slocate-$DrV.db"
echo -e "\tWhat are you looking for?"
read TeRm
# 1st results
Entries="`slocate -q -n 10000 -d ./$DatBas -r $TeRm | wc -l`"
echo -e "\t$DatBas contains $Entries entries with search expression '$TeRm'.\n"
[ $Entries -eq 0 ] && echo -e "\tPlease try another term or expression.\n$Bye" && exit
# 2nd interactive
echo -e "\tHow many entries of this list do you wish to save or see?
\t(Type '0' for a full listing.)"
read HowMany
[ $HowMany -eq 0 ] && HowMany="10000"
echo -e "\tType 'Y' if you wish to save a listing in *.txt format,
\t'S' for a screen display, any other key to exit."
read Answer
# Final results
case $Answer in
Y|y)slocate -q -n $HowMany -d ./$DatBas -r $TeRm > $TeRm.txt
echo -e "\t\t\tFinished!\n\tYou will find your listing in file $TeRm.txt on partition $DrV.\n"
;;
S|s)echo;slocate -q -n $HowMany -d ./$DatBas -r $TeRm | more ;;
*) echo -e "$Bye" ;;
esac
echo # Prettier!
### 30 ###
|
Please note that the slocate db's must exist for this script to work. slocate
must be installed and you must have run the slocate wrapper already.
Example -- Looking for works by jazz pianist Clara Ponty. (See pic.)
Lim-Search stands for "Limited Search".
Simple as pie, no? Feedback welcome. BFN.
musher0
Description |
|

Download |
Filename |
Slocate-srch-lim.sh.zip |
Filesize |
1.13 KB |
Downloaded |
411 Time(s) |
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
Puppus Dogfellow

Joined: 07 Jan 2013 Posts: 1669 Location: nyc
|
Posted: Thu 21 May 2015, 22:58 Post subject:
|
|
musher0 wrote: | Hi, folks!
This in answer to a question by Puppus Dogfellow here.
I had answered Puppus D. with a total "nope", but since then I've
discovered that there's a way to mish-mash slocate so the "nope" isn't so
total anymore. There is a way to extract a partial text output from one
slocate db's for a particular term or expression.
I did try to obtain a global extraction of a particular term on all slocate
db's on all partitions, but it doesn't seem to work. Maybe it's because the
db's change during such a global search.
In any case, here it goes; it's still in draft format.
Code: | #!/bin/ash
# $SLOC/Slocate-srch-lim.sh # Link: $MBINS/Lim-Search
#
# Purpose: perform a limited search in already created slocate db's
# and offer the choice of saving the search in *.txt format.
#
# (c) Christian L'Écuyer (alias/aka musher0), Tous droits réservés /
# All Rights reserved, Gatineau (Québec), Canada, 2015-05-21.
#
# This is still a draft. It still needs a French translation,
# some ASCII colors, a better layout, etc. Feedback welcome.
#
####
SLOC="/root/my-applications/SLocate" # Variables
MBINS="/root/my-applications/bin"
DrV="";DatBas="";TeRm="";Entries="";HowMany="";Answer=""
# Making sure they're empty when we start.
Bye="\tBye for now!\n"
# 1st interactive
echo -e "\n\tOn which drive is the slocate database stored?"
read DrV
cd /mnt/$DrV &>/dev/null
[ $? -gt 0 ] && echo -e "\tSorry, there is no such partition. Please try again.\n$Bye" && exit
DatBas="slocate-$DrV.db"
echo -e "\tWhat are you looking for?"
read TeRm
# 1st results
Entries="`slocate -q -n 10000 -d ./$DatBas -r $TeRm | wc -l`"
echo -e "\t$DatBas contains $Entries entries with search expression '$TeRm'.\n"
[ $Entries -eq 0 ] && echo -e "\tPlease try another term or expression.\n$Bye" && exit
# 2nd interactive
echo -e "\tHow many entries of this list do you wish to save or see?
\t(Type '0' for a full listing.)"
read HowMany
[ $HowMany -eq 0 ] && HowMany="10000"
echo -e "\tType 'Y' if you wish to save a listing in *.txt format,
\t'S' for a screen display, any other key to exit."
read Answer
# Final results
case $Answer in
Y|y)slocate -q -n $HowMany -d ./$DatBas -r $TeRm > $TeRm.txt
echo -e "\t\t\tFinished!\n\tYou will find your listing in file $TeRm.txt on partition $DrV.\n"
;;
S|s)echo;slocate -q -n $HowMany -d ./$DatBas -r $TeRm | more ;;
*) echo -e "$Bye" ;;
esac
echo # Prettier!
### 30 ###
|
Please note that the slocate db's must exist for this script to work. slocate
must be installed and you must have run the slocate wrapper already.
Example -- Looking for works by jazz pianist Clara Ponty. (See pic.)
Lim-Search stands for "Limited Search".
Simple as pie, no? Feedback welcome. BFN.
musher0 |
Puppus Dogfellow wrote: | musher0 wrote: | Hello, stemsee.
[...]
And of course I still prefer my CLI slocate wrapper over yours.
[...]
musher0 |
musher, how can you change it so it by default spits out all its results?
thanks.
related to stemsee's offering--is there a possibility that the databases don't work if musher's is installed first--i think that' the situation i'm in...
(apologies for going off topic, since no one else ever seems to have had any difficulty with it and it appears to be a solid part of tahr...) |
it looks good to me, musher, and i'd try it out right away if i were not at a machine with a broken "mount" utility. anyway, as i posted here, there's already a built in slocate command to search specific or strings of specific databases:
Code: | slocate --database=[specify path] [search term]
[you can also use --database=path1:path2:path3]
slocate --database=/mnt/sda1/slocate-sda1.db
slocate --database=/mnt/sda2/slocate-sda2.db
slocate --database=/mnt/sda3/slocate-sda3.db
slocate --database=/mnt/sda4/slocate-sda4.db
slocate --database=/mnt/sda5/slocate-sda5.db |
it wasn't so much a redirection to text i was asking about (could one add a -o or > after a command like the above or would it require select/middle click? is this the part of the thing that's not working right?) but a way to not have to interact to get the results--default to what your cli called "show all results" or something similar. at some point in the past i asked about searching within specific databases, which is i guess what you mean...
still, the interface and choices shown are excellent. seems like a worthwhile improvement. will definitely test.
thanks.
__________
update:
works for me in precise 5.5, both the select-a-partition and the output to file.
made terminal shortcuts for the main pieces--
sluc--update database
sloc--search, limited
slac--search, all
thanks, musher!
|
Back to top
|
|
 |
Dry Falls
Joined: 16 Dec 2014 Posts: 616 Location: Upper Columbia
|
Posted: Wed 10 Jun 2015, 21:10 Post subject:
|
|
got the findutils, configured & installed and everything worked effortlessly on Just-Lighthouse frugal install. The only problem is it won't search beyond the root file system (/). I expected it would follow from there through /media, /mnt or /initrd/mnt but no luck. Is this because the partitions are in tmpfs? Is there a way to direct the search string to look outside of ram?
thanks,
df
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Sun 11 Oct 2015, 20:54 Post subject:
|
|
Hello.
Please find attached version 2b. As announced above, it includes a
how-to and a small console to launch your lines from.
I've been testing it for awhile, and it seems to work very well on my
LibrePup-6.0.2.1. The version of Puppy should not matter, though,
because the utilities that this slocate wrapper script relies on exist on
all Puppies that I know.
I was pleasantly surprised by how easy it is to copy & paste from the big
slocate report console to the smallish command console.
With consoles, you don't have to do Ctrl-C in one and Ctrl-V in the other.
You highlight the text you need in one console, you go to other console
and you middle-click. That's it!
This works because rox can launch any file type in its MIME list.
As the attached screen capture shows, it's a breeze to start a file from
any partition with the console copy & paste.
Constructive comments and user reports welcome. Thanks in advance.
Enjoy!
musher0
~~~~~~~~~~~~~~
Additional notes:
-- When you hilite a line in the slocate report console, stop before the dot.
-- By comparison with the previous versions, this version 2b requires
__ wmctrl-1.0.7 as a dependency. (Attached.)
~~~~~~~~~~~~~~
 |
Description |
Where to put the quotes in the command line. |
Filesize |
6.62 KB |
Viewed |
281 Time(s) |

|
Description |
If slocate is busy updating databases, you will get this message. It takes about 3 minutes to update 274G worth of files on an old Athlon 2600+. It will be much faster if you have a multi-core computer and less files. |
Filesize |
7.07 KB |
Viewed |
269 Time(s) |

|
Description |
Top: the how-to. Bottom: the small launch console. In the middle, the slocate find window. The satellite windows close when the main slocate window closes or when you hit Ctrl-C in it. You cannot affect the how-to window because it's borderless. |
Filesize |
73.58 KB |
Viewed |
367 Time(s) |

|
Description |
The updated wrapper. Detects the system language automatically. At present, only EN and FR; other localizations are waiting for a translator!
|

Download |
Filename |
PuppyTerrier-02b_BIL.pet |
Filesize |
39.76 KB |
Downloaded |
357 Time(s) |
Description |
For your convenience.
|

Download |
Filename |
wmctrl-1.07.pet |
Filesize |
19.3 KB |
Downloaded |
348 Time(s) |
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Mon 12 Oct 2015, 14:03 Post subject:
|
|
Someone asked by PM if slocate was still being used in this version.
Answer: yes, it is. slocate is still the motor around which this wrapper is
wrapping itself. (Sorry for the bad pun!)
The presence of slocate is perhaps less obvious because in this version
I focused on the ease of use: how-to, launch console, the wide report
window. But the efficient and wonderful slocate utility is still behind it all.
BFN.
musher0
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Mon 12 Oct 2015, 20:00 Post subject:
|
|
Hello again, people!
Here is version 02c already.
This one lets you stay in the search panel as long as you like, doing
as many searches as you like! Long live "while...do...done"!
In the previous versions, you had to start or restart the wrapper every
time you wanted to do a search.
I won't bother you with screen captures for this one. The only difference,
visually, for the user, is a new sentence at the bottom, when you have
finished a search, explaining which key to type to quit or search again.
Also the need for wmctrl as a dependency is gone in this version: we
don't need it any more. Just the need for (the real) less remains.
Really enjoy!
BFN.
musher0
Description |
|

Download |
Filename |
PuppyTerrier-02c_BIL.pet |
Filesize |
44.84 KB |
Downloaded |
377 Time(s) |
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
Puppus Dogfellow

Joined: 07 Jan 2013 Posts: 1669 Location: nyc
|
Posted: Wed 28 Oct 2015, 13:38 Post subject:
|
|
working well in Quirky 7.2 64 bit, musher0.
i needed to use the slocate package below:
slocate-2.7-7.x86_64.rpm
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 6730 Location: Earth
|
Posted: Wed 28 Oct 2015, 13:49 Post subject:
|
|
Could someone submit its PET to GIT? And this utility as well.
I don't envision any PUP GIT member having any problem with slocate command or this utility which uses it. This command should be WOOFCE into every system as it presents no hardship in its presence.
_________________ Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
|
Back to top
|
|
 |
Pelo
Joined: 10 Sep 2011 Posts: 12591 Location: Mer méditerrannée (1 kms°)
|
Posted: Fri 30 Oct 2015, 01:36 Post subject:
bookmarked for test bench |
|
Alors, ce test bench ,
_________________ Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
|
Back to top
|
|
 |
Pelo
Joined: 10 Sep 2011 Posts: 12591 Location: Mer méditerrannée (1 kms°)
|
Posted: Sun 08 May 2016, 07:20 Post subject:
don't forget to test , senor Pelo, one more time ! |
|
don't forget to test , senor Pelo, one more time !
Bookmarked again, for a second chance
_________________ Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
|
Back to top
|
|
 |
|
Page 3 of 3 [43 Posts] |
Goto page: Previous 1, 2, 3 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|