Archive for the ‘Opensource’ Category

May. 12, 2008

Secondo appuntamento relativo a SciTE, non previsto inizialmente, ma necessario per descrivere come poter gestire al meglio API e keywords in un progetto che utilizza le EFL.
Nel post precedente l’indicazione di quale file API utilizzare veniva fatta tramite il file .SciTEUser.properties , ma questo modo non mi sembra troppo “pulito”, infatti la necessità di caricare diversi file API potrebbe rendere meno chiaro il file di configurazione stesso; e ancora peggiore sarebbe l’impatto per le keywords (per ottenere l’highlight delle funzioni): il file cpp.properties conterrebbe così un lunghissimo elenco di funzioni, e chiarezza e leggibilità andrebbero a farsi benedire.
Inoltre, cosa ben più grave, le modifiche ai file del pacchetto base (cpp.properties nel dettaglio, e SciTEGlobal.properties nel caso delle configurazioni di stile) potrebbero andare perse in caso di aggiornamenti di SciTE.
E allora cosa si puo’ fare?
Niente di piu’ semplice, utilizzare la capacità di SciTE di sovrascrivere le varie impostazioni dal basso verso l’alto, partendo dal file SciTE.properties fino ad arrivare al file SciTEGlobal.properties.
Nel dettaglio, i files interessati sono i seguenti, in ordine di overriding:
il file SciTE.properties (posizionato nella directory del file che si sta editando) sovrascrive il file SciTEDirectory.properties (posizionato o nella directory del file che si sta editando oppure nella directory superiore), che sovrascrive il file .SciTEUser.properties (posizionato nella propria homedir), che sovrascrive il file SciTEGlobal.properties (in Ubuntu presente nella directory /usr/share/scite).
E’ chiara la possibilità di realizzare un sistema che permette, tramite i file SciTE.properties oppure SciTEDirectory.properties, di caricare i file API e l’elenco di keywords relativi alla EFL che si usa realmente.

Happy coding e alla prox

Posted by massi in Enlightenment, Linux, Opensource | No Comments

Sono riuscito a trovare la pace dei sensi del programmatore, ovvero l’editor definitivo?
In realtà penso di no, però dopo quest’ultimo periodo di test è garantito il fatto che Scite abbia guadagnato un sacco di punti!
Non sono proprio alla prima esperienza con Scite, ma il precedente incontro (circa un anno addietro) non ha portato a niente di interessante. E ora cosa è cambiato??
Premessa
Gli editor che uso maggiormente sono EditPlus sotto Windows, mentre per Linux sono un appassionato fans di (g)vim e gedit. Il fattore scatenante che mi ha portato alla ricerca di qualcosa di completamente diverso, citando i Monty Python, è stata la scoperta del supporto ai temi, disponibile sia per gvim che per gedit, ma non per EditPlus: ho scoperto di prediligere i temi cosidetti “dark”, li trovo meno stancanti per gli occhi.
Il fatto di non poter disporre di un medesimo supporto visuale in Windows mi ha disturbato un pò (lo so che gvim c’è anche per Windows, e che anche gedit stesso può essere compilato per win32, ma a volte sono proprio pigro…), e la visione di diversi screenshot e screencast di Textmate (veramente figo!), mi ha spronato alla ricerca di qualcosa di nuovo e possibilmente unificato in modo da limitare i capogiri passando da un sistema all’altro.
E come avrete capito in Scite ho trovato quello che cercavo.
Le possibilità di personalizzazione si spingono veramente in dettaglio e permettono un controllo pressochè totale dell’editor, anche per ciò che riguarda l’aspetto estetico.

Ecco di seguito un paio di screenshot, uno per Windows e uno per Linux, in modo da evidenziare l’aspetto molto simile:

Read the rest of this entry »

Posted by mcalamelli in Enlightenment, Linux, Opensource, Windows | 3 Comments

Dopo un lungo periodo di gestazione, finalmente e’ venuto alla luce questo post, che personalmente reputo molto interessante (ma va??).
Come introdotto dal titolo, espongo uno scenario di uso che mostra come poter integrare Subversion con lo sviluppo e il mantenimento della nostra web application. Nel dettaglio, con web application intendo un applicativo PHP installato in diversi server di produzione: quindi, un punto di sviluppo, tanti punti di utilizzo.
Bene, ipotizziamo ora il workflow per l’installazione per un nuovo cliente: connessione remota verso il server, quindi decompressione (se abbiamo una tarball o un archivio compresso) oppure copia (nel caso di singoli files), niente di trascendentale, quindi; il discorso si complica nel caso in cui ci accorgiamo che il nostro prodotto contiene un bug, oppure se abbiamo apportato modifiche interessanti allo stesso, e in questo caso dobbiamo operare a mano nelle n installazioni, con il rischio di sbagliare/dimenticarsi qualcosa.
E’ qui che Subversion viene in nostro aiuto per realizzare una specie di sistema di installazione/aggiornamento automatizzata di tipo “push” (spero che il termine sia giusto).

Read the rest of this entry »

Posted by mcalamelli in Linux, Opensource, PHP, Python | 2 Comments

Aug. 29, 2007

A little thing, like a greeting for a work done, help to live better!

Stay tuned

Technorati Tags: , , ,

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: , , , ,

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: , ,

Posted by mcalamelli in Linux, Opensource | No Comments

Using Firebug, i’ve easily done some modifications to my Wordpress theme, reducing the font size of posts and increasing the area available for these. On closing, here’s a Firebug screencast.

Stay tuned

Updated! Now the screencast link works… Thanks Daniele!

Technorati Tags: ,

Posted by massi in Blog, Opensource | 1 Comment

The development of Sylpheed has restarted, it runs very fast.
At 29 of january it was released the 2.4.0.beta1, the first bete release for 2.4.0 series. The changelog is very short, at least eight changes between new features, improvements and bug fixes. It is a beta version, but it runs well and fast, and helps to manage the amount of emails that comes to me daily.

Stay tuned

Posted by mcalamelli in Opensource, Windows | No Comments

Jan. 30, 2007


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

Stay tuned

Posted by massi in Enlightenment, FreeBSD, Linux, Opensource | No Comments

Jan. 30, 2007

With this post I would try the capabilities of wBloggar, a tool for blog’s handling

Posted by massi in Opensource, Windows | No Comments

UA-260904-1