Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 30 Oct 2014, 13:56
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
LocnRox (Enhanced with Vovchik)
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Author Message
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Sat 03 Oct 2009, 17:04    Post_subject:  

Bert wrote:
seaside wrote:
vovchik,
Those attached Puppies are all so good, it's very hard to pick one. Although my wife likes the last one the best. Very Happy
s

So do I!
Looks a bit like my sister when she was younger Smile

Dog 1 is not receiving enough nourishment
Dog 2 looks like my brother-in-law when he gets nervous
Dog 3 needs a special-care kennel
Laughing


Bert,

Do we have any assurances that you are in fact a human?

(There have been rumors floating around that real puppies are trolling the internet and speaking their thoughts on family members and others Very Happy Very Happy )

Regards,
s
(Confidentially, my brother-in-law reminds me of that "king Charles" spaniel model) Very Happy
Back to top
View user's profile Send_private_message 
Keef


Joined: 20 Dec 2007
Posts: 639
Location: Staffordshire

PostPosted: Sat 03 Oct 2009, 19:14    Post_subject:  

seaside,

No joy with the older version.
Tried the latest one on slaxer and 301X where it worked, but it didn't on 3.01.
After finding out that Tinylogin was part of Busybox, I installed the busybox-20090725.pet to see what happened. It solved the 'addgroup' problem, but... still no dialog box or gyrating puppies.
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Sat 03 Oct 2009, 20:04    Post_subject:  

Keef wrote:
seaside,

No joy with the older version.
Tried the latest one on slaxer and 301X where it worked, but it didn't on 3.01.
After finding out that Tinylogin was part of Busybox, I installed the busybox-20090725.pet to see what happened. It solved the 'addgroup' problem, but... still no dialog box or gyrating puppies.


Keef,

Ah...... I'm sorry it's not working and I'm at a loss to think of anything else to try.

Not to lead you off this, but have you tried "searchmonkey", it's not an indexed search, yet it's reasonable fast and well featured.

Wait.. one more idea .... Gtkdialog versions...the puppy 4 has Gtkdialog3 - perhaps yours have earlier ones.

Cheers,
s
Back to top
View user's profile Send_private_message 
rollo5

Joined: 07 Mar 2013
Posts: 2

PostPosted: Fri 23 Aug 2013, 05:03    Post_subject: multiple keywords support  

Hello seaside,

thank you for this little tool. For a long time I was looking for something like this. My needs are: fast search, open the filemanager on clicking, multiple keywords, possibility to sort files for filename, date and size.

I added support for multiple keyword search. Now you can type in for example "spot dir" (without quotes) and it shows you all files with spot and dir in the filename. Of course you can search for extensions like "firefox png".


Code:
#! /usr/sbin/gtkdialog3 -e

# ------------------
# PROGRAM:   locnRox (pfilefind)
# AUTHORS:   Seaside (locnrox) and Vovchik
# PURPOSE:   GUI to find files
# DEPENDS:   bash, gtkdialog, showsplash, Mlocate
# PLATFORM:   Linux
# DATE:      29 September
# VERSION:   v.0.1a
# ------------------

# ------------------------
# INITIALIZATION
# ------------------------

## gtkdialog3 has to be linked to gtkdialog in usr/sbin

if [ ! -f /usr/sbin/gtkdialog ]; then ln -s /usr/sbin/gtkdialog3 /usr/sbin/gtkdialog ; fi

TITLE="LocnRox"
VERSION="V. 0.1a"

PFILEFIND_HELP_TEXT="
<b>LocnRox</b> helps you to find files on your storage media \
(hard disks, USB sticks, main file system) using the <b>Mlocate</b> utility.

<b>Operation:</b>
 
1. First, mount the drives you wish to catalogue and press the <b>Update</b> \
button to create the mlocate database. Once you have done this <i>- and \
this procedure may take up to five minutes with a lot of partitions \
mounted -</i> , you can search for files.

2. Enter a file name or partial file name (wildcards - * - are permitted) in \
the <b>Input Box</b>.

3. Press the <b>Search</b> button.

4. The program will search its database and present you with a list \
of matching files. When you click on a file name in the list, the program \
will launch <b>Rox Filer</b> in that file's directory.

5. To exit the program, press the <b>Cancel</b> button."

# ------------------------
# END INITIALIZATION
# ------------------------


# ------------------------
# FUNCTIONS
# ------------------------

