Happy 4th Birthday.
We’re getting very close to releasing zmugfs 0.1, the read-only release. As you may recall on Monday I got zmugfs to show imgdata in nautilus.
But I could only get it to work if I used the thumbnail sized imgdata. In the read() method I was logging into smugmug, reading the thumbnail imgdata, logging out of smugmug, getting the imgdata via http GET, and returning. Well, this is crazy because read gets called multiple times with different offsets. So I ended up implementing the open() and release() methods. In the open, I get the imgdata (original size) via the smugmug api and store the imgdata in an image cache (an in memory dictionary). In the read method, it now respects the offset and size attributes by reading from the image cache. Then in the release method, I delete the entry from the image cache. I know not much of a cache. 🙂 But it solved my problem. I’m putting the cache work off a bit, not sure how to approach that yet.
Next thing I wanted to try all of the command line utils (at least the ones I’ve used before) to see how they react to zmugfs. I was pleasantly surprised with the result.
|chgrp||FAILURE||chgrp method not implemented|
|chmod||FAILURE||chmod method not implemented|
|chown||FAILURE||chown method not implemented|
|cp from||SUCCESS||able to copy image from smugmug using zmugfs|
|cp to||FAILURE||mknod not implemented|
|file||SUCCESS||got appropriate file type|
|ln -s||SUCCESS||softlink created|
|ls||SUCCESS||listing appears correctly|
|mkdir||FAILURE||mkdir method not implemented|
|mv||FAILURE||copy part worked; unlink not implemented|
|rm||FAILURE||unlink not implemented|
|rmdir||FAILURE||rmdir not implemented|
|touch||FAILURE||setattr not implemented|
From a readonly perspective, it is looking great. What’s left before a release you ask? Just a few things.
That’s it, once I finish those things zmugfs 0.1 will be released out into the wild! I’m really excited as this is my first ever open source project. I’ve submitted patches to a few things, but never anything this extensive.
Tonights zmugfs update is permissions and time are now shown correctly. I defaulted the user and group to that of the user running the program (in this case me) 🙂 And I now show the date and time correctly from the api.
Update: by “in this case me” it doesn’t mean I hardcoded my uid and gid. I used os.getuid() and os.getgid()
By the way, disregard the drew and foo entries. Those are debug strings which will be removed.
After 2.5 weeks, I finally got my car back from the shop. The following things were fixed:
A special thanks to Carolina Auto Masters for great work as usual.
xkcd is a hilarious cartoon (well if you’re a geek). And today’s strip covers something that most database applications do poorly.
I’ve been meaning to post these pictures of the sky. I really liked how blue the sky was on July 22nd, 2007.
A week after the beautiful blue sky, we finally got some rain here in NC and we were treated to a rainbow, a full arc no less. Checkout the full gallery.
I’m starting to lose track of how long it’s been since I’ve had my car. I think it’s been 3 weeks already. It is Tuesday (what’s left of it anyway) and the car remains in the shop as of this morning. Looks like the final piece was being worked on today, the AC. All the other issues seemed to have been fixed. I’m really hoping and praying it’ll be ready tomorrow. But knowing my luck it’ll be longer. 😦
Success. I got zmugfs to show image data in nautilus. It is a horribly inefficient algorithm but it works. I do the following:
I know EWW! 🙂 But it worked!
That’s cool and all, but I bet what would be really cool is to open the file up in GIMP.
How’s that for coolness! It’s 12:18am EDT, I need to get to bed because I have to get up at 6:30am to get the kiddies ready for school. If all goes well, I should be able to get zmugfs 0.1 released by next week.