Welcome Guest.   Make a donation to an author on the site December 21, 2014, 10:36:14 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Table Data Search Plugin for FARR - closed  (Read 24299 times)
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« on: July 23, 2008, 05:04:05 AM »

This topic has been discontinued.
See:
http://www.donationcoder....m/index.php?topic=17153.0


* tds.png (12.83 KB, 418x345 - viewed 1364 times.)
« Last Edit: February 23, 2009, 09:51:41 AM by czb » Logged

My open-source online piano game: http://musicope.com/
mouser
First Author
Administrator
*****
Posts: 33,792



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: July 23, 2008, 05:23:12 AM »

Amazing.  This is an incredibly cool demonstration of what can be done with the html view, the fscript sdk, and a very clever coder.

I can see this being very useful for people who have work-related table data that they need to search frequently.. But if anyone creates any data files of general use I hope they will share them.
Logged
TucknDar
Charter Member
***
Posts: 1,094


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: July 23, 2008, 06:09:06 AM »

excellent!

This will be great for looking up where I've stored my DVDs!

(I store these in numbered boxes all over my apartment and use Movie Collector to catalogue them. Currently 19 boxes, each containing about 15 DVDs, and some DVDs are stored in shelves as well... With this new plugin I can export a csv of my movies that includes title and box number and instantly know where to look without launching Movie collector.)

edit: The above works perfectly!
« Last Edit: July 23, 2008, 06:39:49 AM by TucknDar » Logged
TucknDar
Charter Member
***
Posts: 1,094


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: July 23, 2008, 06:24:33 AM »

As an expansion of the above Movie Collector stuff I can now see using FARR to pick what movie to watch as well, based on genre or director or whatever

'tds horror' / 'tds fulci'



Thanks a lot, czechboy!

edit: added screenshot
« Last Edit: July 23, 2008, 06:39:36 AM by TucknDar » Logged
CatamountJack
Supporting Member
**
Posts: 56


View Profile Give some DonationCredits to this forum member
« Reply #4 on: July 23, 2008, 02:18:25 PM »

I'm really really excited at the potential with this plugin cheesy, but I seem to be having some issues...

The first time I type in "tds" in FARR, it works pretty much as expected (in that it comes up and does its filtering thing).  The second time I bring up FARR and type "tds", it brings up matches to "tds" instead of firing the plugin.  At this point my processor pegs at 100% (or at least one core is) and I'm unable to close FARR until I kill the process.

I'm also periodically getting a popup-bubble in my system try that says "1 File not found".  In my \Program Files\FindAndRunRobot\Plugins\pluginlog.txt I see numerous entries to the effect of:

03:05 PM, Wednesday, July 23, 2008
Table_Data_Search\FScript.dll
1 File not found


I checked and FScript.dll is located in the \Plugins\Table_Data_Search\ directory.   Edit:  This seems to happen only after I modify the "File Settings" and click the "submit" button.

Also, in the "Configure Advanced Plugin Options" screen for this plugin, I only get two buttons - Cancel and OK.  I'm not as worried about that - but wasn't sure if that was by design or if it means something is screwy with my install.

I removed and re-installed the plugin, but to no avail.

Thanks!
« Last Edit: July 23, 2008, 02:25:52 PM by CatamountJack » Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: July 23, 2008, 02:38:30 PM »

CatamountJack:
Hi and thanks for your message. Every testing and bug finding is welcome Wink
Quote
The first time I type in "tds" in FARR, it works pretty much as expected (in that it comes up and does its filtering thing).  The second time I bring up FARR and type "tds", it brings up matches to "tds" instead of firing the plugin.  At this point my processor pegs at 100% (or at least one core is) and I'm unable to close FARR until I kill the process.
I really do not know why this happens. Maybe Mouser would know...

Quote
I'm also periodically getting a popup-bubble in my system try that says "1 File not found".  In my \Program Files\FindAndRunRobot\Plugins\pluginlog.txt I see numerous entries to the effect of:

03:05 PM, Wednesday, July 23, 2008
Table_Data_Search\FScript.dll
1 File not found

I checked and FScript.dll is located in the \Plugins\Table_Data_Search\ directory.   Edit:  This seems to happen only after I modify the "File Settings" and click the "submit" button.

