topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 9:58 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Table Data Search Plugin for FARR - closed  (Read 51108 times)

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
Table Data Search Plugin for FARR - closed
« on: July 23, 2008, 05:04 AM »
This topic has been discontinued.
See:
https://www.donation...ex.php?topic=17153.0
My open-source online piano game: https://github.com/musicope/game
« Last Edit: February 23, 2009, 09:51 AM by czb »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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.

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
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 AM by TucknDar »

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
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'

tabledata_MOC.pngTable Data Search Plugin for FARR - closed

Thanks a lot, czechboy!

edit: added screenshot
« Last Edit: July 23, 2008, 06:39 AM by TucknDar »

CatamountJack

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 56
    • View Profile
    • Donate to Member
I'm really really excited at the potential with this plugin :D, 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 PM by CatamountJack »

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
CatamountJack:
Hi and thanks for your message. Every testing and bug finding is welcome ;)
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...

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?
My open-source online piano game: https://github.com/musicope/game

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
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:
My open-source online piano game: https://github.com/musicope/game

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
also make sure you have the latest FARR version ;)
My open-source online piano game: https://github.com/musicope/game

CatamountJack

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 56
    • View Profile
    • Donate to Member
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.

FARR_TDS.jpg

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 PM by CatamountJack »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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.

CatamountJack

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 56
    • View Profile
    • Donate to Member
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!  ;D

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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.


herojoker

  • Participant
  • Joined in 2008
  • *
  • Posts: 124
    • View Profile
    • Donate to Member
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!

CatamountJack

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 56
    • View Profile
    • Donate to Member
@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?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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.

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
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 :) But when I see it might be quite a problem I will try to fix it. ;)

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 ;)
My open-source online piano game: https://github.com/musicope/game

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
new version => see first post
My open-source online piano game: https://github.com/musicope/game

CatamountJack

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 56
    • View Profile
    • Donate to Member
Oh, that makes my life a LOT easier!  :D

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!

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
I do not know csv much. I have found csv regexp. But according to http://en.wikipedia....mma-separated_values if you want to have empty cell you have to have it quoted.
see
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
My open-source online piano game: https://github.com/musicope/game

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
i dont think you should have to quote blanks if it can be helped.

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
I use
var r = new RegExp(",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
return line.split(r);
But I do not understand that much :) if anyone could correct that ;)
My open-source online piano game: https://github.com/musicope/game

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
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

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
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
You can type "tds +1 test" to search on certain tab directly July 24, 2008
Is not this enough?
My open-source online piano game: https://github.com/musicope/game

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
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'

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
Hi, I think I have corrected that bug with last selected tab.

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:
pcommand tds_file csv
where csv is name of the file (with extension if any). Unfortunately I can not make
pcommand tds_file csv ;;; dosearch tds 1
work.
My open-source online piano game: https://github.com/musicope/game