[Google Wave APIs] Re: Python & Robot API - Annotating Blips
Yes, the Python doc is completely underwhelming. I find the Java documentation is much more complete, you just have to translate. I am using SetAnnotation(Range, Name, Value) instead. Perhaps try that. doc.SetAnnotation(document.Range(start, end), 'link/manual', 'http://www.google.com') Alan On Oct 18, 10:15 am, atc wrote: > Hi all, > > Ok, I'm having a bad time trying to get the hang of annotations. The > pydoc (http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/ > index.html) is quite bland - I can't seem to find anything that might > explain how to use them to say, bold text, add hyperlinks/hrefs. There > are types for images, gadgets and form elements but I can't seem to > find a descriptiojn of the basics - please help me. > > I've followed the Java example on this thread (http:// > groups.google.com/group/google-wave-api/browse_thread/thread/ > eb334177c34c931f/ed1abe149d1ac6e4?lnk=gst&q=annotation > +documentation#ed1abe149d1ac6e4) but not had any luck - I just get a > blank blip posted by my robot... > > I wrote the following code to try it: > doc = wavelet.CreateBlip().GetDocument() > doc.AnnotateDocument(Annotation("link/manual", > "http://www.google.com";, Range())) > doc.SetText("THIS IS ANNOTATED TEXT") > As I said, I just end up with a blank blip - argh! > > Firstly, what am I doing wrong? > Secondly, is there any documentation about annotations? If so, can > someone point me in the right documentation? :) > > I want to first add nicely formatted hrefs because URLs I'm posting > are far too wrong - you can see for yourself by adding wave- > tool...@appspot.com to a conversation and posting @news... > > Thanks in advance, > > atc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
On Oct 19, 2:44 am, David Nesting wrote: > I haven't found a good authoritative source, but my own experimentation has > yielded the following (self-explanatory?) annotations, just from styling > text in the editor: > > conv/title (marks the range of this annotation as the blip's title) > lang=en > style/fontWeight=bold > style/fontStyle=italic > style/textDecoration=underline > style/textDecoration=line-through > style/fontSize=2em > style/color=rgb(229, 51, 51) > style/backgroundColor=rgb(51, 127, 229) > link/manual=http://example.com/ > > The style/* annotations appear to mirror CSS, so it's possible more CSS > properties can be expressed with these annotations, I don't know. > > Notably absent are annotations for bullets, indentation, h1/h2/h3-style > headings and left/center/right justification. These don't seem to be > expressed through the Python API, but maybe someone else has had better luck > with the Java. David, that's infinitely helpful - thank you! @Pamela, thanks for the explanation. I'm off to do more hacking ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
We haven't published an authoritative list of those annotations as we aren't confident in their stability. Feel free to use them for now, but keep in mind that they may change. Most likely, they will be documented as part of the wave-protocol, since they help define the data model, and we will then link to that list. - pamela On Mon, Oct 19, 2009 at 12:44 PM, David Nesting wrote: > On Sun, Oct 18, 2009 at 5:54 PM, atc wrote: > >> What other annotations are available? Where do I get the valid names >> from?! >> > > I haven't found a good authoritative source, but my own experimentation has > yielded the following (self-explanatory?) annotations, just from styling > text in the editor: > > conv/title (marks the range of this annotation as the blip's title) > lang=en > style/fontWeight=bold > style/fontStyle=italic > style/textDecoration=underline > style/textDecoration=line-through > style/fontSize=2em > style/color=rgb(229, 51, 51) > style/backgroundColor=rgb(51, 127, 229) > link/manual=http://example.com/ > > The style/* annotations appear to mirror CSS, so it's possible more CSS > properties can be expressed with these annotations, I don't know. > > Notably absent are annotations for bullets, indentation, h1/h2/h3-style > headings and left/center/right justification. These don't seem to be > expressed through the Python API, but maybe someone else has had better luck > with the Java. > > David > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
On Sun, Oct 18, 2009 at 5:54 PM, atc wrote: > What other annotations are available? Where do I get the valid names > from?! > I haven't found a good authoritative source, but my own experimentation has yielded the following (self-explanatory?) annotations, just from styling text in the editor: conv/title (marks the range of this annotation as the blip's title) lang=en style/fontWeight=bold style/fontStyle=italic style/textDecoration=underline style/textDecoration=line-through style/fontSize=2em style/color=rgb(229, 51, 51) style/backgroundColor=rgb(51, 127, 229) link/manual=http://example.com/ The style/* annotations appear to mirror CSS, so it's possible more CSS properties can be expressed with these annotations, I don't know. Notably absent are annotations for bullets, indentation, h1/h2/h3-style headings and left/center/right justification. These don't seem to be expressed through the Python API, but maybe someone else has had better luck with the Java. David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
On Oct 19, 1:34 am, David Nesting wrote: > I think your call to SetText is eliminating your annotations. Try setting > your annotations after you set the text. You need to have content there in > order to annotate it. I agree that the documentation is a bit lacking > still. Thanks for your reply. Funnily enough that makes total sense. One issue with my code was incorrect arguments to the SetAnnotation() call, as well as an invalid rabnge So, got it fixed now - code's below for anyone else pondering this! doc = wavelet.CreateBlip().GetDocument() doc.SetText("THIS IS ANNOTATED TEXT") doc.SetAnnotation(Range(2, 12), "link/manual", "http:// www.google.com") What other annotations are available? Where do I get the valid names from?! Thanks again for the help, atc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
On Sun, Oct 18, 2009 at 10:15 AM, atc wrote: >doc = wavelet.CreateBlip().GetDocument() >doc.AnnotateDocument(Annotation("link/manual", "http:// > www.google.com", Range())) >doc.SetText("THIS IS ANNOTATED TEXT") > As I said, I just end up with a blank blip - argh! > I think your call to SetText is eliminating your annotations. Try setting your annotations after you set the text. You need to have content there in order to annotate it. I agree that the documentation is a bit lacking still. David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
Argh, I shouldn't have refreshed the page - I've submitted the message several times it seems - can someone delete the duplicates? On Oct 18, 10:41 pm, atc wrote: > doc = wavelet.CreateBlip().GetDocument() > doc.SetAnnotation(Annotation(Range(0, 22), "link/manual", > "http://www.google.com";)) > doc.SetText("THIS IS ANNOTATED TEXT") > > I've tried with 'SetAnnotation' as pasted above, and I just get a > blank document. Can someone help this noob? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
doc = wavelet.CreateBlip().GetDocument() doc.SetAnnotation(Annotation(Range(0, 22), "link/manual", "http:// www.google.com")) doc.SetText("THIS IS ANNOTATED TEXT") I've tried with 'SetAnnotation' as pasted above, and I just get a blank document. Can someone help this noob? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
doc = wavelet.CreateBlip().GetDocument() doc.SetAnnotation(Annotation(Range(0, 22), "link/manual", "http:// www.google.com")) doc.SetText("THIS IS ANNOTATED TEXT") I've tried with 'SetAnnotation' as pasted above, and I just get a blank document. Can someone help this noob? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---
[Google Wave APIs] Re: Python & Robot API - Annotating Blips
doc = wavelet.CreateBlip().GetDocument() doc.SetAnnotation(Annotation(Range(0, 22), "link/manual", "http:// www.google.com")) doc.SetText("THIS IS ANNOTATED TEXT") I've tried with 'SetAnnotation' as pasted above, and I just get a blank document. Can someone help this noob? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~--~~~~--~~--~--~---