... wollte ich ja etwas an GeoCC (GeoCacherContainer) weiterschreiben, meiner (noch) kleinen Geocaching-Anwendung, basierend auf Eclipse/RCP, Hibernate 4 und der H2-Datenbank.
Irgendwie ist daraus nur leider - fast - nix geworden, habe ich doch seit langen Jahren mal wieder einen Linux-Desktop installiert. In den letzten Wochen habe ich viel an (m)einem etwas betagten Dell Insprion 6000 verbracht. Ergänzt mit einem externen Monitor sind das wunderbare 1680x1050 ... zwei Mal nebeneinander. Herrlicz.
Die Wahl der Linux-Distribution ist ja eine Religion Wissenschaft in sich. Nach einem kurzen Abstecher zu Arch-Linux und einem flotten Test von Ubuntu mit Gnome3 - URGH - habe ich mich für das abgespeckte Lubuntu entschieden. Jetzt läuft hier seit Jahren mal wieder ein openBox und daneben spielt der LXDE-Desktop seine Rolle.
Damit bloggt es sich auch gleich ganz anders, irgendwie ... ;-)
Und gezockt wird an der Kiste sowieso nicht, dafür gibts unterm Dach passendes Equipment.
Achja, GeoCC:
- Eclipse installiert
- Source ausgecheckt
- Linux-SWT in die Launch-Configuration gepflegt
- läuft
Screenshot gefällig? Bitte sehr: 
1000!
As usual, I'm a bit different. Especially when it comes to the tools I use.
Therefor I use alpine as my mail-client. The only thing missing were my contacts. I'm an Android guy so all my contacts are stored at Google. Being a bit bored tonight I googled ... and found that:
pull_contacts.py
#!/usr/bin/python
"""Module for pulling contacts out of Google and storing them to disk
(or something).
See the official guide for a more in-depth look at GData Python
http://code.google.com/apis/contacts/docs/1.0/developers_guide_python.html
"""
import atom
import gdata.contacts
import gdata.contacts.service
import getpass
import sys
def printFeed(feed):
for entry in feed.entry:
nick = ""
name = entry.title.text
for x in entry.extended_property:
if x.name == 'NickName':
nick = x.value
for email in entry.email:
print('%s\t%s\t"%s" <%s>' % (nick, name, name, email.address))
def main(args):
def usage():
print("""usage: pull_contacts.py <email>
""")
if len(args) < 1:
usage()
exit(1)
gd_client = gdata.contacts.service.ContactsService()
gd_client.email = args[0]
gd_client.password = getpass.getpass()
gd_client.source = "abstractbinary.org-pull_contacts-1"
gd_client.ProgrammaticLogin()
query = gdata.contacts.service.ContactsQuery()
query.max_results = 1000
contacts = gd_client.GetContactsFeed(query.ToUri())
printFeed(contacts)
if __name__ == "__main__":
main(sys.argv[1:])
Usage
On CentOS add the RPMforge-repository and install python-gdata.
After that you are able to run the script, providing your google-mail as only parameter.
$> ./pull_contacts.py foo@gmail.com >> ~/.addressbook
I have been struggling with this for a while now, not being sure where to start with it. What I wanted was pretty simple: If a mail comes in that matches some criteria, forward it to some script
Shouldn't be that difficult. First researches showed that Sieve, the common filter language used with Cyrus, isn't - by default - able to pipe emails into scripts. My current MTA is Exim and I discovered that I can do some filtering with the .forward file.
All I had to do was enabling the needed router in my exim.conf.
Enable userforward router
userforward:
driver = redirect
check_local_user
local_part_suffix = +* : -*
local_part_suffix_optional
file = $home/.forward
allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
Define some filter
As you can see, the file in question is $HOME/.forward. It needs to be readable by the exim-process, so check the permissions.
My task was to react to an email-hook defined to one of my github-repositories. When something is pushed into the repository an email gets send to a defined adress, like me+commit@mydomain.local. I wanted to set my filter to parse all mails containing +commit in the to-field of the header.
.forward example
#Exim Filter
if $h_to contains +commit
then
pipe "/path/to/script/commit.sh"
deliver buk
endif
There are two actions in that script:
pipe: inputs the complete mail into the script
deliver: delivers the mail to the users mailbox, additional filtering may be done here, for example with sieve
... and thats it
The sript you pipe the mail to has to read it from stdin. The data includes the header as well as the body. Any output the script generates will be send back to the sender of the original mail, so be careful to catch all errors that might happen.
What will happen here is the generating of this website if something is pushed into the master-branch.
The script will checkout the source of the master-branch and call jekyll to create the site and publish it.
How that gets done will be part in a later post. Have fun.
Other sites that helped
Schon eine Weile war mir die Pflege unseres Blogs, basierend auf Wordpress und all seinen Mitbringseln, eher ein Klotz am Bein. Fast regelmäßig neue Updates, Plugins prüfen und einspielen. Einfach ein Haufen Arbeit. Ohne wirklichen Effekt ...
Die Weboberfläche von WP mag ja schön und gut sein, aber das Geklicker für ein bisschen Web ist schon herbe. In Kombination mit einem, für mich, seltsamen Webeditor war nicht gerade förderlich die Blog-Motivation.
Irgendwie stolperte ich die Tage dann über einen Artikel der sich mit "Static Website Generators" befasste, die Neugier war geweckt. Ein wenig googlen ... alles Ruby ... YUGH!
Gut, es gibt auch Phrozn, eine PHP-basierte Variante, die Ruby-Teile sind aber durchaus verbreiteter. Die ich weder von Ruby noch sonstwie in der Ecke Erfahrungen hatte hab ich mich auch der Einfachheit halber für Jekyll entschieden. Einer der verbreitesten Anwendungen in dieser Ecke.
Nach ein wenig händischer Frickelei (make && make install ;)) zur Installation von Ruby und der Installation der nötigen Gems war auch Jekyll flott am Laufen. Wobei laufen tut da ja recht wenig, es generiert ja nur mal eben, wenn man es ihm sagt.
Ok, es generierte also, fein.
Via Github habe ich mir dann noch ein Template von TJstein geclont und ein wenig angepasst.
Wie das Ergebnis jetzt aussieht kann man hier erkennen, gebloggt habe ich hiermir auch mal wieder. Ganz einfach, mit vim und ohne viel Webgefuddel. Und versionskontrolliert ist das jetzt auch alles, hier zu finden.