WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Can I search Apps panel with provides to give me exact hits?  (Read 18669 times)

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #15 on: April 03, 2013, 07:34:51 PM »
no worries, have got it now, first looks

Code: [Select]
tc@box:~$ appsearch

A default configuration file has been created. Open
/home/tc/.config/appsearch/appsearch.conf to change
directory paths and filenames. Leave the CurrentDbase=
field blank, appsearch will fill that in. Copy your .db
files to DbaseDir. When you restart appsearch, select
the Database->Import function. Imported files will be
saved with the extension .nsv and can then be loaded.

The default config (until I break it is)

Quote
# All database files are in this directory
DbaseDir=/home/tc/.config/appsearch/

# Most recent database searched
CurrentDbase=

# Default to case sensitive searches when program starts (Y or N)
CaseSensitive=N

# File name results are written to, gets overwritten with each search
ResultsFileName=appsearch.txt

# Directory to save ResultsFileName in
ResultsFileDir=/home/tc/.config/appsearch/

# File name to copy ResultsFileName to for future reference
LogFileName=appsearch.log

# Directory to save LogFileName in
LogFileDir=/home/tc/.config/appsearch/

start appsearch shows

Code: [Select]
Menu
/ - Edit include in search ................e - Edit exclude from search                                                                               
r - Search records ........................f - Search fields                                                                                           
c - Case insensitive search                                                                                                                         
v - View results ..........................l - View log file                                                                                           
a - Append results to log file ............o - Overwrite log file with results                                                                       
s - Shell out to command line                                                                                                                       
q - Quit ..................................d - Database menu (? Display current)

------ status box below says

No or invalid default database listed.                                                                                                               
Use the Database menu to select one.                                                                                                                 
Ready                                                                       

Not able to show it correctly due to some format issues. I won't snapshot it at this stage.

I then moved my depends.nsv file and my old tmp.db to under /home/tc/.config/appsearch

in appsearch I then ran -d and chose l to get response
Loaded: "/home/tc/.config/appsearch/depends.nsv"

did a search.......for cups.h*.....could not see anything so went back to database and chose to import my db with response

Read: "/home/tc/.config/appsearch/tmp.db"                                                                                                            │
Wrote: "/home/tc/.config/appsearch/tmp.nsv"

redo search term cups.h*
nope nothing found,

any clues where I am going wrong please?
« Last Edit: April 03, 2013, 07:53:32 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #16 on: April 03, 2013, 07:47:27 PM »
Hi aus9
If you decide to keep the defaults, copy the depends.nsv and a copy of provides.db to (DbaseDir):
Code: [Select]
/home/tc/.config/appsearch/Make sure you import the provides.db file (Database menu->Import) and it will be saved as a .nsv file. Use the
Load command to load a database.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #17 on: April 03, 2013, 07:55:21 PM »
sorry I have editted it after your reply, can you review it please

Code: [Select]
Ready                                                                                                                                               
Searching ...                                                                                                                                       
# In database: /home/tc/.config/appsearch/depends.nsv                                                                                               
# Fields including "cups.h*", excluding "", 0 results                                                                                               
Elapsed time=0.000 Seconds
« Last Edit: April 03, 2013, 07:58:12 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #18 on: April 03, 2013, 07:59:10 PM »
Hi aus9
Importing a database does not load it, it just reads and reformats the file and saves it. Use the load function
to select a different database.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #19 on: April 03, 2013, 08:04:54 PM »
well I did not know what the nsv was so did it out of order eh?

loading my tmp db file and research now ok

Code: [Select]
Searching ...                                                                                                                                       
# In database: /home/tc/.config/appsearch/tmp.nsv                                                                                                   
# Fields including "cups.h*", excluding "", 1 results                                                                                               
Elapsed time=0.010 Seconds

I just noticed my last search was searching depends.nsv and not tmp.nsv

silly me

question

Was it necessary to send me the depends.nsv?

Would that not relate to a generation from me importing my old db?
« Last Edit: April 03, 2013, 08:08:07 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #20 on: April 03, 2013, 08:13:22 PM »
Hi aus9
Now you got it. That status box is there to let you know what's going on. By the way, while the program will not
auto size, if you stretch the terminal to a larger size before starting the program, it will fill the terminal.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #21 on: April 15, 2013, 02:30:50 AM »
Rich

