Log in

No account? Create an account
Previous Entry Share Next Entry
jQuote available for the intrepid
Okay, it's just a start, but for those who want to play with it, I've slapped the current state of jQuote up on the web, at http://jducoeur.org/jQuote/.

There are three files there; from your browser, download those with the "Save Target As..." function of your preferred browser. Note that the server seems to be over-analyzing things, and the names may be getting changed in flight -- I found that "jQuote.chm" downloaded as "jQuote.htm", and "quotes.quo" as "quotes.xml". If that happens, just change the names to the way they show up on the webpage. (CHM kind of a version of HTM, and QUO is an XML format, but the program expects the right extensions.)

Put all three files into the same directory, and run the .exe -- it *should* just work. It's only for Windows, though, and expects that .NET is already installed. (True for any modern Windows, but possibly not for really old installations of XP.) Note that it's designed to be a background utility, so the close box actually minimizes it to the task tray. You have to explicitly exit the program in order to shut it down.

The "quotes.quo" file there is a sample quotefile, made up of quotes that are either ancient or which I got permission to redistribute. (I'm unusual in actually *caring* about such permission, and one of the unusual features of jQuote is that it natively lets you track permissions.) It's not huge (80-odd quotes), and I encourage you to build your own, but it should provide you with an example of how things work, and let the techies see what the format looks like.

Obviously, this is a bare alpha, and there's no warranty on any of it. There are undoubtedly bugs, and hard-to-document edge cases. (For example, ctrl-shift-q will insert a random quote into some programs but not others, depending on how those programs are implemented.) I have many ideas about what the next generation system might look like. But I find it useful as it is, and other quote geeks might as well. Feel free to ask questions...

Random Quote du Jour:

"God does not play dice with the universe; he plays roulette."
-- Joe English

  • 1
Which version of .NET? I've found that there are certain things that require 1.1, and later versions won't supply the needed libraries.

Good question. I believe it was compiled against 3.5. That almost certainly means that it requires 2.0 (which was a CLR rewrite), although there likely aren't any dependencies beyond that...

*looks at her linux workstation*
*looks at her linux laptop*
*looks at her Mac laptop*

Well, rats. :} This would be the third program I might want to run Windows for... (The other two being Diablo III and URU...)

I'm planning to make a Linux version, prob in Python, that uses the same file format.

Yay! We have a standard!

(I can furnish the source code, if you'd like it for reference. Most of the stuff that isn't totally Windows-specific is probably a dead-simple port to other OO languages...)

Yes, please—the file format seems clear enough, but there might be limitations I don't notice.

The tarball I just put up includes an XML Schema definition of what I think the file format is.

Oo, yay. Thank you. I've never been so fond of 'fortune'.

*looks at her Mac laptop as well*

What she said, only without the Diablo III part. (:

OK, I've got a reasonable command-line version, if you don't mind editing your quotes list in XML. There are two commands, one that prints out a random quote and one that stuffs a random quote onto the clipboard (I've got that one bound to a button on the GNOME toolbar). The latter requires PyGTK; the rest of it should work with any Python 2.5 or later (or probably 2.4). The clipboard used is the one shared by GNOME and KDE; I haven't tried KDE yet, but it should work. (It also works on Maemo. :-)

Forgot to mention: the command-line version should work on MacOS, but not the clipboard integration (since it works through GTK). The command-line version should work on Windows, and the clipboard might work, too, if GTK for Windows does the clipboard correctly. I'm not going to try it out, though.

So I just downloaded it, and tried to run it. I get a suitable cryptic windows error:

"The application failed to initialize properly (0xc0000135). Click on OK to terminate the application."

Is this something you've seen? Is it indicative of something inobvious unless you've seen it before, like maybe being missing a library, or something of that sort? I'm running XP Pro, SP 2.

I understand you're not really supporting this, but I figured it might be something you'd seen and could answer quickly. If not, don't worry about it.

Dunno, I'm afraid. Most obvious cause would be a .NET mismatch, but that's just a guess -- do you have any idea which version you have?

(Conceivably it could be a virus-check issue that I haven't encountered yet or some such. The program does hook Windows for the keystroke detection: I could imagine a particularly eager malware-checker deciding this was dangerous, and squashing it, although I would *expect* it to say something if it did so.)

Hm. Works in Notepad, but not in Word 2000 or Firefox 3.5.7.

Hmm. I knew it wasn't working in current browsers, but I'm surprised that it doesn't in Word. Not sure there's much I can do about it -- I'm doing fairly serious magic just to make it work in the standard controls, and probably can't do much about the non-standard ones -- but I'll look into it and see if I can do better.

Note that the current workaround is to right-click on the icon in the tray and select "Copy random quote", and then Paste where you want it. Not quite as easy, but still *pretty* quick...

  • 1