topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 4:00 am
  • 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: new FARR Plugin : Delicious - built on the Javascript SDK : FScript  (Read 81459 times)

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Delicious plugin
The delicious plugin allow you to explore your bookmarks stored on the site del.icio.us.

Installation
Download the latest version at http://e.craft.free....icious/delicious.zip and decompress it to farr/plugins/delicious.
Important information : Configure your username and password in the advanced options of the plugin.
If this is the first time you try the plugin, type dpu so that the plugin download the list of posts or dtu to get the list of tags.
The plugin is based on the javascript SDK (FScript.dll ) which may require that you install the Windows Script Control Host which you can get at :
http://www.microsoft...1&DisplayLang=en

List of commands
dp : list delicious posts
dpu : list delicious posts and update local copy if necessary
dt : list delicious tags
dtu : list delicious tags and update local copy if necessary
dp and dt are a bit faster since they only work on the local copy of the posts or tags.

FScript : Javascript SDK
The principle of fscript.dll is the following :
Put the dll in a folder next to a file named fscript.js. FARR will call you on onSearchBegin and on onRegexSearchMatch. You can call FARR.emitResult to publish results.

The SDK has finally got a documentation packaged with a sample. You can get the last version at : http://e.craft.free....pt/FScriptSample.rar

I hope to see a lot of little baby script plugins.

Emmanuel
Blog & Projects : Blog | Qatapult | SwiffOut | FScript
« Last Edit: January 12, 2008, 04:25 PM by ecaradec »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
oh my gosh this is a wonderful post  :-* :-*  :Thmbsup: :Thmbsup: :Thmbsup:

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Am i misunderstanking this, or is this a javascript plugin SDK for farr?

If so... You're a genious, ecaradec :D

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Yes it's a javascript SDK for FARR. It is still a bit limited : only plugins that publish results can be written now. It should  be good enough for many uses.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Genius! Pure Genius!
dancing_banana.gif

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Wow! It's really fast, too. I wouldn't have thought that this kinda plugin (retrieve web stuff) could be that fast.

Excellent work, ecaradec :up:

vitalyb

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 143
    • View Profile
    • Donate to Member
 :up: That's great! I always wanted Delicious plugin!

And the SDK is even MORE cool.

rbeeger

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 72
    • View Profile
    • Donate to Member
Hi,

The delicious plugin only checks only the rss feed. So although with a small modification of the script (Just change deliciousurl at the top of it) it can be made to check the feed of a personal delicious account, it will never be able to search all delicious bookmarks of an account.
But anyways, this simple example shows what can be done with the SDK and it should be possible to create a better delicious plugin with it. Thanks to ecaradec for creating it.

Questions: If FScript is based on the Windows Script Control Host, would it be possible to create a version of it that would work with any scripting language that integrates with it (Ruby, Perl, Groovy etc.)?

Cheers,
  Robert

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
ecaradec, wow! btw enlighten me, does this mean i can run bookmarklets from Farr?

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
it will never be able to search all delicious bookmarks of an account
Yes you are right. Only the last links are in the rss feed. The del.icio.us plugin does not allow to search all the archived link. Del.icio.us has an export fonctionnality that I may be able to use, but it is html and I would have to parse it with regex and combine that with the last results from rss.
I really wanted to get fscript out. Del.icio.us plugin was really meant as a sample for it.

would it be possible to create a version of it that would work with any scripting language that integrates with it (Ruby, Perl, Groovy etc.)?
Yes I could, but I don't know if its a good idea since ruby, perl, etc... are not installed by default with Windows and plugins would require installing another language to run. But its easy to do.

ecaradec, wow! btw enlighten me, does this mean i can run bookmarklets from Farr?
I'm sorry but fscript its more a JScript SDK. Its a way to write plugins in Javascript. Possibilities are those of shell script. There may be a way to run bookmarklets from farr but it would require to write the plugin for that. FScript is an easier way to write plugins for FARR.

Manu
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

rbeeger

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 72
    • View Profile
    • Donate to Member
it will never be able to search all delicious bookmarks of an account
Yes you are right. Only the last links are in the rss feed. The del.icio.us plugin does not allow to search all the archived link. Del.icio.us has an export fonctionnality that I may be able to use, but it is html and I would have to parse it with regex and combine that with the last results from rss.
I really wanted to get fscript out. Del.icio.us plugin was really meant as a sample for it.
I didn't mean to criticize your del.icio.us plugin. I realized that it was only a simple example for your SDK, which is by itself a great thing. And I think that an advanced del.icio.us plugin could be written with JavaScript and FScript. So it's all more praise for FScript than criticism for the del.icio.us example.

BTW: I'd be interested in a real del.icio.us plugin written in JavaScript, C or what ever. So if there are any plugin developers out there looking for new challenges, this would be one ;)

