WA5ZNU
Tuesday, October 28, 2008 Zulu
 
twitter QST
I've been using twitter with fldigi scripts, using a small python program called twiqster:
#!/usr/bin/python

import twitter
from ConfigParser import ConfigParser
from lxml import etree
import os
import sys
import gtk

def twiq(text):
    config = etree.parse(os.path.expanduser("~/.twiqster.xml")).getroot()
    assert config.tag == "twiqster"
    CALLSIGN=config.findtext("callsign")
    PASSWORD=config.findtext("password")
    api = twitter.Api(username=CALLSIGN, password=PASSWORD)
    return api.PostUpdate(text)

def showMessage(message):
    pass

showMessage(twiq(sys.argv[1]))
Here's the .twiqster.xml file format:
<twiqster>
  <callsign>YOUR CALL OR TWITTER ID HERE</callsign>
  <password>YOUR PASSWORD HERE</password>
</twiqster>
Then I use this fldigi script called fldigi-twiqster:
#!/bin/sh
twiqster "In #QSO with $FLDIGI_LOG_CALL ($FLDIGI_LOG_NAME) \
   on $FLDIGI_LOG_FREQUENCY $FLDIGI_MODEM \
  (`distance $FLDIGI_LOG_LOCATOR` mi from $FLDIGI_MY_LOCATOR): \
  $FLDIGI_LOG_NOTES"
and invoke it with this fldigi macro:
<EXEC>fldigi-twiqster</EXEC>
The "distance" program comes from bearing and distance, also in Python.
- posted by Leigh @ 22:18 z
Comments: Post a Comment

<< Home

Powered by Blogger ATOM