Aug. 29, 2007
A little thing, like a greeting for a work done, help to live better!
Stay tuned
Technorati Tags: easy_e17, e17, enlightenment, freebsd
Posted by massi in Enlightenment, FreeBSD, Linux, Opensource | No Comments
Jul. 26, 2007
On yesterday evening i played a little with Subversion, I was looking for a way to do a post in my blog after a commit.
I knew that there’s post-commit hooks, but only email-related. So i’ve taken my Python, and i wrote this script that connects to XML-RPC service built-in in Wordpress (using xmlrpclib), and provide to create a new post that contains the commit’s message, and a list of affected files (by a call to svnlook).
The script is very easy and customizable, I hope it will be a launch for everyone.
Ah, i talked about it also in Google Project hosting user group, I hope that someone listen to me…
Here’s the code
#!/usr/bin/python
import sys
import xmlrpclib
import os
xmlrpc_url = "http://localhost/wp/xmlrpc.php"
xmlrpc_username = "admin"
xmlrpc_password = "admin"
post_title = "Commit log"
repos = sys.argv[1]
rev = sys.argv[2]
log_message = os.popen(’svnlook log ‘ + repos).read()
affected_files = os.popen(’svnlook changed ‘ + repos).read()
server = xmlrpclib.Server(xmlrpc_url)
server.metaWeblog.newPost(1,xmlrpc_username,xmlrpc_password,{”title”:post_title, “description”:”Message: ” + log_message + “Affetcted files: \n” + affected_files},bool(1))
Stay tuned
Technorati Tags: subversion, python, XML-RPC, post-commit hooks, wordpress
Posted by mcalamelli in Blog, Linux, Opensource, Python | No Comments
Jul. 25, 2007
Today i’ve had the need to get the dimension of a files, in hexadecimal format.
Tired to do cut&paste from calc to shell, i decided to get this info only from shell.
In a few minutes, just the time to read manpages, here’s that i’ve done.
Start
$ ls -l images/*
totale 12952
-rw-r--r-- 1 massi massi 11117611 2007-07-25 11:28 ramdisk.gz
-rwxr-xr-x 1 massi massi 193336 2007-07-25 10:43 redboot.bin
-rwxr-xr-x 1 massi massi 1930140 2007-07-25 10:41 zImage
Too many data, we’ll get less with awk
$ ls -l images/* | awk '{print $5}'
11117611
193336
1930140
Now data are ok, but there’s an empty line: i need an help from tail
$ ls -l images/* | tail -n +2 | awk '{print $5}'
11117611
193336
1930140
Ok, empty line is disappeared. Now i’ve only to play with awk fields.
$ ls -l images/* | tail -n +2 | awk '{printf("%s: %s(dec) %x(hex)\n", $8 ,$5 , $5)}'
ramdisk.gz: 11117611(dec) a9a42b(hex)
redboot.bin: 193336(dec) 2f338(hex)
zImage: 1930140(dec) 1d739c(hex)
Done!
Stay tuned
Technorati Tags: awk, tail, bash
Posted by mcalamelli in Linux, Opensource | No Comments
Jun. 7, 2007
Some days ago the update system of my Ubuntu 7.04 has notified to me the presence of upgrades availables, between which the kernel package and, as a good user, i’ve upgraded my system, and all it has gone well.
My PC is in dual boot mode, and it allows me to choose Ubuntu or FreeBSD (that resides on two different hd SATA) using Ubuntu’s bootloader, Grub.
Today, in order to test the latests commits on E17, i’ve tried to go on BSD, but the entry on Grub menu was disappeared!
Looking into /boot/grub folder i’ve seen a menu.lst~, a backup file probably created by the upgrade of kernel package, that contains the entries added by me: putting it into new menu.lst i’m able to start my favorite BSD flavour. Now there’s a copy of menu.lst on my ~…
Can the merging with a preexisting menu.lst be a interesting feature for Ubuntu?
Stay tuned
Posted by massi in Linux | No Comments
Jan. 30, 2007

Has you never seen a desktop so clean and stylish? Powered by e17!
Stay tuned




