Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Beginning an implementation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 50 of 66 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam Curry  
View profile  
 More options Feb 13 2007, 11:55 am
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 16:55:54 +0000
Local: Tues, Feb 13 2007 11:55 am
Subject: Re: Beginning an implementation

It Worked. The results of script1:

~ $ python script1.py
--------------
Show details:
blogid:   1392
url:      http://www.podshow.com/shows/?show_id=1392
BlogName: Perversion For Profit
--------------
--------------
Show details:
blogid:   1517
url:      http://www.podshow.com/shows/?show_id=1517
BlogName: Hidden Desires
--------------
--------------
Show details:
blogid:   3531
url:      http://www.podshow.com/shows/?show_id=3531
BlogName: Gillmorless
--------------
--------------
Show details:
blogid:   6701
url:      http://www.podshow.com/shows/?show_id=6701
BlogName: Free Trinity
--------------
--------------
Show details:
blogid:   204
url:      http://www.podshow.com/shows/?show_id=204
BlogName: DevCast
--------------
--------------
Show details:
blogid:   146
url:      http://www.podshow.com/shows/?show_id=146
BlogName: Charlie Chat
--------------
--------------
Show details:
blogid:   1939
url:      http://www.podshow.com/shows/?show_id=1939
BlogName: Adam's Family
--------------
--------------
Show details:
blogid:   21
url:      http://www.podshow.com/shows/?show_id=21
BlogName: Adam Curry's Daily Source Code
--------------
~ $

For testing purposes, I will be using:

Show details:
blogid:   204
url:      http://www.podshow.com/shows/?show_id=204
BlogName: DevCast

AC

On 2/13/07, Adam Curry <a...@podshow.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 13 2007, 12:09 pm
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 17:09:45 +0000
Local: Tues, Feb 13 2007 12:09 pm
Subject: Re: Beginning an implementation

Hmm, looks like I'm missing a parameter, here's the output:

~ $ python script2.py
Reading and Base64 encoding file...
done, ready to upload...
Show info to upload:
My first Show directly through the interface
A Random Podcast
None
false
<html><body>My first upload through this interface in a quite naked
way.</body></html>
Tue, 13 Feb 2007 17:06:59

Uploading show
Traceback (most recent call last):
  File "script2.py", line 46, in <module>
    blogid.login, blogid.pwd, uploadInfo)
  File "/usr/lib/python2.5/xmlrpclib.py", line 1147, in __call__
  File "/usr/lib/python2.5/xmlrpclib.py", line 1431, in __request
  File "/usr/lib/python2.5/xmlrpclib.py", line 1080, in dumps
  File "/usr/lib/python2.5/xmlrpclib.py", line 623, in dumps
  File "/usr/lib/python2.5/xmlrpclib.py", line 635, in __dump
  File "/usr/lib/python2.5/xmlrpclib.py", line 716, in dump_struct
  File "/usr/lib/python2.5/xmlrpclib.py", line 635, in __dump
  File "/usr/lib/python2.5/xmlrpclib.py", line 639, in dump_nil
TypeError: cannot marshal None unless allow_none is enabled
~ $

AC

On 2/13/07, Adam Curry <a...@podshow.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 13 2007, 12:13 pm
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 17:13:46 +0000
Local: Tues, Feb 13 2007 12:13 pm
Subject: Re: Beginning an implementation

Looks like the mimetype, called by:  mimetypes.guess_type
(uploadInfo['name'])[0]

Can I hardcode this with the correct mimetype for mp3?

AC

On 2/13/07, Adam Curry <a...@podshow.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar Koeroo  
View profile  
 More options Feb 13 2007, 12:16 pm
From: "Oscar Koeroo" <okoe...@gmail.com>
Date: Tue, 13 Feb 2007 18:16:44 +0100
Local: Tues, Feb 13 2007 12:16 pm
Subject: Re: Beginning an implementation

Hi AC,

2007/2/13, Adam Curry <a...@podshow.com>:

> It Worked. The results of script1:

> ~ $ python script1.py

