While I normally don't waffle on about higher level touchy feely sorts of things, a recent acquisition of a new scanner prompted my mind to wander through those neurological paths. I think it's fair to say that many folks don't run just one, but many desktops these days. And no, this is not about KDE vs GNOME vs emacs as your desktop, but rather that a whole KDE4 session is happening on another (virtual) machine which is brought across to the normal "main" desktop.
This gives me many apps running on many machines and also proxy X sessions and X-VNC sessions in windows (which normally have an embedded panel et al). A take away idea I had here was why when I have Abiword in the menus is there not an offer to run it on server-Y which I have an ssh key for instead of the local host? Or to bring xpra into the mix there as well. Sure, this is likely not an idea that folks who only own a single machine or laptop will like, but that demographic is surely shrinking fast. Add in nepomuk for tracking this and if I run amarok on furryshark7 most of the time then surely that can become the default host for it's icon rather than localhost.
The scanner idea was simple, a USB scanner, a USB hub to attach it to the host through and a handful of USB sticks. Each stick has a profile (username, colour, dpi etc) and to scan just put the document into the scanner and drop in the usb stick for a moment. Then the host knows the parameters and can put the file into a user specific directory on an intranet share so only the document holder can actually see the scanned version. Privacy and convenience, a rare thing!
Of course now that I have a scanner which doesn't suck, libferris will be getting sane support so I can "cp" documents right from the scanner to the filesystem or web...
cp sane://my-scanner-model/600dpi/colour/adf1.jpg flickr://me/upload
And the reason files are numbered is so a single copy can grab 30 documents from the ADF with a normal copy syntax. In practice, adf2 and adf1 both just scan the next piece of physical paper and give you it encoded in an appropriate manner (jpg for example). The fun part will be smoothing over a paper jam at document 7 of 16.
sync && umount blog://
C++, Linux, libferris and embedded development. Yet another blog from yet another NARG.
Monday, March 21, 2011
Thursday, January 20, 2011
From Canon CR2 Raw files to the Web
A potentially interesting artefact of me playing around with a Canon DSLR is that libferris now has some initial support for CR2 "raw" files. Complements of course go to the dcraw library and tools for the heavy lifting. The upshot is that ferriscp ~/cam/foo.CR2 flickr://me/upload now works as expected. Once I update my maemo build, this should also let me use an n900 with 3G to upload from RAW while on the move.
I need to include stuff for ICC profiles and the like but at least the Web services get what they expect and everything runs smoothly, and it will for you too next release (TM). I really should look into mounting the kipi plugins as a filesystem sometime, they offer some awesome Web import/export functionality, ripe for a filesystem I tell's ya.
I still need to add "rgba-32bpp" metadata support for CR2 files. As you can imagine from the name, if you read this metadata for a jpeg, png or other supported image file, libferris decodes the image to 32 bit RGBA byte values for you. It might also be interesting to create another "file as filesystem" design where a bunch of virtual files are offered to see the small thumbnail, the roughly 1080p sized thumbnail or the ICC corrected rendering of the CR2 and others. Such virtual files are really handy for drag and drop to other filesystems ;)
I might hunt around for some Nikon raw files to add support for those too at some point. Though there is nothing like having a camera generating files to make you want to make your software support those files.
I need to include stuff for ICC profiles and the like but at least the Web services get what they expect and everything runs smoothly, and it will for you too next release (TM). I really should look into mounting the kipi plugins as a filesystem sometime, they offer some awesome Web import/export functionality, ripe for a filesystem I tell's ya.
I still need to add "rgba-32bpp" metadata support for CR2 files. As you can imagine from the name, if you read this metadata for a jpeg, png or other supported image file, libferris decodes the image to 32 bit RGBA byte values for you. It might also be interesting to create another "file as filesystem" design where a bunch of virtual files are offered to see the small thumbnail, the roughly 1080p sized thumbnail or the ICC corrected rendering of the CR2 and others. Such virtual files are really handy for drag and drop to other filesystems ;)
I might hunt around for some Nikon raw files to add support for those too at some point. Though there is nothing like having a camera generating files to make you want to make your software support those files.
Monday, January 3, 2011
Talking: RDF and Office Documents
I should be giving a talk about RDF and ODF next saturday (8th jan) at Humbug in Brissie. The challenge is that work is reasonably embryonic in the area, but there are already useful things that can be done like drag and drop of contact and calendar information to/from ODF files. As its a technical meetup I'll be going into the range stuff and how to link semantics to document text. Sorry for the brief post, but hopefully you see it and come along if you want to bounce richer information around in ODF files between OpenOffice, Calligra, and Abiword.
Monday, December 20, 2010
Libferris hits the presses again...
The January 2011 issue of Linux Magazine has some information on Federated indexing with libferris. Nice timing for the upcoming talk on libferris at linux.conf.au next month!
Friday, November 19, 2010
Foray into Qt Models with libferris
Version 1.5.2 of libferris, released yesterday, includes both a QAbstractTableModel and QSortFilterProxyModel targeted at exposing libferris to the world of all things Qt. In libferris a great amount of information is exposed as virtual Extended Attributes for a file. As you can see in the below shot, the md5 as well as "ls -lh" size is available directly as attributes. Before you wonder, the md5 is only calculated on demand and is then cached relative to the mtime of the file.

Each file has thousands of attributes on my machine, these include tagging, geospatial information, extracted metadata, and RDF. In my GTK+2 model/view pair I allow the user to "sort" on a column but really have the view sort on another one. For example, as you see below, sorting on size-human-readable either means Qt or some class you provide needs to know how to properly sort on size strings like 14.2k etc. Instead of this, the QSortFilterProxyModel converts some column names into others, so a size-human-readable sort becomes a sort on the "size" column. As the latter is simply a number Qt knows how to do the right thing (TM). Although both columns are shown in the example shot, there is no need to have the size column visible too.