Are the file settings being saved even with that error message?
Logged

My open-source online piano game: http://musicope.com/
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: July 23, 2008, 02:45:18 PM »

Also if you could open fscript.js and replace error("1 "+err.description); with error("1 "+err.description+" "+file); then reload plugins and paste here what error you get. thanks  Thmbsup
Logged

My open-source online piano game: http://musicope.com/
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: July 23, 2008, 02:47:38 PM »

also make sure you have the latest FARR version Wink
Logged

My open-source online piano game: http://musicope.com/
CatamountJack
Supporting Member
**
Posts: 56


View Profile Give some DonationCredits to this forum member
« Reply #8 on: July 23, 2008, 03:30:29 PM »

I'm running FARR 2.24.01.  When I changed the line in fscript.js, it was referencing the name of a file that no longer existed in that folder (I had since changed the name to not include spaces, trying to see if that made any difference in the other issues).  I deleted the settings.josn in \MyLocalData\Table_Data_Search\ and that seemed to fix that problem as long as I don't change the file name.  Interestingly, the settings were still being saved.

The program lock-up on the second use of "tds" still occurs, even so.

On another note...  I'm using this plugin to look up names and addresses in a CSV file.  When I search for something, though, all of the data for that particular line appears in the first cell.  I have the columns set up in File Settings to match the data.  There is no header row in the CSV file.  The original CSV file also had quotation marks around some of the data, so I manually removed them all, but it made no difference.



My column titles are entered as:

Type,Tech Number,First Name,Last Name,Nickname,Address 1, Address 2,City,State,Zip,Home Phone,Cell Phone,Office Phone,Fax Number,Beeper,E-mail Address,Hire Date

Perhaps I've set up something wrong?
« Last Edit: July 23, 2008, 03:33:01 PM by CatamountJack » Logged
mouser
First Author
Administrator
*****
Posts: 33,792



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: July 23, 2008, 03:34:40 PM »

i think the trick is that you have to configure the regex expression for this file to be like
(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*)

in other words, one capture group for each column, separated by commas -- i think that is the regular expression pattern for a csv.

it might be nice if the plugin would let you tell it that the data is CSV then it wouldnt need a regex pattern from you and could handle quoted items -- which would otherwise be impossible or hard just using regex.
Logged
CatamountJack
Supporting Member
**
Posts: 56


View Profile Give some DonationCredits to this forum member
« Reply #10 on: July 23, 2008, 04:01:07 PM »

I'm not sure if this is supposed to even be able to work, but instead of a CSV file I saved the data as a HTML document (via OpenOffice).  Now when I search for "doe" (see screenshot in my last post), I get one line as expected, but the "Type" column is blank and "Doe" shows up under the "Tech Number" column.  The rest of the row is not filled in (e.g. just white, no column separators).

Not sure if this is helpful or not...  just more observations.

Unrelated:  My, how painful it is when FARR crashes and I can't use it to re-open... FARR!  I'm lost!  Mouse?  Start Menu?  I've forgotten how to use them!  Grin
Logged
mouser
First Author
Administrator
*****
Posts: 33,792



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: July 23, 2008, 04:06:08 PM »

Clearly i need to make a new program: FarrStarter

It's only purpose will be to pop up out of the tray when it detects FARR has died, and offer to restart it.

Logged
herojoker
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #12 on: July 23, 2008, 04:45:20 PM »