[...bunch of results, you've got a lot of shows PodFather :-)...]

> For testing purposes, I will be using:

> Show details:
> blogid:   204
> url:      http://www.podshow.com/shows/?show_id=204
> BlogName: DevCast

> AC

The second script should be then:

---- Begin of script two ----
import xmlrpclib, mimetypes, base64, datetime

PODSHOW_SERVER_ENDPOINT = 'http://www.podshow.com/xmlrpc/pdn'
class blogid : pass
blogid.login = "<usern...@domain.tld>"
blogid.pwd   = "<my secret>"
blogid.id    = "204"

# local file to upload
filename = "tranny.mp3"

print "Reading and Base64 encoding file..."
edata = base64.encodestring(open(filename, "rb").read())
print "done, ready to upload..."

# Connect to the PDN
s=xmlrpclib.Server(PODSHOW_SERVER_ENDPOINT)

# Compile Show notes and stuff like that
uploadInfo=dict()
uploadInfo['title'] = "My first Show directly through the interface"
uploadInfo['name'] = "tranny.mp3"
uploadInfo['type'] = mimetypes.guess_type(uploadInfo['name'])[0]
uploadInfo['bits'] = edata
uploadInfo['isExplicit'] = "false"
uploadInfo['description'] = "<html><body>My first upload through this
interface in a quite naked way.</body></html>"
uploadInfo['pubDate'] = datetime.datetime.now().strftime("%a, %d %h %Y
%H:%M:%S")

class Result: pass
r = Result()

print "Show info to upload:"
print uploadInfo['title']
print uploadInfo['name']
print uploadInfo['type']
#print uploadInfo['bits']
print uploadInfo['isExplicit']
print uploadInfo['description']
print uploadInfo['pubDate']

print
print "Uploading show"
r.string, r.string = s.metaWeblog.newMediaObject(blogid.id,
blogid.login, blogid.pwd, uploadInfo)
print r
---- End of script two ----

And it will probably result in the same error  :-(

I think somebody at Podshow HQ should see some error messages in the server
logs. I hope to understand what to fix.

cheers,

    Oscar

ps: Ow nice, a new DSC #545, with geeky notes :-)

On 2/13/07, Adam Curry <a...@podshow.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 13 2007, 12:22 pm
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 17:22:45 +0000
Local: Tues, Feb 13 2007 12:22 pm
Subject: Re: Beginning an implementation

Yeah, I had already put in "204"

Looks like the mimetype 'None' isn't allowed, whatshould the mimetype be?

Added Andrew Grumet to the list, he's pretty busy today, but when he has
time he'll check logs and help I'm sure.

AC

On 2/13/07, Oscar Koeroo <okoe...@gmail.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
topdeadcenterpodc...@gmail.com  
View profile  
 More options Feb 13 2007, 12:26 pm
From: topdeadcenterpodc...@gmail.com
Date: Tue, 13 Feb 2007 17:26:44 +0000
Local: Tues, Feb 13 2007 12:26 pm
Subject: Re: Beginning an implementation
RSS is "audio/mpeg", would that be what you need?

Scott

Sent from my BlackBerry® wireless device  


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 13 2007, 1:19 pm
From: "Oscar" <okoe...@gmail.com>
Date: Tue, 13 Feb 2007 18:19:21 -0000
Local: Tues, Feb 13 2007 1:19 pm
Subject: Re: Beginning an implementation
Dead on! An Mp3 file has a MIME-type of "audio/mpeg"

My example requires the file to me locally available to be uploaded.
Usually the mimetypes module (default in Python) should return the
guess of the actual mimetype (it works on my computer).

Maybe Python 2.5 is a bit different (I'll upgrade here).

Where my script says:
uploadInfo['type'] = mimetypes.guess_type(uploadInfo['name'])[0]

You can change that to:
uploadInfo['type'] = "audio/mpeg"

   Oscar

ps: I'll be reading and learning ahead about the Atom specs :-)
pss: I must say, enthousiasm kicks ass when trying new stuff!

On 13 feb, 18:26, topdeadcenterpodc...@gmail.com wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 13 2007, 1:34 pm
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 18:34:35 +0000
Local: Tues, Feb 13 2007 1:34 pm
Subject: Re: Beginning an implementation

Still getting errors on the upload, I think we need to use the namespace as
well. A bit above my scripting knowledge I'm afraid :)

http://developer.podshow.com/apis/pdn/authoring/

On 2/13/07, Oscar <okoe...@gmail.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 13 2007, 12:28 pm
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 17:28:51 +0000
Local: Tues, Feb 13 2007 12:28 pm
Subject: Re: Beginning an implementation

Yeah, I just made this change:

# uploadInfo['type'] = mimetypes.guess_type(uploadInfo['name'])[0]
uploadInfo['type'] = "audio/mpeg"

And the upload seemed to go through, but (presumably) at the endo fo th
eupload it threw an error:

~ $ python script2.py
Reading and Base64 encoding file...
done, ready to upload...
Show info to upload:
My first Show directly through the interface
A Random Podcast
audio/mpeg
false
<html><body>My first upload through this interface in a quite naked
way.</body></html>
Tue, 13 Feb 2007 17:24:13

Uploading show
Traceback (most recent call last):
  File "script2.py", line 47, in <module>
    blogid.login, blogid.pwd, uploadInfo)
  File "/usr/lib/python2.5/xmlrpclib.py", line 1147, in __call__
  File "/usr/lib/python2.5/xmlrpclib.py", line 1437, in __request
  File "/usr/lib/python2.5/xmlrpclib.py", line 1201, in request
  File "/usr/lib/python2.5/xmlrpclib.py", line 1340, in _parse_response
  File "/usr/lib/python2.5/xmlrpclib.py", line 787, in close
xmlrpclib.Fault: <Fault 800: "We're sorry but we were unable to process this
request.">

On 2/13/07, topdeadcenterpodc...@gmail.com <topdeadcenterpodc...@gmail.com>
wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 13 2007, 12:50 pm
From: "Adam Curry" <a...@podshow.com>
Date: Tue, 13 Feb 2007 17:50:42 +0000
Local: Tues, Feb 13 2007 12:50 pm
Subject: Re: Beginning an implementation

btw, just wanted to mention how excited I am about this script. Th
epossibilities start to stack up, once I can get the media onto the N800, I
can auto upload it! Very cool.

AC

On 2/13/07, Adam Curry <a...@podshow.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 14 2007, 3:33 am
From: "Oscar" <okoe...@gmail.com>
Date: Wed, 14 Feb 2007 08:33:21 -0000
Local: Wed, Feb 14 2007 3:33 am
Subject: Re: Beginning an implementation
I think that the N800 is such a powerfull platform.

I'm doing this typing and testing to
a.) contribute a valueable cause of this project
b.) learn more about the tin-foil hat side of new media (and all the
techniques)
c.) learning the snakes language along the way
d.) and understand that the possibilities are endless
e.) get myself wanting to own a N800

