First a huge announcement: I will not release anything tomorrow. For the first time in 6 weeks, no friday release from me!
Now, let's see what I'm planning.
I will be at LatinoWare 2008 speaking about PyQt. The usual free beer offer: if you mention this blog, I will buy you 1 (one) not very good beer. Being in Brazil, that's probably a Brahma.
rst2pdf development is slowing down. The easy stuff is all done. There are some things I can do, though:
However, I am taking a little time off from it, and going to try reviving other projects. Focusing in rst2pdf for two months did wonders for it. Let's see if it can be repeated!
Try some more code golfing. I helped Nubis from PyAr reach the lowest-score of 74 in the grid challenge. This is really fun stuff.
I need more money. We have spent lots in ... plumbing. Yup. Two years of savings spent on that. So, I need money. If you read this blog and want to make me happy, get me freelance work. It can be sysadmin stuff, it can be programming, it can be babysitting. I am good at all three things. Contact me. I'm easy to find, and I am cheap(ish).
No, I am not starving. No, I am not in money problems. Yes, my company is doing very well, but it's an investment, not a cash cow (yet).
I spent a few hours today round Code Golf and here's a neat thing I did.I think this is python's shortest possible factorial:
f=lambda x:x<2or x*f(x-1)
You may say it's not correct, because f(1) returns True, but int(True) is 1, so it's almost there ;-)
And here's a surprisingly readable (as long as you know pascal's triangle) and not too long answer to their choose challenge:
n,k=input() a,c=1,0 while c<k:a*=n-c;c+=1;a/=c print a
Well, what the title says. Get it at the usual places. No, it doesn't require actual LaTeX. Just Matplotlib.
If I manage to make it work well: Math!
Here's how it looks:
It does not require TeX. It is not an image. It does require external software, and it does require you to write TeX syntax.
If you are a reportlab user: this is a platypus flowable.
As usual, it's not me that's doing the heavy lifting. I am just good at using other tools.
With a little luck, it should be usable this friday.
I announced it on all other places except here: rst2pdf 0.8.1 is out. What's new?
Get it at the usual place
Of course I could be misunderstanding this, but it seems they included uRSSus 0.2.10 in a DVD for some reason :-)
The link and I will not make a "in soviet russia" joke.
So, I failed to release uqbar this week. However, I am releasing rst2pdf 0.8, with SVG support! Get its vectorial goodness from http://rst2pdf.googlecode.com
I just committed into trunk of rst2pdf a nicely working SVGImage flowable for reportlabs.
The code is self-contained in two files:
You can use them in your app if you want (I'd like to know, though). One of them is GPL/LGPL (it's basically copied from uniconvertor) the other is MIT-Licensed.
The output is astonishing: svg.pdf is only 32KB and completely resolution-independent. Graphics in your PDF That look good printed and on screen! And are not huge! Yay!
This will be the flagship new feature in tomorrow's rst2pdf 0.8.
One of the big limitations of reportlab is that it has no support for vector-based images. You can't insert SVG, EPS or any other vector-based format in your documents.
Until now.
By hijacking another app called uniconvertor, I have managed to insert as vectors SVG images in a reportlab document.
Here's the hackish code:
import sys,os from app.io import load from app.plugins import plugins import app from reportlab.platypus import * from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.units import inch app.init_lib() plugins.load_plugin_configuration() class SVGImage(Flowable): def __init__(self,imgname): self.doc = load.load_drawing(imgname) for k in dir(self.doc): print k self.saver = plugins.find_export_plugin(plugins.guess_export_plugin(".pdf")) Flowable.__init__(self) def wrap(self,aW,aH): br=self.doc.BoundingRect() return br[2],br[3] def drawOn(self,canv,x,y,_sW=0): canv.translate(x,y) self.saver (self.doc,".ignoreme.pdf",options={'pdfgen_canvas':canv}) os.unlink(".ignoreme.pdf") styles = getSampleStyleSheet() def go(): doc = SimpleDocTemplate("phello.pdf") Story = [Spacer(1,2*inch)] style = styles["Normal"] p = SVGImage('warning.svg') Story.append(p) doc.build(Story) go()
It has several problems (see where the second paragraph ended), but it does work.
To run it, you need a warning.svg file (edit as needed) and you run it this way (replacing the path as proper for your setup):
PYTHONPATH=/usr/lib/python2.5/site-packages/uniconvertor/ python use_uniconv.py
In fact, this is not limited to SVG files. You should be able to use the following formats:
I had one too many problems with kmail from KDE4 in my eee with Kubuntu, and sylpheed-claws is just unusable in a small screen (the huge widgets! the non-hidable things all over the interface!) I decided to get old fashioned and try a console mail reader.
I was a pine user for many years, and a mutt user for a while, and I was deeply disappointed that the last three years have been bad for these programs.
Just because you run in a terminal, there's no reason to be hard to configure! After spending 20 minutes trying to get a decent IMAP account setup (just two IMAP accounts) in alpine and another 10 wondering if mutt really had no place in the UI for account configuration (and whether the Debian/KUbuntu default "commented" config file is the product of hard drugs), I tried Cone.
It was bliss. It was all I remembered from pine years ago (on local accounts) only over IMAP.
Easy to configure, easy to use, quick, capable. I was in love all over again.
While I will keep using KMail on my main notebook under Arch Linux where I had no reliability problems whatsoever, I have Cone configured in my server's shell account and in the eee.