CSV files - at last!!

Tips and questions about scripting your Verbot®.

Moderator: Staff

Postby JonC » Fri May 14, 2010 4:29 pm

Regarding "SwapWords":

JonC wrote:(friday Dec.04 2009):
The vcm code has ended up under "reference kbs" not generic tools. :x
Please don't ask my why - no idea - guess I filled something in wrong or managed to scroll it to the wrong place or ...

You get the idea. :roll:


Now I'm really confused: I went to look for this code (on the grounds that I must have put it somewhere on the forum) - and it is back in "generic tools".
Main point is I have made it available.
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby MikeA » Wed May 19, 2010 10:45 pm

For the time being, I working on the CSV standalone style, and will, until a better method exists, rely on uploading the csv file to webspace accessible to Verbot.

Hopefully Matt / Aaron will have a chance to respond re. whether it's possible to allow other types of files to Verbot Online.
MikeA
MightyBot
MightyBot
 
Posts: 318
Joined: Sun Mar 22, 2009 1:35 pm

Postby JonC » Thu May 20, 2010 11:55 am

With you on that one Mike, Matt/Aaron do (IMHO) need to respond to this problem.
I say this since not being able to use csv files with the online bot is a major limitation.
Clearly you and (I think) Sylvain would like this facility.
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby Matt » Thu May 27, 2010 9:03 pm

Unfortunately the only way to make the csv expansion work with verbots online right now (because of the .ckb file format limitation) is by attaching it statically or referencing the file from another location like your own free web hosting service.

I'm sorry for the inconvenience,
-Matt
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

Postby JonC » Sat May 29, 2010 1:25 pm

Thanks for that Matt.
I think that Mike and I had mostly worked that out (the hard way :lol: ) for ourselves. At least we know that for sure that non-.ckb files have to be accessed via other resource.
Over to you Mike ...
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby MikeA » Sat May 29, 2010 1:44 pm

Well, yes, good to know. I've been going pretty much full-force with the original method anyway, so looks like hosting it separately is the way to go. Hosting is no problem as I have my own space, and sell portions of it to clients for websites.

I guess by 'attaching it statically' Matt meant the Verbot 'Expand' function we were talking about before?
MikeA
MightyBot
MightyBot
 
Posts: 318
Joined: Sun Mar 22, 2009 1:35 pm

Postby JonC » Tue Jun 01, 2010 7:06 pm

Yup, that's how I interpreted that remark as well.
Frankly, can't see what else would be possible, given .ckb limitation.
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby MikeA » Tue Jun 01, 2010 7:13 pm

I will hopefully put my attempts online using a separately hosted csv file.

I will thought, experiment to 2 further options. I'm going to try a non-csv version, using rules, child rules instead of csv.

The other method that I just thought about, and will be easy to test, is the csv data in string form as a rule output. In other words, having a Data rule, with input such as 'accessdata' and then the string (converted from a csv file) as the output.

I've just thought of this so might have big holes. If it potentially worked, it would mean being able to keep a csv file, and just copying it in string form into the output. This output string would be put into the vars variable when Verbots starts, just like the CSV file. Tell me if I've missed something significant here.
MikeA
MightyBot
MightyBot
 
Posts: 318
Joined: Sun Mar 22, 2009 1:35 pm

Postby JonC » Thu Jun 03, 2010 6:42 pm

that might well work Mike.
There is a [_lastoutput] command which means that there is no real reason why you shouldn't be able to set a vars-variable to [_lastoutput]; which would have the effect of "opening" the csv-data.
I would suggest that you try that in a _Startup rule though and just set it up once.
The downside is that it is still a "static" method, since I can't think of a way you could re-write the data in the ouput - it might be possible by playing around with the "learning" rules (which can also forget!).
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby MikeA » Thu Jun 03, 2010 9:17 pm

Yes, you're right about lastoutput. Of course, one problem is that to use that Verbot needs to output..... Not sure if there is a way for Verbot to output but the output be surpressed (so user doesn't see it).

Still, it works fine simply copying the CSV file as a string into a vars variable. In fact, it's pretty much the same thing, as the only difference is that it's added manually rather than at the point of startup.

I think updating that info is not a problem, shouldn't be more difficult that with the CSV. But the big downside is that it means the CSV is not used directly (which is clearly the easier method).

I'm experimenting with rules as data as well, but 15 mins in and encountered a few probs.
MikeA
MightyBot
MightyBot
 
Posts: 318
Joined: Sun Mar 22, 2009 1:35 pm

Postby JonC » Fri Jun 04, 2010 3:45 pm

I was thinking along the lines of the <printonly ...> command Mike. You would see it, but if the Verbot then <sends> to another rule, the "csv print" should disappear pronto.
To me, it is more important that the Verbot doesn't say it.
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby MikeA » Mon Jun 07, 2010 10:17 pm

Will try that. Never used it.

I still haven't got around to actually trying any of these ideas online though.
MikeA
MightyBot
MightyBot
 
Posts: 318
Joined: Sun Mar 22, 2009 1:35 pm

Postby JonC » Tue Jun 08, 2010 2:43 pm

Good luck with the online Verbot, Mike!
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

Postby MikeA » Tue Jun 08, 2010 10:11 pm

Once done, I will put a link. Not just for the CSV thing but also because it will be an experimental bot.

I have been round full circle with CSV ........ and it looks likely I'll end up doing it the way you originally suggested! :)

I will try to post some updated csv routines also. I just need to change them as currently they will only work with my setup and csv files, so would like to make more usable versions.

Just need more time!
MikeA
MightyBot
MightyBot
 
Posts: 318
Joined: Sun Mar 22, 2009 1:35 pm

Postby JonC » Wed Jun 09, 2010 8:00 am

Mike said: "I have been round full circle with CSV ........ and it looks likely I'll end up doing it the way you originally suggested!"
Now, if only I could remember what that was ... :lol:

But seriously folks... thanks Mike, will look forward to new function being posted.
JonC
SupremeBot
SupremeBot
 
Posts: 665
Joined: Wed Apr 02, 2008 6:34 am
Location: Leicestershire, Great Britain

PreviousNext

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron