Archive for May, 2007
Why did I bother?
As regular readers know, I’ve moved to the Paris region for my job.
I’ve rented a small but expensive flat near Sceaux…
Why did I bother?
I got the keys on Good Friday, moved in on Easter Monday, and left for the UK on the following Thursday. I got back a week or so later, for about ten days, and at the moment I’m down near Orléans every week, and away on weekends. I think that I’ve slept at home about 12 nights of the 50 odd since I’ve rented the flat.
What’s the point of paying the rent?
This is where I work
In French…
Printing a lot of .doc to .pdf
I had a problem. I needed to convert a bunch (118) of .doc (MSWord) files to PDF. This is how I succeeded.
First I installed a virtual pdf printer via cups, using instructions here: http://cuasan.wordpress.com/2007/03/…t-in-gnulinux/
Then the script I wrote:
for file in $*
do
ooffice -nologo -p $file
mv ~/PDF/firstline.pdf ~/${file/.doc/}.pdf
done
#we now exit the program
exit 0
I don’t currently have any real printer on my system, so the virtual printer (called virtualpdf) was the default. If that hadn’t been the case, I could I think have used the command
ooffice -pt virtualpdf $file
The mv just renames the file and puts it in the right place. All the files had an identical first line, and the virtual PDF printer uses that to create the filename. So without the mv line, you only get one file - the last one.
When I ran this, a couple of files were skipped (119 originals; 115 results). I’m not sure why. Also, there were a couple of rtf files in the original folder, and ooffice printed them with correct file names, so the mv command didn’t work. That wasn’t really a big problem, I just had to copy them over from ~/PDF/ afterwards.
As usual, I got help from the Ubuntu forums.
See the script page for the script.
Whatever!
Why was MTV France retransmitting the election debate between the two candidates?
And why did they stop transmitting about ten minutes before the end?
(this post is about MTV, not the election debate, which was, well, boring. I was watching Heroes…)