And my newest reason is the battle of the minds with the Prolific
Programmer :-)
All in the good sense of mind of course. I'm distributed computering
security systems programmer and I just love community work.

I'll fiddle and test some more.

cheers

On 13 feb, 18:50, "Adam Curry" <a...@podshow.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 14 2007, 3:41 am
From: "Oscar" <okoe...@gmail.com>
Date: Wed, 14 Feb 2007 08:41:24 -0000
Local: Wed, Feb 14 2007 3:41 am
Subject: Re: Beginning an implementation
Geo tagging covert:

Prolific Programmer has applied the how to from the Yahoo example
here:
http://prolificprogrammer.com/blog/2007/02/12/automatic_geotagging_of...

Nice :-)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 14 2007, 4:12 am
From: "Oscar" <okoe...@gmail.com>
Date: Wed, 14 Feb 2007 09:12:58 -0000
Local: Wed, Feb 14 2007 4:12 am
Subject: Re: Beginning an implementation
Hi AC,

Thanks to Andrew Grumet's email reply I only needed to alter a tiny
part of the line and *BOOM* it works.
I've been able to upload my Mp3 file and download and play it from the
Podshow.com website (== equals cool!)

Try this script, it will replace script Number 2. The first is still
needed to select the show you wish to use.

---- begin script 2 ----
import xmlrpclib, mimetypes, base64, datetime

PODSHOW_SERVER_ENDPOINT = 'http://www.podshow.com/xmlrpc/pdn' #
According to Andrew Grommet

class blogid : pass
blogid.login = "okoe...@hotmail.com"
blogid.pwd   = "<my secret>"
blogid.id    = "204"

# local file to upload
filename = "tranny.mp3"

print "Reading and creating binary object from file..."
#edata = base64.encodestring(open(filename, "rb").read())
edata = xmlrpclib.Binary(open(filename, "rb").read())
print "done, ready to upload..."

# Connect to the PDN
s=xmlrpclib.Server(PODSHOW_SERVER_ENDPOINT)

