News

( My personal website has gone to dust, any links thereto will fail. This site will be home for a while. )

Friday, 25 July 2008

Email attachment limits

Why is this not a done deed?

How many of you out there know someone who simply wants to send pictures by email but has no clue about how big the darn things are? Attach, attach, clickety-click and then off goes a 10mb email... Man this is crazytown. Why is there no thought given to this for email clients like kmail and evolution?

This is a cry-out to the boffins to please (pretty, pretty please) create some kind of layer between the images attached and the email sent that will:
  1. Compress them in scale and size to a target size (see Phatch if you think this can't be done!)
  2. Limit the total Kb size of all the attachments so that it tells Aunt Sue, "Please remove a few pictures because this email is too big to send."
This kind of solution should involve both routes of the attachment-equation: Sending-to-email from a file browser, and attaching from a new mail message.

I have crafted two (horrible) solutions to the second route, one for kmail and another for evolution. I can't get my brain around how to do this from the first route -- the answer for evolution is some kind of plugin, but that's a step too far for me right now.

My solutions for kmail and evolution can be a subject for another blog if anyone is interested...

\d

Otherwise Poetry

Me again,
I have delayed putting a link to my little book of poems (available on Lulu.com) for many, many months now; feeling a little shy about such marketing, but today I felt a rush of optimism and I just did it.

So, this is a quick post to mention it. I hope someone out there enjoys a few of the poems in my book, but I have never had any feedback so I really don't know if they are any good. The hardcover is priced as low as I could go and the ebook is free.

There are a few new ones towards the end that came from my admiration of Prof. Dawkins' work and what I have learned from him and others (a nod to James Randi) about reality and how deluded we humans really are.

Well, there, it's all said now. Gulp!

Note: I created the entire book (printed version and ebook) using 100% free software on Kubuntu. I used Lyx to do the writing (and produce the PDF and the PS) and Inkscape & Scribus to hack the cover. Thank the FSM for such capable and fantastic software. Oh, I used Fonty Python to manage my fonts too ;) (But the quality of that software is up for debate.)

\d

Notes from July

Greetings,
I have one more operation to go (I hope that's all) and I should be all repaired. Man I wish I was as simple as a motherboard and I could get opened-up with a screwdriver and have bits swapped-out.

Otherwise July has been good to me; we have moved into our house and I have a reliable Internet connection (the most important thing :D ) and I am starting to edge towards coding again.

Plans:
  1. Learn Django!
  2. Finish my Python & Cairo animation app. This is very cool, but I need time to polish it.
  3. Get a web-server of my own (perhaps Linode) and muck about with some web apps.
  4. Polish Fonty Python some more (Nautilus & Konqueror integration for one).
So, lots to do with little time!

Ciao world,
\d

Adding folders of fonts to a Pog

Hello world,
I was asked in an email the other day if I could add a function to gather all the fonts in a given folder into a Pog. While this is a cool idea for a future release, it's possible right now from the command-line. Lemme show you how.

Open a console/terminal (like konsole or gnome-terminal). I will use square brackets [ ] to surround the command you can type but don't type the brackets. I will use ~/somefonts as the example folder you want to use.

The idea is to build a pog, which is a plain text file containing full paths to each font file. Okay, let's start:
  1. Use [cd ~/.fontypython] to go where the pogs live.
  2. [echo "not installed" > newpog.pog] You can use any name you want. Just make *sure* you don't overwrite some other pog!
  3. [find ~/somefonts -iname "*.ttf" >> newpog.pog] That will go and find the ttfs (you can change that to say "*.otf" but Type1 fonts might be more tricky) and then it will append them to the 'newpog.pog' file you just started.
  4. If you want to add other fonts from other folders, just use the same find command, but change the path. Make sure you use 2 ">" symbols (>>) because that means append-to.
Right, that's it. Now open fonty and go look at newpog:
[fontypython newpog]

You can also install those fonts with:
[fontypython -i newpogs]

Have a look at [fontypython --help]

Simple, I hope ;)
\d

