From cathal.alexandria at gnostai.org Mon Sep 17 22:49:17 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Tue, 18 Sep 2007 03:49:17 +0100 Subject: [Alexandria-list] New experimental feature, userland CueCat support Message-ID: <1190083757.16037.14.camel@matilda> Well, it seems I've been working around Alexandria for a month now, and I finally have something to show for it (hopefully). My last few commits to Alexandria have added a first, rough user-interface which supports 'userland' CueCat barcode scanner use. The "Acquire from Scanner" dialog now accepts scans from an unmodified CueCat and allows users to add scanned Books to any Library. The user interface is still a little clunky, in particular there is no useful user-feedback when a scan is successful. However, this is currently useful new functionality. If you do not have a CueCat, there is currently a temporary developer shortcut: press the backtick key (`) when the barcode scanning area is highlighted and one of a handfull of test books will be 'scanned' in. Something I'm still missing is an RSpec test for the new functionality, but I think that might require a code reorganization at some later date. It should now be easier to install the SVN version of Alexandria with a new Rakefile. At Joseph Method's suggestion I had a look at 'hoe' by Ryan Davis ( http://rubyforge.org/projects/seattlerb/ ) but found it was not very well suited to installilng a Gnome-type application, and it was a bit tricky to make major modifications without touching the code for hoe itself. So I just re-implemented the useful bits locally as AlexandriaBuild: look in tasks.rb for how it all works. To install Alexandria should now be a matter of 'rake install'. You will require 'rubygems' and 'rake' as well as some standard GNU and Gnome tools ('gettext', 'scrollkeeper' and 'gconf2'). Please let me know, on the list, if it works or if it breaks. And PLEASE back up your .alexandria directory before running SVN Alexandria. Cheers, - Cathal. From cathal.alexandria at gnostai.org Tue Sep 18 16:21:38 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Tue, 18 Sep 2007 21:21:38 +0100 Subject: [Alexandria-list] New experimental feature, userland CueCat support In-Reply-To: <1190083757.16037.14.camel@matilda> References: <1190083757.16037.14.camel@matilda> Message-ID: <1190146898.8733.34.camel@matilda> On Tue, 2007-09-18 at 11:33 +0200, L.C. Karssen wrote: > Hi Cathal, > > I haven't tried your changes to Alxandria SVN yet, but I'm very > interested in the CueCat support. Can you tell me whether you've tested > with a USB of a PS/2 CueCat? Hi Lenart, A very good question. My CueCat is a USB model, running the revision 02 firmware (http://www.mailcom.com/BarcodeTest/ has details about the different capabilities of rev 01 and rev 02 firmware, but they both handle UPC, EAN and ISBN barcodes the same way). > IIRC the PS/2 CueCat sends an (Alt?) F10 keycode when scanning a > barcode, which maximises the current window. Did you work around that in > some way? Yes, quite right. My USB CueCat also sends Alt-F10 to start with, which by default in Gnome (and possibly other window managers) maximizes the current window. However, since the "Acquire from Scanner" dialog is non-maximizable, it has no effect, and I ignore any data before the first dot anyway. For anyone who doesn't know, when you plug in a CueCat (the USB one anyway) it acts just like another keyboard, and is seen automatically by any recent GNU/Linux distro. When I sucessfully scan a barcode (into a text editor, for example) the effect is exactly as if I had pressed Alt-F10 (which usually maximises the window) followed by typing, very rapidly .C3nZC3nZC3n2ChnWENz7DxnY.cGen.ENr7C3j3C3f1Dxj3Dq. or the like, followed by pressing Enter. (The PS/2 model requires some sort of keyboard pass-through as I understand.) Being from Ireland, we didn't get any free CueCats in the heyday of Digital Convergence. I bought mine for $12 from Electro Mavin ( http://www.mavin.com/ ) Bizarrely, I haven't yet added support for un-garbled barcode data. This is next on my list, as I believe every other barcode scanner on the market (as well as the modified CueCat) provides plain-text barcode data as if entered from a keyboard. Plus, it might be handy if some stubborn barcode won't scan in the middle of a scanning session. > Keep up the good work! > > Lennart Karssen. Thanks, - Cathal. P.S. You can use "Reply To All" to respond to messages while staying on-list (which I assume is what you wanted to do). I've done the same thing myself (just hitting "Reply") about a million times :^) From lennart at karssen.org Tue Sep 18 16:35:29 2007 From: lennart at karssen.org (L.C. Karssen) Date: Tue, 18 Sep 2007 22:35:29 +0200 Subject: [Alexandria-list] New experimental feature, userland CueCat support In-Reply-To: <1190146898.8733.34.camel@matilda> References: <1190083757.16037.14.camel@matilda> <1190146898.8733.34.camel@matilda> Message-ID: <1190147729.8161.6.camel@rubidium01> On Tue, 2007-09-18 at 21:21 +0100, Cathal Mc Ginley wrote: > On Tue, 2007-09-18 at 11:33 +0200, L.C. Karssen wrote: > > Hi Cathal, > > > > IIRC the PS/2 CueCat sends an (Alt?) F10 keycode when scanning a > > barcode, which maximises the current window. Did you work around that in > > some way? > > Yes, quite right. My USB CueCat also sends Alt-F10 to start with, which > by default in Gnome (and possibly other window managers) maximizes the > current window. However, since the "Acquire from Scanner" dialog is > non-maximizable, it has no effect, and I ignore any data before the > first dot anyway. Ah! That's a nice workaround, not making the window maximisable :-). > (The PS/2 model requires some sort of keyboard pass-through as I > understand.) The PS/2 has a pass-through connector, so you connect the CueCat to the PC and your keyboard to the CueCat. I tried to use it without a keyboard connected to it, but that doesn't seem to work, no characters are detected by the computer when scanning a barcode. > > Being from Ireland, we didn't get any free CueCats in the heyday of > Digital Convergence. I bought mine for $12 from Electro Mavin > ( http://www.mavin.com/ ) I was lucky enough to have a friend who moved to the States around that time. He sent me two Cats :-). > P.S. You can use "Reply To All" to respond to messages while staying > on-list (which I assume is what you wanted to do). I've done the same > thing myself (just hitting "Reply") about a million times :^) Indeed, I hit the wrong button (and kept wondering why my message didn't show up on the list). Hopefully I'll have some time this weekend to test your additions with my CueCat. Lennart. > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list -- ---------------------------------------------------- L.C. Karssen Utrecht The Netherlands lennart at karssen.org Stuur me aub geen Word of Powerpoint bestanden! Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html ---------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070918/39444616/attachment.bin From waldner at waldner.priv.at Tue Sep 18 17:34:18 2007 From: waldner at waldner.priv.at (Robert Waldner) Date: Tue, 18 Sep 2007 23:34:18 +0200 Subject: [Alexandria-list] New experimental feature, userland CueCat support In-Reply-To: Your message of "Tue, 18 Sep 2007 21:21:38 BST." <1190146898.8733.34.camel@matilda> References: <1190083757.16037.14.camel@matilda> <1190146898.8733.34.camel@matilda> Message-ID: <20070918213423.1519C43E1D@fsck.waldner.priv.at> On Tue, 18 Sep 2007 21:21:38 BST, Cathal Mc Ginley writes: >Bizarrely, I haven't yet added support for un-garbled barcode data. This >is next on my list, as I believe every other barcode scanner on the >market (as well as the modified CueCat) provides plain-text barcode data >as if entered from a keyboard. Well, the 3 different models I've tried behave in 3 slightly different ways (all 3 report as the same model, though, to make matter worse!): 3348542193888 3348542193888 3348542193888 usb 2-5: new low speed USB device using ohci_hcd and address 6 usb 2-5: configuration #1 chosen from 1 choice input: Weltrend Bar Code Reader as /class/input/input4 input: USB HID v1.10 Keyboard [Weltrend Bar Code Reader] on usb-0000:00:02.0-5 cheers, &rw -- -- life is like a rental car, you fuck it up, and give it back. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070918/b7f1534d/attachment.bin From bob.paddock at gmail.com Sat Sep 22 11:40:50 2007 From: bob.paddock at gmail.com (Bob Paddock) Date: Sat, 22 Sep 2007 11:40:50 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format Message-ID: <200709221140.50852.bob.paddock@gmail.com> I'm moving my Alexandria library to a new machine, when I start it up it crashes saying it does not understand the icon file format. This is running on a AMD64 Gentoo system. I'm not much of a Ruby guru at this point, anyone have any suggestions? /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in `initialize': Couldn't recognize the image file format for file '/home/bob/.alexandria/Library/1861007175.cover' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in `new' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in `cover' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:295:in `fill_iter_with_book' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:311:in `append_book' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:457:in `refresh_books' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:457:in `each' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:457:in `refresh_books' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:612:in `setup_sidepane' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:661:in `call' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:661:in `select_iter' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:661:in `restore_preferences' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/main_app.rb:87:in `initialize' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui.rb:41:in `new' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui.rb:41:in `main' from /usr/lib64/ruby/site_ruby/1.8/alexandria.rb:66:in `main' from /usr/bin/alexandria:10 -- http://www.wearablesmartsensors.com/ http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ From cathal.alexandria at gnostai.org Sat Sep 22 15:10:50 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sat, 22 Sep 2007 20:10:50 +0100 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <200709221140.50852.bob.paddock@gmail.com> References: <200709221140.50852.bob.paddock@gmail.com> Message-ID: <1190488250.9046.21.camel@matilda> Hi Bob, thanks for the bug report. On Sat, 2007-09-22 at 11:40 -0400, Bob Paddock wrote: > I'm moving my Alexandria library to a new machine, when I start > it up it crashes saying it does not understand the icon file format. > > This is running on a AMD64 Gentoo system. > I believe Marco Costantini reported some problems on 64-bit systems in June, so there /might/ be an issue with your version of Ruby-Gnome. I'm running a source-based distro myself (SourceMage), and my version of ruby-gdkpixbuf2 is 0.14.1 - (Hmmm! I've just had a look and that's quite out of date, but I guess is matches my Gnome installation of 2.14.2) However, looking at the problem... > I'm not much of a Ruby guru at this point, anyone have any suggestions? > > > /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in `initialize': > Couldn't recognize the image file format for > file '/home/bob/.alexandria/Library/1861007175.cover' > > > from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in `new' > from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in > `cover' ... the only way I can reproduce this bug is when the .cover file is not a valid image file; it gives a different message when the file is empty. In either case, I've added some exception handling to icons.rb so it reports the problem and returns the 'unknown book cover' icon (BOOK_ICON) rather than just crashing. (Alexandria seems to need a good deal more of this kind of exception handling, and probably some central logging of such problems too). Anyway, the latest SVN version of Alexandria should fix this problem; let me know if it doesn't. (Note: the SVN version still isn't bug-free, so please back up your .alexandria directory before using it). To further diagnose the problem check your file '1861007175.cover' really is a JPEG image (use 'file' and try to view it). If it is an uncorupted image file, then the root problem is with Gdk::Pixbuf (part of Ruby-Gnome). According to the documentation [1], "The file format is detected automatically", but perhaps the '.cover' extension is confusing your version, I don't know. Hope this helps, - Cathal. [1] http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gdk%3A%3APixbuf From bob.paddock at gmail.com Sat Sep 22 17:04:30 2007 From: bob.paddock at gmail.com (Bob Paddock) Date: Sat, 22 Sep 2007 17:04:30 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <1190488250.9046.21.camel@matilda> References: <200709221140.50852.bob.paddock@gmail.com> <1190488250.9046.21.camel@matilda> Message-ID: <200709221704.31009.bob.paddock@gmail.com> On Saturday 22 September 2007 03:10:50 pm Cathal Mc Ginley wrote: > Hi Bob, > thanks for the bug report. You are welcome. Glad to see work is still going on with Alexandria. Ruby is one of those languages on my "To Learn" list, along with C#, and ERLANG. > On Sat, 2007-09-22 at 11:40 -0400, Bob Paddock wrote: > > I'm moving my Alexandria library to a new machine, when I start > > it up it crashes saying it does not understand the icon file format. > > > > This is running on a AMD64 Gentoo system. > > I believe Marco Costantini reported some problems on 64-bit systems in > June, so there /might/ be an issue with your version of Ruby-Gnome. Possibly. Everything worked ok on the old system for several years after getting Alexandria installed. Seems the gentoo system still doesn't run "ruby setup.rb" when it installs ruby-gettext. > > I'm running a source-based distro myself (SourceMage), Cool. I've always liked Magick. > and my version of ruby-gdkpixbuf2 is 0.14.1 - That is what I had as well. > > from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in > > `new' from /usr/lib64/ruby/site_ruby/1.8/alexandria/ui/icons.rb:67:in > > `cover' > > ... the only way I can reproduce this bug is when the .cover file is not > a valid image file; > the latest SVN version of Alexandria should fix this problem; let me know >if it doesn't. I'll give it a try and let you know. > To further diagnose the problem check your file '1861007175.cover' > really is a JPEG image (use 'file' and try to view it). file 1861007175.cover 1861007175.cover: JPEG image data, JFIF standard 1.01 > If it is an uncorupted image file, They all load ok with Opera. > then the root problem is with Gdk::Pixbuf (part > of Ruby-Gnome). According to the documentation [1], "The file format is > detected automatically", but perhaps the '.cover' extension is confusing > your version, I don't know. Worked ok on old system is all I can say. > [1] http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gdk%3A%3APixbuf I upgraded from 0.14.1 to 0.16.0. [ebuild U ] dev-ruby/ruby-gdkpixbuf2-0.16.0 [0.14.1] -- http://www.wearablesmartsensors.com/ http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ From cathal.alexandria at gnostai.org Sat Sep 22 18:56:31 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sat, 22 Sep 2007 23:56:31 +0100 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <200709221704.31009.bob.paddock@gmail.com> References: <200709221140.50852.bob.paddock@gmail.com> <1190488250.9046.21.camel@matilda> <200709221704.31009.bob.paddock@gmail.com> Message-ID: <1190501791.9046.49.camel@matilda> Thanks for the update. Now, while my bugfix will stop Alexandria crashing when it fails to load the Gdk::Pixbuf, it doesn't explain where the root problem comes from. On Sat, 2007-09-22 at 17:04 -0400, Bob Paddock wrote: > file 1861007175.cover > 1861007175.cover: JPEG image data, JFIF standard 1.01 > > > If it is an uncorupted image file, > > They all load ok with Opera. > > [ebuild U ] dev-ruby/ruby-gdkpixbuf2-0.16.0 [0.14.1] I hacked together a minimal ruby-gtk2 app (based upon a program in ruby-gtk2/sample/misc -- making a minimal ruby-gtk2 app is not an easy job!). It should let you know if the call to Gdk::Pixbuf.new is causing a problem on your system, or if Alexandria is doing something wrong. Save this as image.rb, and run 'ruby image.rb 1861007175.cover' Ta, - Cathal. #!/usr/bin/env ruby =begin image.rb - Ruby/GTK sample script. Copyright (c) 2002,2003 Ruby-GNOME2 Project Team Copyright (c) 2007 Cathal Mc Ginley This program is licenced under the same licence as Ruby-GNOME2. $Id: image.rb,v 1.8 2005/07/14 17:01:49 mutoh Exp $ =end require 'gtk2' if ARGV.length < 1 puts "Usage: ruby image.rb " exit 1 end Gtk.init window = Gtk::Window.new("Image #{ARGV[0]}") window.signal_connect("destroy") { Gtk.main_quit} begin pixbuf = Gdk::Pixbuf.new(ARGV[0]) image = Gtk::Image.new(pixbuf) rescue Exception => e puts e.class puts e.message puts e.backtrace.join("\n\t") image = Gtk::Image.new(Gtk::Stock::DIALOG_ERROR, Gtk::IconSize::DIALOG) end vbox = Gtk::VBox.new(false, 10) vbox.add(Gtk::Label.new(`file #{ARGV[0]}`)) vbox.add(image) window.add(vbox).show_all Gtk.main From lennart at karssen.org Sat Sep 22 19:19:44 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 01:19:44 +0200 Subject: [Alexandria-list] New experimental feature, userland CueCat support In-Reply-To: <1190083757.16037.14.camel@matilda> References: <1190083757.16037.14.camel@matilda> Message-ID: <1190503184.17686.7.camel@testpc> Hi Cathal, I tried the SVN version of Alexandria with your CueCat addition this evening. So far (175 books, most of them scanned with the cat) it works with my PS/2 CueCat. Many thanks! I had one issue installing the SVN version, but that's described below. On Tue, 2007-09-18 at 03:49 +0100, Cathal Mc Ginley wrote: > To install Alexandria should now be a matter of 'rake install'. You > will > require 'rubygems' and 'rake' as well as some standard GNU and Gnome > tools ('gettext', 'scrollkeeper' and 'gconf2'). Please let me know, on > the list, if it works or if it breaks. I tried 'rake install' on a fresh ubuntu Gutsy Tribe 5 install with latest updates (so it's still beta, maybe even alpha). The only complaint it gave was that alexandria.desktop was missing so I copied the alexandria.desktop.in file to alexandria.desktop, which seems to make the installer work. However, there's no icon in the Applications menu. Lennart. > Cheers, > > - Cathal. > > > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list From lennart at karssen.org Sat Sep 22 19:31:38 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 01:31:38 +0200 Subject: [Alexandria-list] Alexandria SVN crash when loading library Message-ID: <1190503898.17686.21.camel@testpc> Hi all, I just scanned several books using Alexandria SVN (with Cathal's CueCat patch). Some books I had to enter by hand, either because they lacked a barcode or an ISBN. After some time I had to reset the machine (suspend didn't work as I expected ;-)) and when I started Alexandria again it crashed while reading my library. This is the output: lennart at testpc:~/.alexandria/My Library$ alexandria --debug Can't load image_size, hence exported libraries are not optimized Can't load mechanize, hence provider Deastore not available Can't load Ruby/ZOOM, hence Z39.50 and providers Library of Congress, British Library not available Initializing Alexandria... Initializing app_datadir... Initializing Icons... Starting MainApp... /bin/sh: /usr/bin/esd: not found Loading Libraries... Regularizing book :9780399142185.yaml --- !ruby/object:Alexandria::Book authors: - !str:Amazon::Search::Response Tom Clancy edition: !str:Amazon::Search::Response Hardcover isbn: "9780399142185" notes: "" own: true publisher: !str:Amazon::Search::Response Putnam Adult publishing_year: 1996 redd: false saved_ident: "9780399142185" tags: [] title: !str:Amazon::Search::Response Executive Orders version: 0.6.2 want: true got one! --- !ruby/object:Alexandria::Book authors: - Tom Clancy edition: Hardcover isbn: "9780399142185" notes: "" own: true publisher: Putnam Adult publishing_year: 1996 redd: false saved_ident: "9780399142185" tags: [] title: Executive Orders version: 0.6.2 want: true Entering resave-test block for 9780399142185.yaml Regularizing book :440433343.yaml Exception `NoMethodError' at /usr/local/lib/site_ruby/1.8/alexandria/library.rb:186 - undefined method `[]' for nil:NilClass ----------------------- Alexandria just crashed ----------------------- Timestamp: Sun Sep 23 01:17:03 +0200 2007 Message: undefined method `[]' for nil:NilClass Backtrace: /usr/local/lib/site_ruby/1.8/alexandria/library.rb:186:in `regularize_book_from_yaml' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:79:in `load' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:73:in `each' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:73:in `load' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:72:in `chdir' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:72:in `load' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:202:in `loadall' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:196:in `each' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:196:in `loadall' /usr/local/lib/site_ruby/1.8/alexandria/library.rb:610:in `reload' /usr/local/lib/site_ruby/1.8/alexandria/ui/main_app.rb:333:in `load_libraries' /usr/local/lib/site_ruby/1.8/alexandria/ui/main_app.rb:96:in `initialize' /usr/local/lib/site_ruby/1.8/alexandria/ui.rb:45:in `new' /usr/local/lib/site_ruby/1.8/alexandria/ui.rb:45:in `main' /usr/local/lib/site_ruby/1.8/alexandria.rb:76:in `main' /usr/bin/alexandria:7 Release: 0.6.2 Uname -a: Linux testpc 2.6.22-12-386 #1 Thu Sep 20 18:17:40 GMT 2007 i686 GNU/Linux Apparently the book in 440433343.yaml has a problem. However, if I look at library.rb lines 185 trough 189: unless book.isbn.class == String string_isbn = /isbn: (.+)/.match(text)[1].strip book.isbn = string_isbn puts "Reset to string value #{string_isbn}" end and simply comment the three lines in the unless section, Alexandria loads the library without problems. It also shows the book in the 440433343.yaml file. This is the contents of the yaml file: lennart at testpc:~/.alexandria/My Library$ more 440433343.yaml --- !ruby/object:Alexandria::Book authors: - Arthur C. Clarke - Gentry Lee edition: Paperback isbn: loaned: false loaned_since: 2007-09-22 00:00:00 +02:00 loaned_to: "" notes: "" own: true publisher: Orbit publishing_year: 1991 rating: 0 redd: false saved_ident: "440433343" tags: [] title: Rama II version: 0.6.2 want: true I've never programmed in Ruby before, but apparently it tries to convert the ISBN to string but that doesn't seem to work. Does anyone have a suggestion what to do to solve this in a more graceful way? Thanks, Lennart. From cathal.alexandria at gnostai.org Sat Sep 22 20:14:18 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 01:14:18 +0100 Subject: [Alexandria-list] Alexandria SVN crash when loading library In-Reply-To: <1190503898.17686.21.camel@testpc> References: <1190503898.17686.21.camel@testpc> Message-ID: <1190506458.9046.69.camel@matilda> Hi, thanks for the bug report. There is indeed a problem, but I think I see what's happening. On Sun, 2007-09-23 at 01:31 +0200, L.C. Karssen wrote: > Hi all, > > I just scanned several books using Alexandria SVN (with Cathal's CueCat > patch). Some books I had to enter by hand, either because they lacked a > barcode or an ISBN. > After some time I had to reset the machine (suspend didn't work as I > expected ;-)) and when I started Alexandria again it crashed while > reading my library. This is the output: > What we have below is a successful "Regularizing book" operation. I'll eventually add proper logging and you won't see so much output when this happens without a problem. ---8<--- snip ---8<--- > Regularizing book :9780399142185.yaml > --- !ruby/object:Alexandria::Book > authors: > - !str:Amazon::Search::Response Tom Clancy > edition: !str:Amazon::Search::Response Hardcover ---8<--- snip ---8<--- But what we have here is a failed "Regularize book" operation. It has failed because it expects /some/ value in the isbn field. I thought Alexandria allowed books without ISBNs, but I'm not so familiar with the code that I know where to look straight away. Anyway, I'll look into this case. Apart from anything else, this shouldn't cause a crash. ---8<--- snip ---8<--- > Regularizing book :440433343.yaml > Exception `NoMethodError' > at /usr/local/lib/site_ruby/1.8/alexandria/library.rb:186 - undefined > method `[]' for nil:NilClass > ----------------------- > Alexandria just crashed > ----------------------- > Timestamp: Sun Sep 23 01:17:03 +0200 2007 > Message: undefined method `[]' for nil:NilClass > Backtrace: > /usr/local/lib/site_ruby/1.8/alexandria/library.rb:186:in > `regularize_book_from_yaml' ---8<--- snip ---8<--- Well, at least this tells us you're working on the SVN version :^) > Release: 0.6.2 > Uname -a: Linux testpc 2.6.22-12-386 #1 Thu Sep 20 18:17:40 GMT 2007 > i686 GNU/Linux > >Apparently the book in 440433343.yaml has a problem. However, if I look > at library.rb lines 185 trough 189: > unless book.isbn.class == String > string_isbn = /isbn: (.+)/.match(text)[1].strip > book.isbn = string_isbn > puts "Reset to string value #{string_isbn}" > end >and simply comment the three lines in the unless section, Alexandria > loads the library without problems. It also shows the book in the > 440433343.yaml file. What's gone wrong is the regex doesn't match (that is /isbn: (.+)/.match(text) gives nil), so we're trying to access [1] of nil, which leads to the exact error we see. Thanks for the contents of the YAML file, a perfect bug report! > This is the contents of the yaml file: ---8<--- snip ---8<--- > Does anyone have a suggestion what to do to solve this in a more > graceful way? > Hmmm, I'll look into the root cause of the problem. In the mean time, it seems from the behavious I've seen that all books need to have an ISBN... By the way, I also don't yet know why the book identity was saved as 440433343 if it doesn't have an ISBN... But I'll figure it out! > > Thanks, > > Lennart. > Thank you, - Cathal. From cathal.alexandria at gnostai.org Sat Sep 22 20:32:56 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 01:32:56 +0100 Subject: [Alexandria-list] New experimental feature, userland CueCat support In-Reply-To: <1190503184.17686.7.camel@testpc> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> Message-ID: <1190507576.9046.79.camel@matilda> On Sun, 2007-09-23 at 01:19 +0200, L.C. Karssen wrote: > Hi Cathal, > > I tried the SVN version of Alexandria with your CueCat addition this > evening. So far (175 books, most of them scanned with the cat) it works > with my PS/2 CueCat. Many thanks! Glad it worked, such as it does. The user interface is pretty crummy though. Any ideas on useful user feedback, the layout of components or the design of the 'Scanner Input' widget would be much appreciated from anybody. A simple graphical sketch would do the trick... > I had one issue installing the SVN version, but that's described below. > > On Tue, 2007-09-18 at 03:49 +0100, Cathal Mc Ginley wrote: > > > To install Alexandria should now be a matter of 'rake install'. You > > will > > require 'rubygems' and 'rake' as well as some standard GNU and Gnome > > tools ('gettext', 'scrollkeeper' and 'gconf2'). Please let me know, on > > the list, if it works or if it breaks. > I tried 'rake install' on a fresh ubuntu Gutsy Tribe 5 install with > latest updates (so it's still beta, maybe even alpha). > The only complaint it gave was that alexandria.desktop was missing so I > copied the alexandria.desktop.in file to alexandria.desktop, which seems > to make the installer work. However, there's no icon in the Applications > menu. > Hmmm, I wonder did you grab the SVN version a few days ago, after I'd added the install task (revision 721) but before I added desktop integration and fixed the bugs I'd added (revision 724). You can check the versions with 'svn info Rakefile tasks.rb' and 'svn update' will bring you up to date with the current version. > > Lennart. Thanks, - Cathal. From bob.paddock at gmail.com Sat Sep 22 21:53:52 2007 From: bob.paddock at gmail.com (Bob Paddock) Date: Sat, 22 Sep 2007 21:53:52 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <1190501791.9046.49.camel@matilda> References: <200709221140.50852.bob.paddock@gmail.com> <200709221704.31009.bob.paddock@gmail.com> <1190501791.9046.49.camel@matilda> Message-ID: <200709222153.52393.bob.paddock@gmail.com> On Saturday 22 September 2007 06:56:31 pm Cathal Mc Ginley wrote: > Save this as image.rb, and run 'ruby image.rb 1861007175.cover' bob at tux ~/.alexandria/Library $ ruby image.rb 1861007175.cover Gdk::PixbufError Couldn't recognize the image file format for file '1861007175.cover' image.rb:26:in `initialize' image.rb:26:in `new' image.rb:26 A dialog box also pops up with what looks to be the output of 'file 1861007175.cover', saying they are JPEG JFIF 1.01. I tried other covers and they all get this error. -- http://www.wearablesmartsensors.com/ http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ From cathal.alexandria at gnostai.org Sat Sep 22 22:27:40 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 03:27:40 +0100 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <200709222153.52393.bob.paddock@gmail.com> References: <200709221140.50852.bob.paddock@gmail.com> <200709221704.31009.bob.paddock@gmail.com> <1190501791.9046.49.camel@matilda> <200709222153.52393.bob.paddock@gmail.com> Message-ID: <1190514460.9046.92.camel@matilda> Hi again, Well, as I thought, there's a difference in behaviour between your ruby-gnome and mine. On Sat, 2007-09-22 at 21:53 -0400, Bob Paddock wrote: > bob at tux ~/.alexandria/Library $ ruby image.rb 1861007175.cover > Gdk::PixbufError > Couldn't recognize the image file format for file '1861007175.cover' > image.rb:26:in `initialize' > image.rb:26:in `new' > image.rb:26 > > A dialog box also pops up with what looks to be the output > of 'file 1861007175.cover', saying they are JPEG JFIF 1.01. > > I tried other covers and they all get this error. > Have you tried a valid JPEG with a .jpg or .jpeg extension? How about a PNG? The image.rb script should at least display the "stock" error icon (on my Gnome system this is a red stop-sign) if it can't load the file, or, failing that, the broken image icon. Maybe adding these lines to the script, right after 'begin' will pinpoint the problem. format, width, height = Gdk::Pixbuf.get_file_info(ARGV[0]) if format puts "Format: #{format.name}; #{width}w * #{height}h" else puts "Format was nil" end Good luck finding the problem. - Cathal. From cathal.alexandria at gnostai.org Sun Sep 23 02:25:52 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 07:25:52 +0100 Subject: [Alexandria-list] Alexandria SVN crash when loading library In-Reply-To: <1190506458.9046.69.camel@matilda> References: <1190503898.17686.21.camel@testpc> <1190506458.9046.69.camel@matilda> Message-ID: <1190528752.9046.105.camel@matilda> Okay, just a preliminary sketch of the problem here. On Sun, 2007-09-23 at 01:14 +0100, Cathal Mc Ginley wrote: ---8<--- snip ---8<--- > what we have here is a failed "Regularize book" operation. It has > failed because it expects /some/ value in the isbn field. I thought > Alexandria allowed books without ISBNs, but I'm not so familiar with the > code that I know where to look straight away. Anyway, I'll look into > this case. Apart from anything else, this shouldn't cause a crash. ---8<--- snip ---8<--- > Hmmm, I'll look into the root cause of the problem. In the mean time, it > seems from the behavious I've seen that all books need to have an > ISBN... I have confirmed that we have a regression here. Alexandria 0.6.1 allowed books with no ISBN, the current SVN release does not. This qualifies as a show-stopper bug. (Are there any others I should know about before working on a release of 0.6.2?) > By the way, I also don't yet know why the book identity was saved as > 440433343 if it doesn't have an ISBN... But I'll figure it out! I've also figured this out, if a Book has no ISBN, it's ident is the hash code of its title. (Which is not guaranteed to be unique, of course). I can probably fix the particular problem in a relatively short time. But in the future, we will have to decide on issues such as identifying books based on their ISBN. Amongst other things, it prevents us from entering two distinguishable copies of a book. This is, of course, a design issue, so back to the UML-drawing-board! Cheers, - Cathal. From cathal.alexandria at gnostai.org Sun Sep 23 02:36:35 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 07:36:35 +0100 Subject: [Alexandria-list] Alexandria SVN crash when loading library In-Reply-To: <1190528752.9046.105.camel@matilda> References: <1190503898.17686.21.camel@testpc> <1190506458.9046.69.camel@matilda> <1190528752.9046.105.camel@matilda> Message-ID: <1190529395.9046.109.camel@matilda> Just after searching the Tracker on RubyForge, and this seems to be exactly the same problem as in bug #10972 "keeping" a book with invalid isbn generates error and won't add And is probably the root cause of bug #8951 Now books without isbn, sear[c]hed from a provider, don't work - Cathal. From lennart at karssen.org Sun Sep 23 07:08:20 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 13:08:20 +0200 Subject: [Alexandria-list] New experimental feature, userland CueCat support In-Reply-To: <1190507576.9046.79.camel@matilda> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> Message-ID: <1190545700.17090.14.camel@testpc> On Sun, 2007-09-23 at 01:32 +0100, Cathal Mc Ginley wrote: > Glad it worked, such as it does. The user interface is pretty crummy > though. Any ideas on useful user feedback, the layout of components or > the design of the 'Scanner Input' widget would be much appreciated from > anybody. A simple graphical sketch would do the trick... Actually, I don't think the Add Book interface needs much improvement (at the moment there are more important things to fix). It gives a simple but effective way to add books of which either the isbn or the title is known. It would be nice, however, to have some way to do batch scanning now that we have CueCat support. I'm not completely sure how to do that, though. I'm thinking along the following lines: 1) one would scan a book, 2) the info is retrieved and 3) instead of closing the add book dialog a new window pops up showing the retrieved contents (the properties window one gets when double clicking a book in a library). The Save button is focussed, so a simple enter suffices to close it if all info is correct. 4) When the properties window closes the add book dialog (which remaind open in the background) is focussed again on the ISBN input line. All of these steps (except 4) could also be implemented even when not using batch scanning. It would allow the user to check whether the info retrieved from the net is complete and accurate. Now the add book dialog just closes and the user is left to check for himself of the book was even added at all. I guess that the addition of step 4), the real batch scanning procedure, could be done by addind a checkbox to the add book dialog. If checked it will keep the add book dialog open, if not it closes the dialog after the properties window is closed. > > > I tried 'rake install' on a fresh ubuntu Gutsy Tribe 5 install with > > latest updates (so it's still beta, maybe even alpha). > > The only complaint it gave was that alexandria.desktop was missing so I > > copied the alexandria.desktop.in file to alexandria.desktop, which seems > > to make the installer work. However, there's no icon in the Applications > > menu. > > > Hmmm, I wonder did you grab the SVN version a few days ago, after I'd > added the install task (revision 721) but before I added desktop > integration and fixed the bugs I'd added (revision 724). You can check > the versions with 'svn info Rakefile tasks.rb' and 'svn update' will > bring you up to date with the current version. I checked out from SVN the yesterday evening, not long before I sent the e-mail. svn info on the files you mentioned tells me they're revision 725: lennart at testpc:~/alexandria/trunk/alexandria$ svn info Rakefile tasks.rb Path: Rakefile Name: Rakefile URL: svn://rubyforge.org/var/svn/alexandria/trunk/alexandria/Rakefile Repository Root: svn://rubyforge.org/var/svn/alexandria Repository UUID: 9992d806-23ff-4cc5-b4c6-abbc17c6a14e Revision: 725 Node Kind: file Schedule: normal Last Changed Author: cathalmagus Last Changed Rev: 722 Last Changed Date: 2007-09-19 08:26:20 +0200 (Wed, 19 Sep 2007) Text Last Updated: 2007-09-22 22:17:28 +0200 (Sat, 22 Sep 2007) Checksum: 15c52210587fcb706600733d8bea8e89 Path: tasks.rb Name: tasks.rb URL: svn://rubyforge.org/var/svn/alexandria/trunk/alexandria/tasks.rb Repository Root: svn://rubyforge.org/var/svn/alexandria Repository UUID: 9992d806-23ff-4cc5-b4c6-abbc17c6a14e Revision: 725 Node Kind: file Schedule: normal Last Changed Author: cathalmagus Last Changed Rev: 724 Last Changed Date: 2007-09-20 22:13:45 +0200 (Thu, 20 Sep 2007) Text Last Updated: 2007-09-22 22:17:28 +0200 (Sat, 22 Sep 2007) Checksum: 22eca3f242ba006d678825108187f07b I just ran svn update to be up te date again. Lennart. > Thanks, > - Cathal. > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list From bob.paddock at gmail.com Sun Sep 23 07:26:31 2007 From: bob.paddock at gmail.com (Bob Paddock) Date: Sun, 23 Sep 2007 07:26:31 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <1190514460.9046.92.camel@matilda> References: <200709221140.50852.bob.paddock@gmail.com> <200709222153.52393.bob.paddock@gmail.com> <1190514460.9046.92.camel@matilda> Message-ID: <200709230726.31501.bob.paddock@gmail.com> On Saturday 22 September 2007 10:27:40 pm Cathal Mc Ginley wrote: > Have you tried a valid JPEG with a .jpg or .jpeg extension? I tried some from my camera. Same error. > How about a PNG? Those work fine. > The image.rb script should at least display the "stock" error icon > (on my Gnome system this is a red stop-sign) if it can't load the file, > or, failing that, the broken image icon. I get a large red ball with a white "-" centered in the red ball, under what looks like the output of the 'file' command. > Maybe adding these lines to the script, right after 'begin' will > pinpoint the problem. Which gave this, for a camera picture: Gdk::PixbufError Couldn't recognize the image file format for file '/mnt/bak/PICS/dcp_3329.jpg' image.rb:33:in `initialize' image.rb:33:in `new' image.rb:33 From lennart at karssen.org Sun Sep 23 08:50:13 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 14:50:13 +0200 Subject: [Alexandria-list] Some minor bugs in Alexandria SVN 726 and one fix Message-ID: <1190551813.17912.1.camel@testpc> Hi Cathal, I added three small bugs to the tracker (numbers 1416[2-4]) and provided a quick patch for one of them. Lennart. From unapersson at linuxmail.org Sun Sep 23 09:20:59 2007 From: unapersson at linuxmail.org (Ian Davey) Date: Sun, 23 Sep 2007 14:20:59 +0100 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] Message-ID: <46F6683B.1080303@linuxmail.org> -------- Original Message -------- Subject: Re: [Alexandria-list] Alexandria SVN crash when loading library Date: Sun, 23 Sep 2007 09:51:11 +0100 From: Ian Davey To: Cathal Mc Ginley References: <1190503898.17686.21.camel at testpc> <1190506458.9046.69.camel at matilda> <1190528752.9046.105.camel at matilda> Cathal Mc Ginley wrote: > I've also figured this out, if a Book has no ISBN, it's ident is the > hash code of its title. (Which is not guaranteed to be unique, of > course). > I've got lots of pre-ISBN books, and several duplicates with different covers using the same ISBN, so having the ISBN as a key for the filename has always been a bit of an issue. I used to enter one using the ISBN, then miss out the ISBN to use the title hash for the others. I was working on some patches for Alexandria at one point, but started having some problems with my Ruby install and even getting it to run. I'd had some interest in adding some "reading management" style functionality and looking at the slowness with libraries having 1000+ books. To check out the source code via svn do you just need a rubyforge account? ian. -- Error 42: Invalid Question -- Error 42: Invalid Question From lennart at karssen.org Sun Sep 23 09:47:02 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 15:47:02 +0200 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <46F6683B.1080303@linuxmail.org> References: <46F6683B.1080303@linuxmail.org> Message-ID: <1190555222.10328.3.camel@barabas.karssen.org> Hi Ian, On Sun, 2007-09-23 at 14:20 +0100, Ian Davey wrote: > To check out the source code via svn do you just need a rubyforge account? No, a simple svn checkout svn://rubyforge.org/var/svn/alexandria suffices [1]. Lennart Karssen. [1] http://rubyforge.org/scm/?group_id=205 > > ian. > > -- > Error 42: Invalid Question > > > > -- ---------------------------------------------------- L.C. Karssen Utrecht The Netherlands lennart at karssen.org http://www.karssen.org Stuur me aub geen Word of Powerpoint bestanden! Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html ---------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070923/64c2c943/attachment.bin From unapersson at linuxmail.org Sun Sep 23 10:35:54 2007 From: unapersson at linuxmail.org (Ian Davey) Date: Sun, 23 Sep 2007 15:35:54 +0100 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <1190555222.10328.3.camel@barabas.karssen.org> References: <46F6683B.1080303@linuxmail.org> <1190555222.10328.3.camel@barabas.karssen.org> Message-ID: <46F679CA.9060607@linuxmail.org> L.C. Karssen wrote: > Hi Ian, > > On Sun, 2007-09-23 at 14:20 +0100, Ian Davey wrote: > >> To check out the source code via svn do you just need a rubyforge account? >> > > No, a simple svn checkout svn://rubyforge.org/var/svn/alexandria > suffices [1]. > > That's a good start. I did a checkout, managed to guess at the rake stuff and got it installed and running. Nice to see the addition of the "read" feature and a good default set of smart libraries. Is there a description of what the Tomboy plugin does anywhere? ian. From cathal.alexandria at gnostai.org Sun Sep 23 12:18:53 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 17:18:53 +0100 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190545700.17090.14.camel@testpc> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> Message-ID: <1190564334.8746.12.camel@matilda> On Sun, 2007-09-23 at 13:08 +0200, L.C. Karssen wrote: >It would be nice, however, to have some way to do batch > scanning now that we have CueCat support. D'oh!! Curse my poor communication skills! The CueCat support in the "Add Book..." / "Adding a Book" dialog was there when I got here. The feature I added was a /batch scanning/ dialog, available under the menu "File" > "Acquire from Scanner..." Admittedly the menu item should probably say "Scan Barcodes..." but that name was also there when I got here! Perhaps a little barcode icon would help. In any case, that's the user interface I was looking for feedback on. By the way, I agree that there should be a 'Stay Open' checkbox on the "Add Book" dialog, for the majority who don't have a barcode scanner. > I checked out from SVN the yesterday evening, not long before I sent the > e-mail. svn info on the files you mentioned tells me they're revision > 725: > I don't know why rake would have failed to generate 'alexandria.desktop' since the dependency chain is: :install => :pre_install => :build => :gettext => 'alexandria.desktop' You can clean up the generated files with 'rake clobber'. After that, I wonder does 'rake alexandria.desktop' give you the output: Merging translations into alexandria.desktop. There are clearly a few snags to be worked out with the Rakefile. - Cathal. From cathal.alexandria at gnostai.org Sun Sep 23 12:41:23 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 17:41:23 +0100 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <200709230726.31501.bob.paddock@gmail.com> References: <200709221140.50852.bob.paddock@gmail.com> <200709222153.52393.bob.paddock@gmail.com> <1190514460.9046.92.camel@matilda> <200709230726.31501.bob.paddock@gmail.com> Message-ID: <1190565684.8746.23.camel@matilda> On Sun, 2007-09-23 at 07:26 -0400, Bob Paddock wrote: > On Saturday 22 September 2007 10:27:40 pm Cathal Mc Ginley wrote: > > Have you tried a valid JPEG with a .jpg or .jpeg extension? > I tried some from my camera. Same error. > > How about a PNG? > Those work fine. Hmmm, okay, then it seems your installation of ruby-gdkpixbuf2 just doesn't support JPEG, which is just /strange/! > > The image.rb script should at least display the "stock" error icon > > (on my Gnome system this is a red stop-sign) if it can't load the file, > > or, failing that, the broken image icon. > > I get a large red ball with a white "-" centered in the red ball, > under what looks like the output of the 'file' command. > That's the one! The stock icons are PNG images, which is why it loads okay. > > Maybe adding these lines to the script, right after 'begin' will > > pinpoint the problem. > > Which gave this, for a camera picture: > > Gdk::PixbufError > Couldn't recognize the image file format for file '/mnt/bak/PICS/dcp_3329.jpg' > image.rb:33:in `initialize' > image.rb:33:in `new' > image.rb:33 I think you'll have to check out the ebuild for ruby-gnome2 or talk to someone at Gentoo or ruby-gnome2. There's a ruby-gnome2 forum here: http://www.ruby-forum.com/search?query=pixbuf+jpeg&forums%5B%5D=12 There's nothing about problems with Gdk::Pixbuf on 64-bit systems yet. But at least you have a script which demonstrates the problem on your system. Good Luck, - Cathal. From lennart at karssen.org Sun Sep 23 12:45:55 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 18:45:55 +0200 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190564334.8746.12.camel@matilda> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> <1190564334.8746.12.camel@matilda> Message-ID: <1190565955.19871.27.camel@rubidium01> On Sun, 2007-09-23 at 17:18 +0100, Cathal Mc Ginley wrote: > On Sun, 2007-09-23 at 13:08 +0200, L.C. Karssen wrote: > >It would be nice, however, to have some way to do batch > > scanning now that we have CueCat support. > > D'oh!! Curse my poor communication skills! > > The CueCat support in the "Add Book..." / "Adding a Book" dialog was > there when I got here. The feature I added was a /batch scanning/ > dialog, available under the menu "File" > "Acquire from Scanner..." Huh? So... You want to tell me that CueCat support was already there in 0.6.1? When I get back home I'll check that. Have I been that stupid that I didn't even test my CueCat in the "Add Book" dialog?? > > Admittedly the menu item should probably say "Scan Barcodes..." but that > name was also there when I got here! Perhaps a little barcode icon would > help. In any case, that's the user interface I was looking for feedback > on. IIRC there used to be a barcode icon in the Add Book dialog. That seems te have disappeared in the SVN version. > > By the way, I agree that there should be a 'Stay Open' checkbox on the > "Add Book" dialog, for the majority who don't have a barcode scanner. Since I haven't looked at you batch scanning dialog I'm not sure if I understand you correctly, but wouldn't such a checkbox be all you need for batch scanning, as I tried to explain in my previous e-mail? Or do you "define" batch scanning as simply scanning in a load of books and perform the internet lookup separately at a later time? > > > I checked out from SVN the yesterday evening, not long before I sent the > > e-mail. svn info on the files you mentioned tells me they're revision > > 725: > > > > I don't know why rake would have failed to generate 'alexandria.desktop' > since the dependency chain is: > > :install => :pre_install => :build => :gettext => 'alexandria.desktop' > > You can clean up the generated files with 'rake clobber'. After that, I > wonder does 'rake alexandria.desktop' give you the output: > > Merging translations into alexandria.desktop. > > There are clearly a few snags to be worked out with the Rakefile. I think I should set up a virtual machine for these Alexandria tests. Probably way easier (to restore) than having a physical machine as I have now (especially since that machine is actually my media centre pc :-)). > > - Cathal. > -- ---------------------------------------------------- L.C. Karssen Utrecht The Netherlands lennart at karssen.org Stuur me aub geen Word of Powerpoint bestanden! Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html ---------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070923/c8ccc741/attachment-0001.bin From cathal.alexandria at gnostai.org Sun Sep 23 12:51:21 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 17:51:21 +0100 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <46F6683B.1080303@linuxmail.org> References: <46F6683B.1080303@linuxmail.org> Message-ID: <1190566281.8746.31.camel@matilda> On Sun, 2007-09-23 at 14:20 +0100, Ian Davey wrote: > I've got lots of pre-ISBN books, and several duplicates with different > covers using the same ISBN, so having the ISBN as a key for the filename > has always been a bit of an issue. I used to enter one using the ISBN, > then miss out the ISBN to use the title hash for the others. > This will require a design phase to decide how to deal with this issue in a robust way: a job for Alexandria 0.7. In the mean time, I can retrofit support to allow empty ISBNs again. > I was working on some patches for Alexandria at one point, but started > having some problems with my Ruby install and even getting it to run. > I'd had some interest in adding some "reading management" style > functionality and looking at the slowness with libraries having 1000+ books. > Any ideas for increased functionality are most welcome. (I'm not sure what "reading management" is though.) When I reorganize the documentation after the upcoming stop-gap release, there should be some kind of central wish-list. Perhaps a wiki would be best for that kind of thing. I believe the slowness was tracked down (I saw a reference to it on the list archive): it's apparrently largely attributable to resizing the image thumbnails on load, rather than the file-based storage of book data. - Cathal. From cathal.alexandria at gnostai.org Sun Sep 23 13:02:59 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 18:02:59 +0100 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190565955.19871.27.camel@rubidium01> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> <1190564334.8746.12.camel@matilda> <1190565955.19871.27.camel@rubidium01> Message-ID: <1190566980.8746.43.camel@matilda> On Sun, 2007-09-23 at 18:45 +0200, L.C. Karssen wrote: > Huh? So... You want to tell me that CueCat support was already there in > 0.6.1? No, it was in the SVN version before I started working on Alexandria about a month ago. > IIRC there used to be a barcode icon in the Add Book dialog. That seems > to have disappeared in the SVN version. Yes, that was for the old 2.4 Linux kernel CueCat driver which is now unmaintained and doesn't work with Linux 2.6 kernels. > Since I haven't looked at you batch scanning dialog I'm not sure if I > understand you correctly, but wouldn't such a checkbox be all you need > for batch scanning, as I tried to explain in my previous e-mail? The major difference is that the scanning and the lookup are done asynchronously, so you can scan one barcode every two seconds or so and the books are looked up in separate threads: the titles appear next to the barcodes in the list as and when they are found online. It's kinda neat, if I do say so myself! Although lacking in polish. > Or do you "define" batch scanning as simply scanning in a load of books > and perform the internet lookup separately at a later time? That would be useful too, since not everyone has an always-on internet connection. > > There are clearly a few snags to be worked out with the Rakefile. > I think I should set up a virtual machine for these Alexandria tests. > Probably way easier (to restore) than having a physical machine as I > have now (especially since that machine is actually my media centre > pc :-)). Well, I suppose I can't promise that I won't break your machine. My own computer is too slow to consider virtual machines! What I really need to do is write more tests and RSpec specifications. (After the next stop-gap release, I might even look at test-scripting the GUI with DogTail...) - Cathal. From cathal.alexandria at gnostai.org Sun Sep 23 13:10:34 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 18:10:34 +0100 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <46F679CA.9060607@linuxmail.org> References: <46F6683B.1080303@linuxmail.org> <1190555222.10328.3.camel@barabas.karssen.org> <46F679CA.9060607@linuxmail.org> Message-ID: <1190567434.8746.50.camel@matilda> On Sun, 2007-09-23 at 15:35 +0100, Ian Davey wrote: > That's a good start. I did a checkout, managed to guess at the rake > stuff and got it installed and running. Um, I suppose I should really have created an up-to-date INSTALL file. I'll get right on that. Did 'rake install' work smoothly enough? > > Is there a description of what the Tomboy plugin does anywhere? > I think it does nothing at the moment. Joseph Method added it as a kind of placeholder, waiting for any C# experts to come along and add its functionality. I think what the ReadingPlugin is intented to do is to create a Note in Tomboy with a list of books you want to read, and when you cross out a book title in Tomboy, it would be marked as 'redd' in the yaml file for that book. - Cathal. From lennart at karssen.org Sun Sep 23 13:13:54 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 19:13:54 +0200 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190566980.8746.43.camel@matilda> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> <1190564334.8746.12.camel@matilda> <1190565955.19871.27.camel@rubidium01> <1190566980.8746.43.camel@matilda> Message-ID: <1190567634.19871.44.camel@rubidium01> On Sun, 2007-09-23 at 18:02 +0100, Cathal Mc Ginley wrote: > On Sun, 2007-09-23 at 18:45 +0200, L.C. Karssen wrote: > > Huh? So... You want to tell me that CueCat support was already there in > > 0.6.1? > No, it was in the SVN version before I started working on Alexandria > about a month ago. Ah! Phew, I thought I had just missed out on something I have been waiting for for a long time. I tried to implement it myself about a year ago, but my ruby skills are nonexistent and I'm really busy at work so I never actually got it to work. > > Since I haven't looked at you batch scanning dialog I'm not sure if I > > understand you correctly, but wouldn't such a checkbox be all you need > > for batch scanning, as I tried to explain in my previous e-mail? > The major difference is that the scanning and the lookup are done > asynchronously, so you can scan one barcode every two seconds or so > and the books are looked up in separate threads: the titles appear next > to the barcodes in the list as and when they are found online. It's > kinda neat, if I do say so myself! Although lacking in polish. I'll definitely have a look at it and give some feedback! > > > There are clearly a few snags to be worked out with the Rakefile. > > I think I should set up a virtual machine for these Alexandria tests. > > Probably way easier (to restore) than having a physical machine as I > > have now (especially since that machine is actually my media centre > > pc :-)). > Well, I suppose I can't promise that I won't break your machine. Not only that, but I also want to make sure my machine is clean when I test things. With a VM I can test/hack all I want :-). Lennart. > - Cathal. > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list -- ---------------------------------------------------- L.C. Karssen Utrecht The Netherlands lennart at karssen.org Stuur me aub geen Word of Powerpoint bestanden! Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html ---------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070923/9062e756/attachment.bin From lennart at karssen.org Sun Sep 23 13:19:31 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 19:19:31 +0200 Subject: [Alexandria-list] Dutch translation for 0.6.1 Message-ID: <1190567971.19871.48.camel@rubidium01> Hi Cathal, Some time ago I made a Dutch translation for Alexandria 0.6.1. I see it's not in SVN yet, so I guess I forgot to send it to the list. Maybe you could add it. It's my first translation effort, so feedback is welcome. Lennart. -- ---------------------------------------------------- L.C. Karssen Utrecht The Netherlands lennart at karssen.org Stuur me aub geen Word of Powerpoint bestanden! Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html ---------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: nl.po Type: text/x-gettext-translation Size: 23439 bytes Desc: not available Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070923/f8495871/attachment-0002.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070923/f8495871/attachment-0003.bin From unapersson at linuxmail.org Sun Sep 23 14:02:26 2007 From: unapersson at linuxmail.org (Ian Davey) Date: Sun, 23 Sep 2007 19:02:26 +0100 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <1190566281.8746.31.camel@matilda> References: <46F6683B.1080303@linuxmail.org> <1190566281.8746.31.camel@matilda> Message-ID: <46F6AA32.9020600@linuxmail.org> Cathal Mc Ginley wrote: > Any ideas for increased functionality are most welcome. (I'm not sure > what "reading management" is though.) When I reorganize the > documentation after the upcoming stop-gap release, there should be some > kind of central wish-list. Perhaps a wiki would be best for that kind of > thing. > > Including read dates, (optional) start and finish dates for a book, page counts etc. So you can query to get a list of books read in a year, how many you read, how many pages etc. Also organisation for unread books, goal lists etc. I'm on a book list filled with people with to read piles that often top a few hundred books. So it's merely features to make Alexandria more useful to people who read a lot, extending it beyond a mere cataloguing application. So it's about the metadata you add to books rather than the automatically applied information from Amazon etc. It will need to be optional and keep out of the way for people who do want Alexandria to be just a cataloguing application, but it would certainly make it more useful for me so I can get rid of my books spreadsheet. > I believe the slowness was tracked down (I saw a reference to it on the > list archive): it's apparrently largely attributable to resizing the > image thumbnails on load, rather than the file-based storage of book > data. > Yeah I did some digging in to it a while back, eliminated the yaml backend as the cause and was working on some code to automatically resize the image down to the maximum size. To see if that reduced the time for the image resize, due to the resize code having to load potentially hundreds of megabytes of data from disk to create the thumbnails. I have been considering a few ideas about how to remove the problem in a different way, splitting the display into pages that you scroll through with back and forward icons. With a dynamic filter to narrow down what is displayed. As I'm not sure a display with 1000 icons is necessarily optimal, no matter how quickly it loads. It will then be easily to port to smaller more memory constrained environments like the N800. The key information is what can be displayed on the screen at any one time, so a combination of paging and filtering should make it more usable. That's just my view though, not sure how other people feel about that. ian. From tristil at gmail.com Sun Sep 23 14:03:33 2007 From: tristil at gmail.com (Joseph Method) Date: Sun, 23 Sep 2007 14:03:33 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <1190565684.8746.23.camel@matilda> References: <200709221140.50852.bob.paddock@gmail.com> <200709222153.52393.bob.paddock@gmail.com> <1190514460.9046.92.camel@matilda> <200709230726.31501.bob.paddock@gmail.com> <1190565684.8746.23.camel@matilda> Message-ID: <167b6aa00709231103g35dc19c7jcf60a9963977bdca@mail.gmail.com> This definitely sounds like it's been isolated as a weird Gentoo-specific bug, but it might be worth thinking about converting all the jpgs into pngs anyway. On 9/23/07, Cathal Mc Ginley wrote: > On Sun, 2007-09-23 at 07:26 -0400, Bob Paddock wrote: > > On Saturday 22 September 2007 10:27:40 pm Cathal Mc Ginley wrote: > > > Have you tried a valid JPEG with a .jpg or .jpeg extension? > > I tried some from my camera. Same error. > > > How about a PNG? > > Those work fine. > > Hmmm, okay, then it seems your installation of ruby-gdkpixbuf2 just > doesn't support JPEG, which is just /strange/! > > > > The image.rb script should at least display the "stock" error icon > > > (on my Gnome system this is a red stop-sign) if it can't load the file, > > > or, failing that, the broken image icon. > > > > I get a large red ball with a white "-" centered in the red ball, > > under what looks like the output of the 'file' command. > > > That's the one! The stock icons are PNG images, which is why it loads > okay. > > > > Maybe adding these lines to the script, right after 'begin' will > > > pinpoint the problem. > > > > Which gave this, for a camera picture: > > > > Gdk::PixbufError > > Couldn't recognize the image file format for file '/mnt/bak/PICS/dcp_3329.jpg' > > image.rb:33:in `initialize' > > image.rb:33:in `new' > > image.rb:33 > > I think you'll have to check out the ebuild for ruby-gnome2 or talk to > someone at Gentoo or ruby-gnome2. > > There's a ruby-gnome2 forum here: > > http://www.ruby-forum.com/search?query=pixbuf+jpeg&forums%5B%5D=12 > > There's nothing about problems with Gdk::Pixbuf on 64-bit systems yet. > But at least you have a script which demonstrates the problem on your > system. > > Good Luck, > > - Cathal. > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list > -- -J. Method From tristil at gmail.com Sun Sep 23 14:28:18 2007 From: tristil at gmail.com (Joseph Method) Date: Sun, 23 Sep 2007 14:28:18 -0400 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <46F6AA32.9020600@linuxmail.org> References: <46F6683B.1080303@linuxmail.org> <1190566281.8746.31.camel@matilda> <46F6AA32.9020600@linuxmail.org> Message-ID: <167b6aa00709231128jc8da944i96b622f85c4ad0cb@mail.gmail.com> What's needed is a lazy loading scheme, but it's pretty technical to implement. Even when the books are off-screen, they're loaded into the GtkTreeView. A lazy loading scheme only has the books on screen plus a hundred above and below preloaded, but is able to load another screen full of books from the right range fast enough that the user doesn't notice. It only works if the backend is a relational database. I've thought that it would be appropriate to use ActiveRecord and Sqlite since it's a Ruby app. A while back Marco Costantini proposed a direction for Alexandria that made a lot of sense. Alexandria the viewer would be abstracted from the Alexandria the web scraper and Alexandria the book database. A book viewer for the N800 would be better off as a separate viewer formulated for the small screen. That mobile app could still be part of Alexandria the project, it would just be a separate app. The major advantage would be that this kind of abstraction would leave all the internal interfaces much better defined, more maintainable and more testable. > I have been considering a few ideas about how to remove the problem in a > different way, splitting the display into pages that you scroll through > with back and forward icons. With a dynamic filter to narrow down what > is displayed. As I'm not sure a display with 1000 icons is necessarily > optimal, no matter how quickly it loads. It will then be easily to port > to smaller more memory constrained environments like the N800. The key > information is what can be displayed on the screen at any one time, so a > combination of paging and filtering should make it more usable. That's > just my view though, not sure how other people feel about that. > > ian. > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list > -- -J. Method From cathal.alexandria at gnostai.org Sun Sep 23 15:36:10 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Sun, 23 Sep 2007 20:36:10 +0100 Subject: [Alexandria-list] Dutch translation for 0.6.1 In-Reply-To: <1190567971.19871.48.camel@rubidium01> References: <1190567971.19871.48.camel@rubidium01> Message-ID: <1190576170.13539.8.camel@matilda> On Sun, 2007-09-23 at 19:19 +0200, L.C. Karssen wrote: > Some time ago I made a Dutch translation for Alexandria 0.6.1. I see > it's not in SVN yet, so I guess I forgot to send it to the list. Maybe > you could add it. I've added your po file (rake automatically picks it up and includes it). I gave Alexandria a spin with LANG=nl_NL (after some trouble installing the nl_NL locale). It seems there's been quite a lot of drift between 0.6.1 and now, but some items show up correctly translated (I assume). I'm not even sure if all user-visible strings are being passed through gettext. Anywho! > It's my first translation effort, so feedback is welcome. I've been poring over the gettext info manual to get up to speed with intltool-merge and msgfmt. I've been thinking of getting together an Irish translation (ga_IE) of Alexandria as my own first translation effort. - Cathal. From unapersson at linuxmail.org Sun Sep 23 15:51:17 2007 From: unapersson at linuxmail.org (Ian Davey) Date: Sun, 23 Sep 2007 20:51:17 +0100 Subject: [Alexandria-list] [Fwd: Re: Alexandria SVN crash when loading library] In-Reply-To: <167b6aa00709231128jc8da944i96b622f85c4ad0cb@mail.gmail.com> References: <46F6683B.1080303@linuxmail.org> <1190566281.8746.31.camel@matilda> <46F6AA32.9020600@linuxmail.org> <167b6aa00709231128jc8da944i96b622f85c4ad0cb@mail.gmail.com> Message-ID: <46F6C3B5.4010700@linuxmail.org> Joseph Method wrote: > What's needed is a lazy loading scheme, but it's pretty technical to > implement. Even when the books are off-screen, they're loaded into the > GtkTreeView. A lazy loading scheme only has the books on screen plus a > hundred above and below preloaded, but is able to load another screen > full of books from the right range fast enough that the user doesn't > notice. It only works if the backend is a relational database. I've > thought that it would be appropriate to use ActiveRecord and Sqlite > since it's a Ruby app. > > I've had this article bookmarked for a very long time: http://log.emmanuelebassi.net/documentation/lazy-loading/ I did look at it once with Alexandria in mind at it seemed very appropriate, but at the time there was something unimplemented in Ruby-GTK. Unfortunately I can't remember what it was now, though it might have been gtk_tree_view_setmodel. ian. From lennart at karssen.org Sun Sep 23 16:11:50 2007 From: lennart at karssen.org (L.C. Karssen) Date: Sun, 23 Sep 2007 22:11:50 +0200 Subject: [Alexandria-list] Dutch translation for 0.6.1 In-Reply-To: <1190576170.13539.8.camel@matilda> References: <1190567971.19871.48.camel@rubidium01> <1190576170.13539.8.camel@matilda> Message-ID: <1190578310.19871.62.camel@rubidium01> On Sun, 2007-09-23 at 20:36 +0100, Cathal Mc Ginley wrote: > On Sun, 2007-09-23 at 19:19 +0200, L.C. Karssen wrote: > > Some time ago I made a Dutch translation for Alexandria 0.6.1. I see > > it's not in SVN yet, so I guess I forgot to send it to the list. Maybe > > you could add it. > I've added your po file (rake automatically picks it up and includes > it). I gave Alexandria a spin with LANG=nl_NL (after some trouble > installing the nl_NL locale). It seems there's been quite a lot of drift > between 0.6.1 and now, but some items show up correctly translated (I > assume). I'm not even sure if all user-visible strings are being passed > through gettext. Anywho! Thanks! Please send an e-mail to the list when you're nearing a release so I can update the translation. I hope to have some time in the coming weekend to make set up that virtual machine. > > > It's my first translation effort, so feedback is welcome. > I've been poring over the gettext info manual to get up to speed with > intltool-merge and msgfmt. I've been thinking of getting together an > Irish translation (ga_IE) of Alexandria as my own first translation effort. IIRC I read of the KDE translation howto (http://l10n.kde.org/docs/translation-howto/gui-translation.html) and some stuff on nl.gnome.org which won't be of any service to you I'm afraid :-). > > - Cathal. > -- ---------------------------------------------------- L.C. Karssen Utrecht The Netherlands lennart at karssen.org Stuur me aub geen Word of Powerpoint bestanden! Zie http://www.gnu.org/philosophy/no-word-attachments.nl.html ---------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070923/03c73cc6/attachment.bin From bob.paddock at gmail.com Sun Sep 23 19:04:43 2007 From: bob.paddock at gmail.com (Bob Paddock) Date: Sun, 23 Sep 2007 19:04:43 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <1190565684.8746.23.camel@matilda> References: <200709221140.50852.bob.paddock@gmail.com> <200709230726.31501.bob.paddock@gmail.com> <1190565684.8746.23.camel@matilda> Message-ID: <200709231904.43543.bob.paddock@gmail.com> On Sunday 23 September 2007 12:41:23 pm Cathal Mc Ginley wrote: > Hmmm, okay, then it seems your installation of ruby-gdkpixbuf2 just > doesn't support JPEG, which is just /strange/! Must be 64 bit related, as all of this worked on my old machine, same code and ebuilds as far as I know. > There's nothing about problems with Gdk::Pixbuf on 64-bit systems yet. > But at least you have a script which demonstrates the problem on your > system. I'll post on Gentoo and see what comes up. Thank you for your help. -- http://www.wearablesmartsensors.com/ http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ From lennart at karssen.org Tue Sep 25 14:22:32 2007 From: lennart at karssen.org (L.C. Karssen) Date: Tue, 25 Sep 2007 18:22:32 +0000 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190567634.19871.44.camel@rubidium01> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> <1190564334.8746.12.camel@matilda> <1190565955.19871.27.camel@rubidium01> <1190566980.8746.43.camel@matilda> <1190567634.19871.44.camel@rubidium01> Message-ID: <1190744552.2238.37.camel@rubidium01> [Damn, I hit the wrong reply button again. Here's a copy for the list.] Hi Cathal, > On Sun, 2007-09-23 at 18:45 +0200, L.C. Karssen wrote: >> Since I haven't looked at you batch scanning dialog I'm not sure if I >> understand you correctly, but wouldn't such a checkbox be all you need >> for batch scanning, as I tried to explain in my previous e-mail? > The major difference is that the scanning and the lookup are done > asynchronously, so you can scan one barcode every two seconds or so > and the books are looked up in separate threads: the titles appear next > to the barcodes in the list as and when they are found online. It's > kinda neat, if I do say so myself! Although lacking in polish. I took a look at your batch scanning option this morning and I must say I'm impressed. It's really neat indeed that the book info is looked up in separate threads. I wondered why the scan input field turns grey when I select a book from the list below. Shouldn't it just remain white? Now it seems to me that the field is not usable/selectable (since it's grey) even though it says I can click on it to enter a new barcode. On a more general note I think we shouldn't have too many ways of adding a book. I would suggest to combine the Add book dialog (Ctrl+n) with your batch scan module. This would leave us with two input methods. One for manual addition (ctrl-shift-n) and one that has automatic internet lookup, regardless of whether one enters an ISBN, scans a (bunch of) barcode(s) or looks up a title. About combining your batch dialog and the Add book dialog: In the add book dialog, when the Search radiobutton selected, there's a list for the results. This same list can be used when batch scanning books. It would be the list you implemented in the batch dialog. In this way a checkbox for batch scanning might not even be necessary. As an addition you could add a properties button after each item in the list so the user can check and/or edit the properties of the books (s)he has just scanned before committing all the books to the library (maybe as an alternative to having the book_properties dialog pop up after each successful scan/lookup). A way (button?, rightclick?) to remove items from the list could also come in handy in some cases (but might also clutter the dialog too much). > >> Or do you "define" batch scanning as simply scanning in a load of books >> and perform the internet lookup separately at a later time? > That would be useful too, since not everyone has an always-on internet > connection. I think we should not focus on that right now. Alexandria can already import a text file with a list of ISBNs, so I think that'll do for now (although I haven't tested it). I would put this of til some later release. Lennart > > - Cathal. > > _______________________________________________ > Alexandria-list mailing list > Alexandria-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/alexandria-list > **************************************** L.C. Karssen Utrecht The Netherlands lennart at karssen.org **************************************** -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070925/1263eb18/attachment.bin From cathal.alexandria at gnostai.org Tue Sep 25 15:43:48 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Tue, 25 Sep 2007 20:43:48 +0100 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190744552.2238.37.camel@rubidium01> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> <1190564334.8746.12.camel@matilda> <1190565955.19871.27.camel@rubidium01> <1190566980.8746.43.camel@matilda> <1190567634.19871.44.camel@rubidium01> <1190744552.2238.37.camel@rubidium01> Message-ID: <1190749428.8704.25.camel@matilda> On Tue, 2007-09-25 at 18:22 +0000, L.C. Karssen wrote: > Hi Cathal, > I took a look at your batch scanning option this morning and I must say > I'm impressed. It's really neat indeed that the book info is looked up > in separate threads. I wondered why the scan input field turns grey > when I select a book from the list below. Shouldn't it just remain > white? Now it seems to me that the field is not usable/selectable > (since it's grey) even though it says I can click on it to enter a new > barcode. > This is one of the parts lacking in polish, it isn't obvious why the user interface works as it does. The reason the field turns grey when it's not focused is that I am using a Gtk::EventBox to capture keyboard events (CueCat input looks to the operating system just like keyboard events). However, I didn't want to have the long, horrible scrambled CueCat data string coming up, as it would if I just used a Gtk::Entry. As I say, there's no quick feedback that the scan was successful. It takes over a second from the start of the CueCat scan to the last character received. I was thinking of a quiet sound notification for when the scan starts: e.g. /usr/share/sounds/iagno/flip-piece.wav then a happy-beep if the scan is successful: e.g. /usr/share/sounds/gnometris/turn.wav or an alarm if the scan fails (or it's the wrong kind of barcode): e.g. /usr/share/sounds/question.wav These are all sounds in a default Gnome installation, we'll have to make our own sounds, naturally. Not a big priority. Some graphical feedback would be nice too, I hacked together a barcode graphic animation in an idle hour a few weeks ago (barcode-hack.rb). Again, very low priority. > On a more general note I think we shouldn't have too many ways of > adding a book. I would suggest to combine the Add book dialog (Ctrl+n) > with your batch scan module. This would leave us with two input > methods. One for manual addition (ctrl-shift-n) and one that has > automatic internet lookup, regardless of whether one enters an ISBN, > scans a (bunch of) barcode(s) or looks up a title. > > About combining your batch dialog and the Add book dialog: In the add > book dialog, when the Search radiobutton selected, there's a list for > the results. This same list can be used when batch scanning books. It > would be the list you implemented in the batch dialog. In this way a > checkbox for batch scanning might not even be necessary. > I'm not sure I like the idea of having one list mean two different things. In the Search case it means "Choose 1 book to add to the library" and in the ISBN case it means "Add all the following to the library eventually". And the vast majority of users won't have a barcode scanner, so they won't need to go hunting for the "Scan Barcodes" dialog. > As an addition you could add a properties button after each item in the > list so the user can check and/or edit the properties of the books (s)he > has just scanned before committing all the books to the library (maybe > as an alternative to having the book_properties dialog pop up after each > successful scan/lookup). Not a bad idea! Or, we could just have a two-line-summary status bar, so that as you scroll down the list the status is updated with something like: ISBN: [9780575079038] Title: [The Dispossessed] Author: [Ursula Le Guin] Publisher: [Gollancz] Year: [2006] Binding: [Paperback] > A way (button?, rightclick?) to remove items from the list could also > come in handy in some cases (but might also clutter the dialog too > much). > And you could double-click the list entry to edit it before it's added to the library, or type delete to remove it from the list. > >> Or do you "define" batch scanning as simply scanning in a load of > books > >> and perform the internet lookup separately at a later time? > > That would be useful too, since not everyone has an always-on internet > > connection. > I think we should not focus on that right now. Alexandria can already > import a text file with a list of ISBNs, so I think that'll do for now > (although I haven't tested it). Agreed, not an immediate priority. > I would put this of til some later release. Absolutely, and indeed, none of these UI changes described above really stand much of a chance of being implemented before the next release. Alexandria 0.6.2, which is the release we're all working towards now, should take the existing functionality only, and work out as many of the "random crash" type bugs as possible, and ALL of the data corruption bugs. Once we have a 0.6.2 release (hopefully within a few weeks), we can start drawing up a Roadmap for new features, UI improvements and some core domain redesign. - Cathal. -------------- next part -------------- A non-text attachment was scrubbed... Name: barcode-hack.rb Type: application/x-ruby Size: 4339 bytes Desc: not available Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070925/7265290a/attachment-0001.bin From bob.paddock at gmail.com Wed Sep 26 20:20:32 2007 From: bob.paddock at gmail.com (Bob Paddock) Date: Wed, 26 Sep 2007 20:20:32 -0400 Subject: [Alexandria-list] icons.rb Couldn't recognize the image file format In-Reply-To: <1190565684.8746.23.camel@matilda> References: <200709221140.50852.bob.paddock@gmail.com> <200709230726.31501.bob.paddock@gmail.com> <1190565684.8746.23.camel@matilda> Message-ID: <200709262020.32881.bob.paddock@gmail.com> On Sunday 23 September 2007 12:41:23 pm you wrote: > On Sun, 2007-09-23 at 07:26 -0400, Bob Paddock wrote: > > On Saturday 22 September 2007 10:27:40 pm Cathal Mc Ginley wrote: > > > Have you tried a valid JPEG with a .jpg or .jpeg extension? > > > > I tried some from my camera. Same error. > > > > > How about a PNG? > > > > Those work fine. > > Hmmm, okay, then it seems your installation of ruby-gdkpixbuf2 just > doesn't support JPEG, which is just /strange/! Someone running Gentoo AMD64 X2 like mine, tried your script and reported thus: "Gentoo Forums Forum Index -> Gentoo on AMD64 Posted: Sun Sep 23, 2007 6:43 pm Post subject: I tried script you posted, and it worked fine here (on amd64). I have the same version of ruby-gdkpixbuf2 installed, but I don't use alexandria at all (and it's dependencies are too heavy for me to consider it)." > I think you'll have to check out the ebuild for ruby-gnome2 or talk to > someone at Gentoo or ruby-gnome2. On to ruby-gnome2 next I guess? -- http://www.wearablesmartsensors.com/ http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ From kapheine at divineinvasion.net Thu Sep 27 14:28:34 2007 From: kapheine at divineinvasion.net (Zachary P. Landau) Date: Thu, 27 Sep 2007 14:28:34 -0400 Subject: [Alexandria-list] Userland CueCat support In-Reply-To: <1190567634.19871.44.camel@rubidium01> References: <1190083757.16037.14.camel@matilda> <1190503184.17686.7.camel@testpc> <1190507576.9046.79.camel@matilda> <1190545700.17090.14.camel@testpc> <1190564334.8746.12.camel@matilda> <1190565955.19871.27.camel@rubidium01> <1190566980.8746.43.camel@matilda> <1190567634.19871.44.camel@rubidium01> Message-ID: <20070927182834.GC29777@caviar.divineinvasion.net> On Sun, Sep 23, 2007 at 07:13:54PM +0200, L.C. Karssen wrote: > On Sun, 2007-09-23 at 18:02 +0100, Cathal Mc Ginley wrote: > > On Sun, 2007-09-23 at 18:45 +0200, L.C. Karssen wrote: > > > Huh? So... You want to tell me that CueCat support was already there in > > > 0.6.1? > > No, it was in the SVN version before I started working on Alexandria > > about a month ago. > Ah! Phew, I thought I had just missed out on something I have been > waiting for for a long time. I tried to implement it myself about a year > ago, but my ruby skills are nonexistent and I'm really busy at work so I > never actually got it to work. It's been a long time, so I'm not sure when things may have been removed or whatnot. But I added the original kernel-level support back in 2004-09. So it should have been there for a number of releases. It looks like the userland support was added in 2005-07. -- Zachary P. Landau GPG: gpg --recv-key 0xC9F82052 | http://divineinvasion.net/kapheine.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20070927/a948a67a/attachment.bin From cathal.alexandria at gnostai.org Thu Sep 27 18:52:01 2007 From: cathal.alexandria at gnostai.org (Cathal Mc Ginley) Date: Thu, 27 Sep 2007 23:52:01 +0100 Subject: [Alexandria-list] Alexandria SVN crash when loading library In-Reply-To: <1190529395.9046.109.camel@matilda> References: <1190503898.17686.21.camel@testpc> <1190506458.9046.69.camel@matilda> <1190528752.9046.105.camel@matilda> <1190529395.9046.109.camel@matilda> Message-ID: <1190933521.11041.9.camel@matilda> Hi all, I've made a few changes in SVN (current revision is 735), hopefully allowing empty ISBNs again (both for imported books from libraries made in 0.6.1, and adding books from providers). If there are still cases where not entering an ISBN for a book causes a problem, let me know. I also added an INSTALL file, any suggestions to make it more user-friendly? Finally, has anyone come across really weird behaviour (including crashes) when specifying "New Smart Library" and messing about with all the options... I think I have tracked this problem down, but I'd like to know if anyone else has seen it. - Cathal.