#Create uploadInfo (with MIME/Type forced to "audio/mpeg"
uploadInfo=dict()
uploadInfo['title'] = "My first Show directly through the interface"
uploadInfo['name'] = "tranny.mp3"
uploadInfo['type'] = "audio/mpeg"
uploadInfo['bits'] = edata
uploadInfo['isExplicit'] = "false"
uploadInfo['description'] = "<html><body>My first upload through this
interface in a quite naked way.</body></html>"
uploadInfo['pubDate'] = datetime.datetime.now().strftime("%a, %d %h %Y
%H:%M:%S")

#class Result: pass

print
print uploadInfo['title']
print uploadInfo['name']
print uploadInfo['type']
#print uploadInfo['bits']
print uploadInfo['isExplicit']
print uploadInfo['description']
print uploadInfo['pubDate']

print
print "Uploading show"
upload_result = s.metaWeblog.newMediaObject(blogid.id, blogid.login,
blogid.pwd, uploadInfo)

print "Url of the media:  " +  upload_result['url']
print "Post ID :          " +  upload_result['postid']
---- end script 2 -----

share and enjoy!

Cheers,

      Oscar - The Grid Security Nerd - Koeroo

special thanks to Andrew G. of course for the minor but important fix.

On 13 feb, 18:28, "Adam Curry" <a...@podshow.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Curry  
View profile  
 More options Feb 14 2007, 10:03 am
From: "Adam Curry" <a...@podshow.com>
Date: Wed, 14 Feb 2007 15:03:55 +0000
Local: Wed, Feb 14 2007 10:03 am
Subject: Re: Beginning an implementation

It Worked!
http://www.btpodshow.com/shows/?mode=detail&episode_id=50031

Thanks Oscar, Andrew and all who helped out. This is a perfect start for me.
From here I can tinker with directories and small scripts to take user input
(show notes) and select a captured file for upload to the PDN, once it's
automated we'll be getting very close to the dream of the Trinity Black Box.

xml-rpc fucking rulez.

AC

On 2/14/07, Oscar <okoe...@gmail.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Prolific Programmer  
View profile  
 More options Feb 14 2007, 1:10 pm
From: "Prolific Programmer" <hasan.di...@gmail.com>
Date: Wed, 14 Feb 2007 18:10:33 -0000
Local: Wed, Feb 14 2007 1:10 pm
Subject: Re: Beginning an implementation
On Feb 13, 9:13 am, "Adam Curry" <a...@podshow.com> wrote:

> Looks like the mimetype, called by:  mimetypes.guess_type
> (uploadInfo['name'])[0]

Instead of that line, use this snippet:
if uploadInfo['name'][0].endswith('.mp3'): # audio files
   uploadInfo['type']='audio/mpeg'
elif uploadInfo['name'][0].endswith('.avi'): # video files
   uploadInfo['type'] = 'video/x-msvideo' # according to http://
www.idevelopment.info/data/Oracle/DBA_tips/xmldb/XMLDB_2.shtml
elif uploadInfo['name'][0].endswith('.html'): # text files
   uploadInfo['type']='text/html'
# and so on... mimetypes.guess_type is supposed to do this in an
intelligent manner, I guess it doesn't work properly :(

Cheers,


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 14 2007, 2:36 pm
From: "Oscar" <okoe...@gmail.com>
Date: Wed, 14 Feb 2007 19:36:08 -0000
Local: Wed, Feb 14 2007 2:36 pm
Subject: Re: Beginning an implementation
Yup, your right, I figured that one out this afternoon when I tried to
upload a ".3p" video file from my phone (a SE P990i) to the network
but it failed on the type. I need to force it to the types. I figured
since I'm just a n00b on Python I'd need to:
a.) search for a better call to determine that in what I have
b.) hope that the MIME/types issues are fixed in Python 2.5.x (I have
2.4.x)
c.) create my own function (slave work!) to commit my own function to
the standard set by IANA link: http://www.iana.org/assignments/media-
types/

So thanks Prolific Programmers, I'll search a bit more, install Python
2.5 somewhere and have a whack at it.

cheers

On 14 feb, 19:10, "Prolific Programmer" <hasan.di...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Prolific Programmer  
View profile  
 More options Feb 14 2007, 4:33 pm