Saturday, 14 June 2008

Damn the body

May has been, and June is shaping-up to be, a month of being sick and in hospital. Man I hate hospitals! They remove your spirit and leave you at your most basic: a body in a bed with nothing but hours between you and sanity.

I wonder when I will get back into a productive phase again -- sometimes I think it will be never.

I be blue.

\d

Monday, 14 April 2008

I been tired

Ah well, no code and no updates. Hoping to get back in the swing of things in a few months, life's too strange right now.

\d

Wednesday, 30 January 2008

Fui update

I made a few tweaks and there is the slim chance that fui might become a Debian unstable package in the future.

Latest source here.

Would appreciate any feedback about it's use in the digital wild.

\d

Friday, 25 January 2008

FUI - a select copy/move command line tool

Have you ever wanted to select various files from a console: this one and those two and not this one? Have you ever wanted to move over to another console (or tab) and go to some directory and then copy all those files in one go?

If so, then fui might be for you. The name means 'fake user interface'. Yeah, well, I had to call it something.

The idea was to create some of the elegance of the select, click, cut/copy and paste paradigm in common use in Gui's. With fui you can do this kind of thing:

fui `ls *.jp` blob blimp sandwich
(That will select all those files.)

fui --exclude bobo.jpg muffin.jpg
(I didn't want those two.)

cd /some/other/place
fui --copy
(That will copy all those files to here.)

Simple and easy. You can move files (and directories) as well as copy them.

There's a --help option and it's localized too (but has no po/mo files yet.)

You can get it from the Cheese Shop.

\d

Wednesday, 23 January 2008

Fonty Python - 0.3.6 released

I fixed the bug mentioned in the last post - it was caused when a font rendered with zero width (I think because it could not draw any of the letters in the text string).

I also improved the Check Fonts dialogue - to give a little feedback.

Version 0.3.6 is on Savannah.

\d

Tuesday, 22 January 2008

wx Error in Fonty 0.3.5

I noticed an error that kills the app. It's not 100% unexpected, but I had not found a font that triggered it until a moment ago. The font is called 50SDINGS.ttf, BTW.

If you see this kind of thing, it will tell you what font did the deed (et tu, 50SDINGS.ttf?) and you should then manually move it to ~/longknives or someplace else.

So, I will be hacking (when I get a night's sleep) on that issue soon.

Any reports from the field?

Oh, I also started a Launchpad project for Cairoglyphics. So far it's a mess because, frankly, I just don't understand how to use LP. I'm trying to get a link up so people can download the file, but all this bazaar stuff is hurting my head. I hope I get a reply from the feedback email I sent, that will surely help this thick-headed oaf I call me :D


\d

Tuesday morning, red eyes

Sheesh, I didn't sleep a wink last night. Urgh... Just stared at the ceiling. I would have been hacking away or surfing about but the power had cut (again) and took my net with it, so I switched my PC off and watched the ceiling.All.Night.

Anyway, Fonty is on 0.3.5.1 because I added a menu item for KDE/Gnome and then had to fix that (hence the extra .1) There is some hope that it will be packaged as a deb file now (thanks Kartik!) and it *might* make it into the repos in time for the next release of Ubuntu and friends.

I spent some time yesterday trying my hand at the Launchpad logo competition. I'm not happy with my entry and may fiddle it some more. Is it cheeky to link it from here? What the hell.

Long day coming up.
\d

Sunday, 20 January 2008

Cairoglyphics version 2.0



Saved here, is an overview/tutorial/summary of the Cairo drawing library from a Python perspective done in a diagram form. If you want an at-a-glance overview which is followed-up by many details that fill-in the surrounding aspects, then this might do the job.

It's done as a single SVG file and I suggest you use Inkscape to open and view it. Zoom-in on the page and read the instructions about what fonts you'll need (It requires two faces, both free and widely available.)

Please download it, share it and put it on your own website!

\d

Friday, 18 January 2008

Fonty Python - 0.3.4 released

I am struggling from the after-effects of the fire and constant power cuts (thanks Eskom, you just light the way :(), not to mention all the unicode stuff I have been hacking.

I rushed the new release out - hoping to get it done before yet another power cut.
Comments and bugs are welcome.


\d

Wednesday, 16 January 2008

Flash Fynbos fire - a close escape





Fire in Fonty-Land
The 15th of January was a crazy day. I started out hacking on Fonty, thinking I'd get a release out by the end of the day but after a few hours the strong smell of smoke changed all that.

We live in the Fynbos (the Western Cape floral kingdom) at the foot of a mountain range. There was a hot wind blowing fast, the house was whistling at every small gap. The brush around us was lying horizontal in the wind and a pall of smoke wrapped around the mountain and quickly erased the sun -- it was twilight at twelve noon.

I saved my work, unplugged the computer and we started packing important things into our car. We had less than half an hour before we had to leave for breathing was not possible and we could see the fire pouring down the mountainside.

After that things took a few hours - the fire stretched in a long line along the mountain and the wind kept it there. The firemen (all volunteers) only had one hose for us and it was not long enough to reach the fire. We had to wait for it to come to us, and it did, rapidly.

Before I knew it, the smoke was a thick white world and my eyes were too sore to open. I staggered down the road (where I grabbed my camera and took some pics). The other fire fighters also backed-out and we said goodbye to our house and all our stuff.

The numbers were with us; the speed of the burn and the last few brave seconds of pouring water onto it gave the stats a twist and all we lost was a few windows - the flames could have burst inwards and torched the place, burning it from the wooden rafters, inside-out; but we got lucky.

Naturally, I do not attribute our good fortune to Odin, Zeus, The Flying Spaghetti Monster, Elron Hubbard, Mother Nature, Batman or anything similarly foolish. It was all down to chance and a lot of brave fire-fighting volunteers. Our sincerest thanks go out to them.

Several more hours were then spent with the firemen (and me and the half-melted garden hose) putting out glowing embers in the sizzling hot ash of the Fynbos. The ground is (even now, the next day) still burning underneath, out of sight. The fire that nearly got us was a direct relative of one that raged last week over three kilometers away. It woke up again and spread...

I finally got to sleep, in my smokey room, after 3 AM. I am glad my Internet is up and working. The phone lines all burned, I watched then light-up and fall, but I use a wireless connection and it was untouched - what a relief!

So, Fonty Python nearly met it's end in a melted heap. If we had not had enough time to get some vitals into the car...

Well, here are some photos of the event.

Oh, and Fonty version 0.3.4 will be out in a few days. I have layers of ash to clean from everything, including myself.
\d

Sunday, 13 January 2008

Fonty delays

Oh well, it's very boring, but I don't think Fonty Python will be released as a Debian package in the near future -- this is entirely due to my own ignorance of the issues involved with i18n and unicode.

It seems I have to write code to support the default "C" locale, which is ascii, and that conflicts (a lot) with the many different filenames given to fonts. I am suffering horrible unicode errors as a result and just can't say when I'll have it all sorted out.

You can still fetch and use the latest version, but you'll have to ensure that you set your locale to something based on utf8 for now.

I really need help on this, anyone up for clueing me in?

\d

Thursday, 10 January 2008

Fonty Python - release 0.3.3

Another day, another release - version 0.3.3
This release fixes a bug in the setup process that was horrible to behold. It also adds the Type1 algorithm mentioned in the last post. Hopefully this will work now (I have done my best to test it) and will include the metric files as appropriate to the kind of Type1 font chosen.
I have also added a clear button for quickly erasing the filter.

Fetch it from the usual link.

Busy blog this one, can't keep up with all the comments :-(

\d

Wednesday, 9 January 2008

Type1 changes coming in Fonty Python

So, I have been talking on the freetype list and I have a more-or-less algorithm to handle the vagaries of Type1 fonts. All that remains is to actually code and test it. The basic plan is:
Given a PFB or PFA font type (going by file extension for now) look for an accompanying AFM file. If found, use it. Else look for a PFM file. If found use it. If not, then just roll on through with only the PFB/FPA font file.

Right, time is all I need now...

\d

Fonty Python - Type1 issues

Type1 is a PITA
I got my first bug report today and that has led me to see that my code to handle Type1 fonts is more than a little fragile.

Right now, if you point it at .pfb files, then all should be well. I am trying to gather information about the other filetypes (like pfa and afm, pfm etc.) to see which ones I should bother with.

There will be a FP update once that's all done.

In the meantime, please let me have your error output as well as a listing of the folder/pog that caused the error. The more info I have about what you were doing when things went wrong, the better.
If fonts crash FP, you can also compress and send me the fonts that did the deed.

\d

Saturday, 5 January 2008

Fonty Python 0.3.2 update released


Fonty gets a tiny upgrade - version 0.3.2
I have changed the way the help files are stored so that they can now be localized. The setup.py file had to change a little too, but there are no radical changes to the way the app works. This is a 'help file only' update.

Dowload from here
\d

Friday, 4 January 2008

Python setup.py distutils tutorial

How to use distutils
I started this a year ago and just updated it a moment ago. There is a dearth of distutils (setup.py) information on the web and the Python docs are as clear as mud.

Here's the (new) link


I hope that helps someone out there :)

\d

Fonty Python 0.3.1 update


Update released - Fonty Python 0.3.1

A few fixes have been made:
  • Fixed img height/width bugs in help file. It scrolls smoothly now.
  • Fixed startup bug when last folder viewed no longer has any fonts.
  • Fixed some text in strings.
  • Improved the setup.py system to use i18n, strings and fpversion modules.
  • Added Italian translation (Thanks to Pietro Battiston.)
You can get it from Savannah

\d

Thursday, 3 January 2008

Blender water effect plugin

A few years ago I wrote a texture plugin for Blender that creates ripples on water (which can be tweaked in all kinds of ways). It still works in the newest versions of Blender and I have a page about it here:
http://wiki.blender.org/index.php/WaterPlugin

I would love to see more 'texture effects' in Blender. I think there is a lot of potential for new ideas there.

\d

Cairo Python Summary (tutorial in diagram form)



I have created an SVG file with illustrations that explain some of the basics of using Cairo to draw vector graphics. It’s a great library and well worth using. I am developing an animation engine (for Python) that relies on Cairo and I’ll blog about it soon.

You can fetch the file from here: Cairoglyphics

Please let me know what you think.

\d

Fonty Python 0.3.0 released



Fonty Python now supports TTF, OTF, Type1 and TTC fonts.


I don’t have a lot of time to develop and Fonty languished for most of 2007 before I could get a solid week to spend upgrading the code.
It now supports a wider range of fonts and has been localized. There are some teething problems with the language thing, and I am not sure that all the new fonts types will work properly - but it’s out as version 0.3.0.

You can go to: https://savannah.nongnu.org/projects/fontypython/ to get the app.

We also have a wiki on: webfactional

I have some questions (posted on the list) regarding i18n and how to manage the admin surrounding po/mo files as well as how best to bundle it all up into a release. I’m hoping for some input either on this blog or on the the mailing list: fontypython@googlegroups.com

\d

Incipit

First post, testing stuff.

Is Blogger going to be more useable than WordPress I wonder? That was waaaaay too slow and kept breaking. I liked it, but the speed was a real hassle. Blogger seems a lot more responsive so far.

The image system is horrible -
  1. There seems to be no way to fetch an image already uploaded (you have to craft your own src)
  2. You can't insert an image without an anchor (unless you make your own img tag),
  3. You can't use Picasa from Gnu/Linux. (I don't want to anyway.)

\d