I needed to autoconnect to hotspot, but on a headless computer, running Debian (or Ubuntu) on which Wicd was installed. The closest solution I found was Autowifi, but it runs on GUI and uses Network Manager.
So I changed a few files, and also changed the plugins to make them work with the Hotspots around me.
It should still work in GUI, but you'd probably launch it in CLI (in a tmux session for example) so…
And that's it !
It's a one-time change, so I haven't created any SVN repository. The useful files are Here
There's a little warning when it start, complaining about a missing X session… no big deal.