From: "Prolific Programmer" <hasan.di...@gmail.com>
Date: Wed, 14 Feb 2007 13:33:00 -0800
Subject: Re: Beginning an implementation
Adam mentioned something about Google Earth earlier in the thread.
I'll have code up to generate KML files before close of business
Thursday on my blog. KML (Keyhole Markup Language) is the format one
uses to distribute Google Earth waypoints. Again, my blog is at
http://prolificprogrammer.com/blog -- keep an eye on it. Cheers and
happy Valentine's Day to all!

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Grumet  
View profile  
 More options Feb 14 2007, 1:36 am
From: "Andrew Grumet" <a.gru...@podshow.com>
Date: Tue, 13 Feb 2007 22:36:07 -0800
Local: Wed, Feb 14 2007 1:36 am
Subject: Re: Beginning an implementation

Replace the base64-encoding with a Binary() and you should be good to go.

  edata = xmlrpclib.Binary(open(filename, "rb").read())

Explanation: the b64 encoding is handled by the xmlrpc backend, you just
need to tell it that the object is a binary object and it will do the Right
Thing (TM).

Andrew

On 2/13/07, Adam Curry <a...@podshow.com> wrote:

...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Prolific Programmer  
View profile  
 More options Feb 14 2007, 8:47 pm
From: "Prolific Programmer" <hasan.di...@gmail.com>
Date: Wed, 14 Feb 2007 17:47:52 -0800
Local: Wed, Feb 14 2007 8:47 pm
Subject: Re: Beginning an implementation

On Feb 14, 1:33 pm, "Prolific Programmer" <hasan.di...@gmail.com>
wrote:

> Adam mentioned something about Google Earth earlier in the thread.

The class includes a little test program that writes a kml file in
the  $HOME directory. I know this environment variable exists in Unix
and Symbian. Not so sure about Windows. If it doesn't work, change the
line marked "Unix-specific" to the one marked "Microsoft". It creates
a KML file with San Francisco indicated. The kml file opens up in
Google Earth 4.0.

# Stolen and modified from http://snippets.dzone.com/posts/show/891

class KML (object):
    "For creating KML files used for Google Earth"
    def __init__(self, filepath):
        "adds the kml header to a file (includes a default style)"
        self.f = open(filepath,"a")
        self.f.write(
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
            "<kml xmlns=\"http://earth.google.com/kml/2.0\">\n"+
            "<Document>\n"+
            "<Style id='normalPlaceMarker'>\n"+
            "  <IconStyle>\n"+
            "    <Icon>\n"+
            "      <href>root://icons/palette-3.png</href>\n"+
            "      <x>96</x>\n"+
            "      <y>160</y>\n"+
            "      <w>32</w>\n"+
            "      <h>32</h>\n"+
            "    </Icon>\n"+
            "  </IconStyle>\n"+
            "</Style>\n")

    def close(self):
        self.f.write(
            "</Document>\n"+ "</kml>")

    def open_folder(self, name):
        self.f.write(
            "<Folder>\n  <name>" + name + "</name>\n")

    def close_folder(self):
        self.f.write(
            "</Folder>\n")

    def __add__(self, placemarkerdict):
       if not dict(placemarkerdict) == placemarkerdict:
           raise TypeError, 'KML + dictionary'
       import datetime
       self.add_placemarker(placemarkerdict['latitude'],
placemarkerdict['longitude'], name = str(datetime.datetime.now())) #
Prolific Programmer sees the altitude as unnecessary

    def add_placemarker(self, latitude, longitude, altitude = 0.0,
description = " ", name = " ", range = 6000, tilt = 45, heading = 0):
        "adds the point to a kml file"
        self.f.write(        "<Placemark>\n" +
                             "  <description>" + description + "</
description>\n" +
                             "  <name>" + name + "</name>\n" +
                             "  <styleUrl>#normalPlaceMarker</
styleUrl>" +
                             "  <LookAt>\n" +
                             "    <longitude>" + str(longitude) + "</
longitude>\n" +
                             "    <latitude>" + str(latitude) + "</
latitude>\n" +
                             "    <range>" + str(range) + "</range>\n"
+
                             "    <tilt>" + str(tilt) + "</tilt>\n" +
                             "    <heading>" + str(heading) + "</
heading>\n" +
                             "  </LookAt>\n" +
                             "  <visibility>0</visibility>\n"+
                             "   <Point>\n" +
                             "    <extrude>1</extrude>\n" +
                             "    <altitudeMode>relativeToGround</
altitudeMode>\n" +
                             "    <coordinates>" + str(longitude) +
"," + str(latitude) +", " +  str(altitude) + "</coordinates>\n" +
                             "   </Point>\n" +
                             " </Placemark>\n")
        return