The mtime is actually converted to a QDateTime by the model. It is stored internally as an epoch integer. Thus the mtime-display column was added in libferris which shows you a human readable version. This is handy for command line tools and others which do not want to know about presentation etc and just want something nice to show the user. Most of these attributes in libferris have schema information, which makes it possible to pass them on to Qt in a nice way. Tags should come through as checkboxes etc.
The next logical step is to get at this from QML. I'll wait until I update to Fedora 14 which has Qt 4.7 in it. With the model, and some way to play back audio I should be able to make an audio player in QML. Two things help here; searches can return their results as a virtual filesystem which can then be shown in the QAbstractTableModel, and filesystem "selections" can be built as filesystems which can also be then displayed in the same way. So I have search and playlist support already from that and ffmpeg or some low battery way to make ogg into air oscillation then completes the loop.

Each file has thousands of attributes on my machine, these include tagging, geospatial information, extracted metadata, and RDF. In my GTK+2 model/view pair I allow the user to "sort" on a column but really have the view sort on another one. For example, as you see below, sorting on size-human-readable either means Qt or some class you provide needs to know how to properly sort on size strings like 14.2k etc. Instead of this, the QSortFilterProxyModel converts some column names into others, so a size-human-readable sort becomes a sort on the "size" column. As the latter is simply a number Qt knows how to do the right thing (TM). Although both columns are shown in the example shot, there is no need to have the size column visible too.

The mtime is actually converted to a QDateTime by the model. It is stored internally as an epoch integer. Thus the mtime-display column was added in libferris which shows you a human readable version. This is handy for command line tools and others which do not want to know about presentation etc and just want something nice to show the user. Most of these attributes in libferris have schema information, which makes it possible to pass them on to Qt in a nice way. Tags should come through as checkboxes etc.
The next logical step is to get at this from QML. I'll wait until I update to Fedora 14 which has Qt 4.7 in it. With the model, and some way to play back audio I should be able to make an audio player in QML. Two things help here; searches can return their results as a virtual filesystem which can then be shown in the QAbstractTableModel, and filesystem "selections" can be built as filesystems which can also be then displayed in the same way. So I have search and playlist support already from that and ffmpeg or some low battery way to make ogg into air oscillation then completes the loop.
Monday, November 15, 2010
Sharing is Caring...
My repository now contains a steaming ferris-sharing-plugin_0.2_armel.deb which will hook up libferris to the Nokia sharing system on the n900. This lets you click the funky Brussels atom building "sharing" icon from many places and copy images to flickr, 23hq, facebook.
There isn't much feedback at the moment, that is planned for "the future". You might also like to install the ImageMagick from my repo. Simply expand it to /opt and make a link /usr/lib/ImageMagick-6.6.0 -> /opt/ImageMagick-6.6.0/lib/ImageMagick-6.6.0. This gives you proper handling of exif orientation during scaling prior to upload with libferris.
I also have some tweaks to libferris itself which will be in the upcoming 1.5.1 release to help with annotations etc during upload. The next step is to get vimeo and youtube upload support happening too, since libferris can already upload to those.
There isn't much feedback at the moment, that is planned for "the future". You might also like to install the ImageMagick from my repo. Simply expand it to /opt and make a link /usr/lib/ImageMagick-6.6.0 -> /opt/ImageMagick-6.6.0/lib/ImageMagick-6.6.0. This gives you proper handling of exif orientation during scaling prior to upload with libferris.
I also have some tweaks to libferris itself which will be in the upcoming 1.5.1 release to help with annotations etc during upload. The next step is to get vimeo and youtube upload support happening too, since libferris can already upload to those.
Friday, November 12, 2010
Pop Quiz Hot Shot - ssh
You have ssh'ed into a host via three others and just noticed a file(s) you would like on the laptop you started all this merriment from, what do you do? Of course you don't have a control connection or tunnelling already setup because its a "once off" multi hop connection.
A solution that is not quite as widely known as I'd thought is to use the sz and rz pair. Hurrah the zmodem programs are still just as useful today as they were in the years of yore. The snag is that your local terminal needs to have some knowledge of this, konsole works nicely and will pop up a dialog asking where to save files "sent" to it. So doing ssh server; date >/tmp/df; sz /tmp/df will result in a dialog appearing on your local display asking where to save the df file to. Note that this works over multiple intermediate ssh hops. Just perfect for when you have routed your way into a protected network via 4 hops and find out that /etc/foo.conf which is 8kb would be *really* nice to have on the laptop.
This is packaged as lrzsz for Fedora and I've made an lszrz tarball available in my n900 repository. Let the zmodem goodness rain down...
A solution that is not quite as widely known as I'd thought is to use the sz and rz pair. Hurrah the zmodem programs are still just as useful today as they were in the years of yore. The snag is that your local terminal needs to have some knowledge of this, konsole works nicely and will pop up a dialog asking where to save files "sent" to it. So doing ssh server; date >/tmp/df; sz /tmp/df will result in a dialog appearing on your local display asking where to save the df file to. Note that this works over multiple intermediate ssh hops. Just perfect for when you have routed your way into a protected network via 4 hops and find out that /etc/foo.conf which is 8kb would be *really* nice to have on the laptop.
This is packaged as lrzsz for Fedora and I've made an lszrz tarball available in my n900 repository. Let the zmodem goodness rain down...
Subscribe to:
Posts (Atom)