Hehe, more than one time I caught myself trying to reopen FARR by pressing CTRL+Space (that's my "bring FARR up" combination) with the aim to enter "robot"... d'oh!
Logged
CatamountJack
Supporting Member
**
Posts: 56


View Profile Give some DonationCredits to this forum member
« Reply #13 on: July 23, 2008, 04:49:38 PM »

@mouser:  YES!!!

I didn't immediately catch that I could specify the regex myself.  I just tried it and the one you suggested did work on the CSV file (with one less (.*))...  I've been trying to develop something shorter that would work on a CSV of any number of columns, but I'm not nearly that clever with regex's yet.

Any thoughts on what is causing the crash?
Logged
mouser
First Author
Administrator
*****
Posts: 33,792



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: July 23, 2008, 04:55:08 PM »

Quote
I've been trying to develop something shorter that would work on a CSV of any number of columns

for the reason i said before (commas in quotes), we would be much better off petitioning czb to add an option for auto parsing csv files.
Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: July 24, 2008, 02:20:08 AM »

Quote
I'm running FARR 2.24.01.  When I changed the line in fscript.js, it was referencing the name of a file that no longer existed in that folder (I had since changed the name to not include spaces, trying to see if that made any difference in the other issues).  I deleted the settings.josn in \MyLocalData\Table_Data_Search\ and that seemed to fix that problem as long as I don't change the file name.  Interestingly, the settings were still being saved.

The program lock-up on the second use of "tds" still occurs, even so.
Ok I know about that catch.. I was just too lasy to deal with it smiley But when I see it might be quite a problem I will try to fix it. Wink

Quote
it might be nice if the plugin would let you tell it that the data is CSV then it wouldnt need a regex pattern from you and could handle quoted items -- which would otherwise be impossible or hard just using regex.
I will try to Wink
Logged

My open-source online piano game: http://musicope.com/
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: July 24, 2008, 04:08:26 AM »

new version => see first post
Logged

My open-source online piano game: http://musicope.com/
CatamountJack
Supporting Member
**
Posts: 56


View Profile Give some DonationCredits to this forum member
« Reply #17 on: July 24, 2008, 07:16:57 AM »

Oh, that makes my life a LOT easier!  cheesy

My only issue now (aside from only being able to use it once), is that it skips any fields that have no data as if they didn't exist.... so some of my data gets moved to the left and ends up in the wrong column.

A,B,C,,D,,,E,F   shows up in the table as   |A|B|C|D|E|F|    |  instead of   |A|B|C| |D| | |E|F|

But otherwise, it's awesome, thanks!
Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: July 24, 2008, 07:33:23 AM »

I do not know csv much. I have found csv regexp. But according to http://en.wikipedia.org/w...ki/Comma-separated_values if you want to have empty cell you have to have it quoted.
see
Quote
1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",4799.00
Logged

My open-source online piano game: http://musicope.com/
mouser
First Author
Administrator
*****
Posts: 33,792



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: July 24, 2008, 07:34:57 AM »

i dont think you should have to quote blanks if it can be helped.
Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: July 24, 2008, 07:43:13 AM »

I use
var r = new RegExp(",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
return line.split(r);
But I do not understand that much smiley if anyone could correct that Wink
Logged

My open-source online piano game: http://musicope.com/
TucknDar
Charter Member
***
Posts: 1,094


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: July 24, 2008, 03:26:59 PM »

This latest version doesn't seem to remember the last selected data file.

Also, it would be nice to be able to specify data file in search, i.e. 'tds +moviecollector fulci' or 'tds +musiccollector sonic youth'. From this I could make new aliases to quickly search specific things from any data file
Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #22 on: July 24, 2008, 03:42:14 PM »

This latest version doesn't seem to remember the last selected data file.

Also, it would be nice to be able to specify data file in search, i.e. 'tds +moviecollector fulci' or 'tds +musiccollector sonic youth'. From this I could make new aliases to quickly search specific things from any data file
You are right. It does not remember. I will take a look at it tomorrow
Quote
You can type "tds +1 test" to search on certain tab directly July 24, 2008
Is not this enough?
Logged

My open-source online piano game: http://musicope.com/
TucknDar
Charter Member
***
Posts: 1,094


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: July 24, 2008, 03:51:12 PM »

From what I see, that searches the currently selected file for data within one of the tabs. Or am I misunderstanding?

I would like to specify which file, i.e. 'tds +csv 1' or 'tds +EN-IT hello'
Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #24 on: July 25, 2008, 04:40:01 AM »

Hi, I think I have corrected that bug with last selected tab.

Quote
I would like to specify which file, i.e. 'tds +csv 1' or 'tds +EN-IT hello'

It would take some time to code it and I will be away for more than week. So I have just fastly coded an option to do:
Quote
pcommand tds_file csv
where csv is name of the file (with extension if any). Unfortunately I can not make
Quote
pcommand tds_file csv ;;; dosearch tds 1
work.
Logged

My open-source online piano game: http://musicope.com/
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.051s | Server load: 0.11 ]