if __name__ == '__main__':
    import tempfile, os, logging
    logging.basicConfig(level = logging.ERROR)
    (outputfiledescriptor, outputfilename) =
tempfile.mkstemp(prefix='trinity',suffix='.kml',
dir=os.environ['HOME']) # unix-specific
    # (outputfiledescriptor, outputfilename) =
tempfile.mkstemp(prefix='trinity',suffix='.kml', dir="\\") # Microsoft-
specific
    logging.debug(outputfilename)
    kmlwriter = KML(outputfilename)
    kmlwriter.add_placemarker(latitude='37.460',longitude='-122.260',
altitude='16.0', description = 'the City by the Bay', name = 'San
Francisco')
    kmlwriter.close()
    print outputfilename
# END
Cheers,


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 15 2007, 3:27 am
From: "Oscar" <okoe...@gmail.com>
Date: Thu, 15 Feb 2007 08:27:23 -0000
Local: Thurs, Feb 15 2007 3:27 am
Subject: Re: Beginning an implementation
Hi Prolific, Adam and everybody,

That's a nice piece that we can work with. Although I think generating
the XML is one thing, but it is depatable if that would be handy on
the N800's side.
I think that some form of upload mechanism should be created for the
coordinates and that the user of the N800 should be able to retrieve a
list of (static) POI's.

Also the listeners of the Trinity podcast might just want to have one
simple kml file to install which would be the user-friendliest option.

Have a look at this sippet of KML which we use to retrieve some around
the world compute cluster information:

create a file with the name:  <something>.kml (example: oscar.kml) and
launch the file in Google Earth and select the pin-points. This is a
nice example of what would be the easiest to install. One KML file
that updates at regular intervals (60 seconds here) and the update is
another KML file which is incorporated into the whole set of push-
pins.

---- begin file ----
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
  <name>Real Time Monitor (beta)</name>
  <visibility>1</visibility>
  <NetworkLink>
    <name>Live data</name>
    <flyToView>0</flyToView>
    <Url>
      <href>http://gridportal.hep.ph.ic.ac.uk/rtm/dynamic_xml/
rtm_live.kml</href>
      <refreshMode>onInterval</refreshMode>
      <refreshInterval>60</refreshInterval>
      <viewRefreshMode>never</viewRefreshMode>
    </Url>
    <refreshVisibility>0</refreshVisibility>
  </NetworkLink>
</Document>
</kml>
---- end file ----

Updateing the list of pushpins (static info.) and having dynamic extra
info per push-pin resulting in the map of POIs should not inflict into
any licencing issue with the free version of Google at all.

You shouldn't create that much of dynamics in the content as they did
for the Tour de France. My collegue let me have a look at that and it
was amazingly dynamic! They had (near) real-time updates of all the
riders throughout the course including in the mountains.

Keeping it slightly more light weight then that would be the way to go
I think.

Cheers

On 15 feb, 02:47, "Prolific Programmer" <hasan.di...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar  
View profile  
 More options Feb 15 2007, 3:41 am
From: "Oscar" <okoe...@gmail.com>
Date: Thu, 15 Feb 2007 08:41:49 -0000
Local: Thurs, Feb 15 2007 3:41 am
Subject: Re: Beginning an implementation
Hi again,

I appologise for my bad writing skills. I'm better in writing non-
natural languages :-)

On 15 feb, 09:27, "Oscar" <okoe...@gmail.com> wrote:

> Hi Prolific, Adam and everybody,

> That's a nice piece that we can work with. Although I think generating
> the XML is one thing, but it is depatable if that would be handy on
> the N800's side.

It is of course 'debatable'. Besides the language issue I didn't
actually tell what I think would be a nicer strategy.
I think that it would be wise to upload all media content including
frequent GPS coordinate updates of trinity to Podshow HQ. The actual
media content is the easy part with the PDN's XML-RPC interface, like
Adam wants it. The 'raw-GPS' coordinates could be delivered in the KML
structure. Which would enable us to write a tiny parser around that to
refactor the KML to some other format of interest (like for the Yahoo
maps) and into a Master KML file which would include all the other
POIs. This would allow us to create one simple KML file for everybody
to install in Google Earth.