would it be possible to create a version of it that would work with any scripting language that integrates with it (Ruby, Perl, Groovy etc.)?
Yes I could, but I don't know if its a good idea since ruby, perl, etc... are not installed by default with Windows and plugins would require installing another language to run. But its easy to do.
That's correct. Plugins would be created that would require additional software to be installed. But I don't think that's really a problem. As a user you could choose the language you like for developing plugins. So it would be possible for many more people to write specialized plugins. FARR would become really customizable. I think many  Ruby and Groovy people would try FARR if they could script it with their language of choice.
Developers who want their plugins used by as many users as possible would still choose one of the languages available on a default installation of Windows. Those other potential plugin writers will probably never write a plugin in C, C# or JavaScript.

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
New plugin to explore your Del.icio.us posts and updated JScript SDK
« Reply #11 on: December 28, 2007, 01:15 PM »
I made a new version of the del.icio.us plugin. It is based on the del.icio.us api and can explore all your posts now.  :D.

The plugin connect on your account to download the list of your posts so don't forget to set your login and password at the top of the script.

The plugin now use FARR filtering. I find this much more user friendly than using tags only for searching. Let me know. The syntax has a bit changed. It is now dlc word word word... The first check can be a bit slow (some seconds ) but the results are cached and filtering is fast after that. Tags are prefixed with ':' so if you really want to filter on some tag type :tag.

The FScript plugin has evolved too. I fixed some bugs and the whole should be more usable.

Download links removed : use link in the first message.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript
« Last Edit: January 01, 2008, 07:32 AM by ecaradec »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
WOW what a day for FARR plugins, this is wonderful  :-* :-* :-* :-* :-* :-* :-* :-*

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 560
    • View Profile
    • Donate to Member
wow this is great !  :-* :-*

BUT  :D

it does not work on my computer...
posts.xml stays empty (0 byte)
i must be missing something really obvious...

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Sometimes del.icio.us server refuse to answer to the request to get all posts to protect against abusive uses. Could you :
- try again
- check that your login and password are correct
- try to go to https://api.del.icio.us/v1/posts/all with your browser. It should return an xml document not an html message.

If nothing work try to add FARR.debug(xmlhttp.responseText) before xml.loadXML(xmlhttp.responseText); in doRequest function in fscript.js, type dlc to run the plugin and check the results. If you don't know : do ctrl-c on the dialog then ctrl-v to paste it in a message on the forum or as a private message.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

vitalyb

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 143
    • View Profile
    • Donate to Member
There is a problem with Delicious now, it seems: Sorry, Service Temporarily Unavailable.
However, great work! =)

Next it would be great if there was some kind of caching on the disk. Easiest way to implent would be just to save the file locally when the service is up and update it everytime in the background. Or something along those lines.

vitalyb

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 143
    • View Profile
    • Donate to Member
Oh, you already did it! :tellme:
That's great! How often does it update?

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 560
    • View Profile
    • Donate to Member
i tried again

i works now but i have frequent fatal errors

FARR crashes completely, here are some screenshots :

farr2.png

farr.png

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
That's great! How often does it update?
It pool the del.icio.us update api to know when there is a change. It should be up to date all the time. But I think there is some kind of bug in msxml2.httprequest and it sometime get the cache result instead of the current server answer.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
i tried again
i works now but i have frequent fatal errors
FARR crashes completely, here are some screenshots :
Ohh. I'm sorry. Something seem wrong with fscript. Results are pooled in a vector that is not ready. I will check that.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Ok I think the problem is fixed. It was caused by pending requests that completed after the current FARR query ended.
Download links removed : use link in the first message.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript
« Last Edit: January 01, 2008, 07:33 AM by ecaradec »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
i just have to say this is so damned cool that you have created a way to write FARR plugins in javascript.  Beautiful stuff.
works like a charm here.

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 560
    • View Profile
    • Donate to Member
wow it works now thanks !  ;D
love this plugin...

now my biggest wish is that someone makes a sdk for autohotkey !!

rbeeger

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 72
    • View Profile
    • Donate to Member
The delicious plugin is now really perfect, awesome etc. Thanks for making it.
It's a lot faster than using the Firefox "Delicious bookmarks" extension for looking up bookmarks.

One concern I have is that the password has to be inserted as unencrypted text.
It would be cool if the plugin could ask for a username and password at the first time of invocation and use the cookie provided by del.icio.us afterwards. Hmm, if it is impossible to open some input dialog from a FScript dialog, it could read in a file and delete it after acquiring the cookie.

rbeeger

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 72
    • View Profile
    • Donate to Member
Somehow the delicious plugin always opens a selected bookmark twice. When no Firefox is running, two Firefox windows are opened with the same URL. When there already is a Firefox instance running, two tabs are opened with the same URL.