del.icio.us link dumps

I was thinking about the ways of integrating my Delicious bookmarks with my blog lately. I didn’t want to syncronize my bookmarks into WordPress links. And I didn’t want to create an RSS link list either. I had it before and it didn’t prove useful. Finally, I think the best way to integrate the two is in the form of daily link dumps, which will be regular posts featuring a list of bookmarks I made during the day. This way it will be simple, static, and automatic.

I didn’t have to spend a lot of time looking for (or, dare I to mention, write) the appropriate script. The one was available here. With small modifications I guess it will do the job.

Let me know if the dumps will get too annoying and I will switch them to private posts.

Update: You can get my version of the script by clicking on yadd.php. My changes are as follows:

  • Added WordPress post statut configuration variable. Originally, the script was publishing post. With the configuration variable it is easy to make script create drafts or private posts.
  • Integrated the patch by Zach Paine which prevents the creation of empty posts on those days when no links were posted to Delicious .
  • Made the Extended field to be only printed when it is non-empty.
  • Added optional tag linking. The variable $tag_link is about 10 lines below the rest of configuration because I didn’t bother to spend any more time on the script. Set the variable to 'yes' for the script to link tags. Otherwise it will leave them in plain text which was the original behavior.

Changing the world view with fonts

Somehow I ended up at KDE Look website today. I’ve got a bunch of stuff installed from there, but most noticably lots and lots of fonts. If you are not in the mood for searching, here is the link to Microsoft core True Type fonts and here is the link to the package with 6,760 True Type fonts. You will never need another font in your life. And there’ll be plenty left for your kids and grandkids.

After I installed all these fonts, the world looks and feels different. I’ll have to get used to it. At least in the browser.

Telling Gnu Arch the truth

Yet another problem (and solution) that I’ve stumbled across while using Gnu Arch. We have two branches in our archive: program--vendor--0.1 and program--local--0.1. Vendor’s version has all the source files in SomeDirectory, while our local version has all source files in somedir. Except for the name and few local changes, these two directories are practically identical.

But when we were creating branches and importing code, we weren’t very careful and ended up with these directories and files having different arch IDs. This makes comparing two source trees close to impossible, as arch thinks that directory SomeDirectory was removed together with all its content and directory somedir was added together with a bunch of files.

Telling Arch the truth is very simple. Basically, all that needs to be done is =id and *.id files under all .arch-ids/ directories in one source tree should be copied to the appropriate places in the other source tree. After that tla commit should be done.

In order to minimize the pain of manual labour, I wrote a tiny perl script to find all needed files and copy them appropriately. On the command line just specify two directories, which you know are the same, but which arch considers different. If any of the files weren’t copied, you’ll get their names in the warning. When script finishes, you’ll get the total count of copied files.

The script is here: fix_arch_ids.pl

Sending bulk HTML emails with perl

First of all, I have to warn you that using HTML in emails is almost always inappropriate. Use plain text. If you have to send HTML, than send it as an attachment.

For those cases, where HTML message has to be sent and there is no choice in the matter, here is a small perl script – send_html_mail.pl

Edit a few lines at the beginning of the file to suit your needs. From address and Subject line must be changed. Locactions of two files – list of recepients and the body of the message – can be either specified on the command line or will be taken from default values hardcoded in the script.

Run the script as:

send_html_mail.pl message.html recepients.txt

If you changed the location of data files or if you are using defaults, than you don’t have to pass any arguments to the script.

List of recepients is expected to be a comma separated list of names and emails. An example file could look like this:

You There,[email protected]
Him Somewhere,[email protected]

Message body file should contain all your HTML, CSS, JavaScript and whatever else is that you want to send. Here is an example file for you:

<HTML>
<BODY>
<H1>Hi there!</H1>
<DIV>This is an HTML message.</DIV>
</BODY>
</HTML>

It is easy to change the script to send plain text messages instead of HTML. Just change the line that specifies Content-Type as “text/html” to “text/plain”.

Fedora Linux Core 4 is out!

I know that everyone is waiting for it, so I’ll break out the good news – Fedora Linux Core 4 is out. I am currently downloading it from one of the mirrors, but the speed is dicreasing. Hopefully I’ll have it before everything stops completely. I will upload all 4 CDs to Thunderworx FTP as soon as I have them. Meanwhile, you can read the Release Notes.

Update: Fedora Linux Core 4 is available via bittorrent.

Update: Official announcement.

Update: Fedora Linux Core 4 ISOs are uploaded to Thunderworx FTP. You can get them from here.