I think our contribution is starting to shift from a features display
to an intergration of the stuff into one magic for the N800 and the
listeners of Free Trinity.

cheers


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Prolific Programmer  
View profile  
 More options Feb 15 2007, 12:21 pm
From: "Prolific Programmer" <hasan.di...@gmail.com>
Date: Thu, 15 Feb 2007 17:21:02 -0000
Local: Thurs, Feb 15 2007 12:21 pm
Subject: Re: Beginning an implementation
On Feb 15, 12:41 am, "Oscar" <okoe...@gmail.com> wrote:

> I think our contribution is starting to shift from a features display
> to an intergration of the stuff into one magic for the N800 and the
> listeners of Free Trinity.

Any project has clients as well as developers. Since the "client" in
this case is a subscriber, who will be listening in on this through an
RSS feed, Google Earth, etc., we need to cater to them too, imo.

NB: I'll be out of town all weekend, but will check back in Monday
evening.

Cheers,


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
xidus...@gmail.com  
View profile  
 More options Feb 15 2007, 12:06 pm
From: Xidus...@gmail.com
Date: Thu, 15 Feb 2007 17:06:14 -0000
Local: Thurs, Feb 15 2007 12:06 pm
Subject: Re: Beginning an implementation
Just out of interest, did some one say this thing can run perl?!
Seriously, so much better than python ;)

On Feb 15, 8:41 am, "Oscar" <okoe...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
xidus...@gmail.com  
View profile  
 More options Feb 15 2007, 12:12 pm
From: Xidus...@gmail.com
Date: Thu, 15 Feb 2007 17:12:11 -0000
Local: Thurs, Feb 15 2007 12:12 pm
Subject: Re: Beginning an implementation
I haven't actually read the Documentation yet, but im going to
tonight, but i was wondering if there was support for, the
aforementioned perl, Ive been programming in perl for years, and i
would be interested in helping out, anything specific that needs
doing?

Thanks
Roland

On Feb 15, 8:41 am, "Oscar" <okoe...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oscar Koeroo  
View profile  
 More options Feb 16 2007, 3:19 am
From: "Oscar Koeroo" <okoe...@gmail.com>
Date: Fri, 16 Feb 2007 09:19:39 +0100
Local: Fri, Feb 16 2007 3:19 am
Subject: Re: Beginning an implementation

Hi Roland,

The everlasting battle between Perl & Python. At the lab here we've got an
equal amount of perl and python admirers, so I know what you mean. Some
lunches are hilarious... ;-)

This Nokia N800 is a beautiful device that runs a Debian like distribution
(refactored for the processor), but it's the full-blown real deal. It holds
Python 2.5.x so my best guess is that it runs Perl in a quite recent version
as good as the Python. Ofcourse we'll probably need to consider the fact
that the amount of 3rd party modules/libs are not easily made suitable for
the N800. I don't know for sure, I but my best guess is dat it has a Xscale
processor as a heart, so possible recompilation on the tablet can possibly
be done.

Anywayz... like stated before. We're looking for a few automated ways of
uploading media content to the PDN (Podshow Delivery Network).
Content like:
- photo's
- video's
- podcasts (audo files)
- text
- GPS coordinates

...need to be uploaded.

We've kinda covert the automatic picture taking plus geo tagging. Also
uploading an Mp3 to the PDN is basically done, possibily simular to the
video files.
But... I don't think we have a uniformed way of extracting GPS coordinates
from a BlueTooth device. This is usually the same as a serial link cable
when you need to program such a thing, but from my experiences I understood
that not every BlueTooth GPS device is created equally... Garman and other
GPS devices have different protocols.
And ... there are a few standard of presenting a GPS coordinate. There is
the way Google Earth understands it (I belive that was the ISO standard),
but there are a few others too. We'll need translaters to accomodate these
diffs. If we want to Geo tag a picture, surely we'll need to use the correct
format to that api.

maybe you can have a wack at it and maybe (just maybe...) we can have nice
project were we can present a unification of Perl and Python function nicely
side-by-side. Maybe nobody understands this but a select set of people with
many hours behind a keyboard. :-)

cheers

2007/2/15, Xidus...@gmail.com <Xidus...@gmail.com>:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 26 - 50 of 66 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google