# ------------------------
function findfiles()
# ------------------------
{
# added support for multiple keywords: first word is searched by locate. The
# output is saved to the file "search_$key_word_number". Now grep searches
# the output for the other keywords.


   key_words_array=($ENTRY)

   typeset -i key_word_number=0
   typeset -i old_key_word_number
   typeset -i key_words_array_size_minus_one

   locate -i ${key_words_array[$key_word_number]} > /tmp/search_$key_word_number

   key_words_array_size_minus_one=${#key_words_array[@]}-1

   while [ $key_word_number -lt $key_words_array_size_minus_one ]
   do
      old_key_word_number=$key_word_number
      key_word_number=$key_word_number+1
      grep -i ${key_words_array[$key_word_number]} /tmp/search_$old_key_word_number > /tmp/search_$key_word_number
   done

   mv /tmp/search_$key_word_number /tmp/locatefoundfiles

#   ./bin/locate "$ENTRY" | sort > /tmp/locatefoundfiles
}   

# ------------------------
function roxview()
# ------------------------
{
   rox -s "$FILE"
}

# ------------------------
function dbupdate()
# ------------------------
{   
   var1="./img/dog-pup-tailwag.gif"
   var2="<b>Indexing files. Please be patient</b>"
   var3="LocnRox Update"
   ./bin/showsplash "$var1" "$var2" "$var3"&
   ./bin/updatedb
   killall showsplash
}

# ------------------------
# END FUNCTIONS
# ------------------------

# ------------------------
#  HELP WINDOW   
# ------------------------
   
export PFILEFIND_HELP_DIALOG='
<window title="LocnRox Help" icon-name="gtk-help">
   <vbox>
      <pixmap>
         <input file>"./img/logo.png"</input>
      </pixmap>
      <text use-markup="true">
         <label>"<b>'$TITLE' HELP</b>"</label>
      </text>
      <frame>
      <text use-markup="true" wrap="true">
         <label>"'$PFILEFIND_HELP_TEXT'"</label>
      </text>
      </frame>
      <hbox>
         <button cancel>
            <action>closewindow:PFILEFIND_HELP_DIALOG</action>
         </button>
      </hbox>
   </vbox>
</window>
'
# ------------------------
#  MAIN WINDOW   
# ------------------------

export MAIN_DIALOG='
<window title="LocnRox" decorated="true" window_position="1" icon-name="gtk-find">
   <vbox>
      <frame>
         <pixmap>
            <input file>"./img/logo.png"</input>
         </pixmap>
         <vbox>
            <text use-markup="true">
               <label>"<b>'$TITLE'</b>"</label>
            </text>
            <text use-markup="true">
               <label>"<i>Locate file and launch Rox Filer</i>"</label>
            </text>
            <text use-markup="true">
               <label>"<b>'$VERSION'</b>"</label>
            </text>
         </vbox>
      </frame>
      <frame>
         <hbox>
               <text>
                 <label>Search term:</label>
               </text>
               <entry activates-default="true">
               <default>Enter search term</default>
               <variable>ENTRY</variable>
               </entry>
            <button can-default="true" has-default="true">
               <input file>"./img/find.png"</input>
               <label>Search</label>
               <action>findfiles</action>
               <action>refresh:FILE</action>
            </button>
         </hbox>
      </frame>
      <frame Choose your file>
         <tree headers_visible="false" rules_hint="true">
            <label>Found files</label>
            <height>250</height><width>500</width>
            <input>cat /tmp/locatefoundfiles</input>   
            <variable>FILE</variable>
            <action>roxview</action>   
         </tree>
      </frame>
      <hbox>
         <button help>
            <action>launch:PFILEFIND_HELP_DIALOG</action>
         </button>
         <button>
            <input file>"./img/go.png"</input>
            <label>Update DB</label>
            <action>dbupdate</action>
         </button>
         <button cancel>
            <action type="exit">QUIT</action>
         </button>
      </hbox>
   </vbox>
</window>
'



I'm a beginner in bash scripting - maybe there is a better solution.

If i have time I would make the sorting feature (sorting by size and date). Do you have an I idea how I could make this?

regards, rollo
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Fri 23 Aug 2013, 16:56    Post_subject: Re: multiple keywords support  

rollo5 wrote:
Hello seaside,

If i have time I would make the sorting feature (sorting by size and date). Do you have an I idea how I could make this?

regards, rollo


rollo,

Nice enhancement.

Rox has some nice built-in SOAP RPC facilities for invoking sort functions as described in the Rox manual.

http://rox.sourceforge.net/Manual/Manual/Manual.html#soap

For example to sort by date -
Code:
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <OpenDir>
   <Filename>/mnt/sdb6</Filename>
   <Sort>Date</Sort>
  </OpenDir>
 </env:Body>
</env:Envelope>
EOF


Cheers,
s
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0942s ][ Queries: 13 (0.0142s) ][ GZIP on ]