when you have time, does appsearch allow you to search for an input field of  something.tcz to give you a list of TCZs that depend on your search term?

thanks for reading

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #22 on: April 15, 2013, 09:47:37 AM »
Hi aus9
Are you looking to do a reverse dependency search? If so, then load the depends.nsv database. If, for example,
you enter python.tcz as the search term and then  Search fields  you will get a list of the 343 extensions that
depend on python.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #23 on: April 15, 2013, 04:45:55 PM »
Excellent

one minor issue is the word Q in the load database panel



When you do your next build, could you consider changing that word Q for quit to
R for Return to search panel?

pressing Q does not quit at the load database panel but takes you back to the search panel.


thanks again

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #24 on: April 15, 2013, 06:33:24 PM »
Hi aus9
Quote
When you do your next build, could you consider changing that word Q for quit to
R for Return to search panel?
Done. In a similar vane, I also changed:
Code: [Select]
Enter accepts the highlighted filename, q to quitto:
Code: [Select]
Enter accepts the highlighted filename, c to cancelon the file select page that comes up when you select  load  or import, or would you prefer:
Code: [Select]
Enter accepts the highlighted filename, r to returnthere too?
Pressing enter on the load page now takes you back to the search page.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #25 on: April 16, 2013, 12:31:34 AM »
excellento!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #26 on: April 16, 2013, 12:43:11 AM »
Hi aus9
OK, I'll send you the current version. Drops right in, no config changes needed.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #27 on: April 16, 2013, 06:47:23 AM »
cool

In database panel,  pressing l (L) and selecting other db file immediately takes you back to search panel. Cool Cool. Thats too cool.



In the fullness of time, maybe you might like to re-visit the database file names. To make them idiot proof.

depends.nsv might relate to dependencies and by deduction the other file must the main file.
---but my appsearch has that as = tmp.nsv

Could that filename change?  To what,  I don't know......maybe tcz-search.db

Speaking of database names, the raw database has a name of provides.db which I assume matches the apps panel.....search provides pulldown.

But OFFTOPIC,  I know, how often does that db get updated?
http://www.tinycorelinux.net/4.x/x86/

My web browser suggests a date in Nov 2012.

thanks for reading



Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #28 on: April 16, 2013, 07:38:28 AM »
Hi aus9
That tmp.nsv filename was only a limitation in the first version of the program. Now when you import FILENAME.db
it saves it as FILENAME.nsv. You should delete the tmp.db and tmp.nsv files. Download a copy of provides.db and
import that. The last 8 lines of the tmp version got clipped due to a bug that's since been fixed.
Quote
... how often does that db get updated?
I don't know. I noticed that November date too.

aus9

  • Guest
Re: [SOLVED] Can I search Apps panel with provides to give me exact hits?
« Reply #29 on: April 16, 2013, 08:00:51 AM »
can't do much tonite, but just imported word.db

that looks like = tags.db

Not sure if you are interested but just playing around with that db, search cups*
Code: [Select]
# Fields including "cups*", excluding "", 1 results
cups
cups-dev.tcz
cups-pdf.tcz
cups-queue.tcz
cups-smb.tcz
cups.tcz
epdfview-cups.tcz
foomatic-rip.tcz
gutenprint.tcz
libcups.tcz
libgnomecups-dev.tcz
libgnomecups-locale.tcz
libgnomecups.tcz
pycups-2.7.tcz
star-cups-driver.tcz

If its a tag, one tag found but maybe the result shows more lines .....what do you think?

############

redo reverse look up for files that depend on search term

Code: [Select]
# Fields including "cups*", excluding "", 2 results
cups-dev.tcz
libgs-dev.tcz
cups.tcz
abiword-2.8-dev.tcz
abiword-2.8.tcz
abiword-docs-2.8.tcz
abiword-plugins.tcz
abiword.tcz
cups-dev.tcz
cups-pdf.tcz
hplip-2.7.tcz
hplip_sane-2.7.tcz
libgnomecups-dev.tcz
libgnomeprint-dev.tcz
libgnomeprint-locale.tcz
libgnomeprint.tcz
libgnomeprintui-dev.tcz
libgnomeprintui-locale.tcz
libgnomeprintui.tcz
libgs-dev.tcz
pycups-2.7.tcz

hmmm
« Last Edit: April 16, 2013, 08:07:18 AM by aus9 »