--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/u7gxdkSAGnI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Ethan,thanks! That sounds awesome!About #1 and #2 are pretty straightforward using the http, strings, and json packages.About #3: I'd prefer plotinum over the Go image package because of the higher level of abstraction.About #4: Can someone share an example that sends an email with the GAE Mail API with an image attached?Thanks,Ingo
On Wed, Mar 19, 2014 at 6:58 PM, <burns...@gmail.com> wrote:
Hi Ingo,Plotinum can write plots to io.Writers (see the comment here: https://code.google.com/p/plotinum/issues/detail?id=101). Then, it can save a plot into memory via bytes.Buffer.
I haven't tried Plotinum on AppEngine, but I would hope it works with little changes, if any. You may run into problems loading the font data, which currently sits on the file system, but perhaps that will be OK since it is static. If you try it out, please let me know the results (email plotinum-discuss@googlegroups.com, CCed on this message). If it doesn't work, I would be happy to look at patches that make it compatible with AppEngine.
Best,Ethan
On Monday, March 17, 2014 10:27:15 PM UTC-4, Ingo Jaeckel wrote:Hi,I want to build a GAE/Go app that does the following:
- User opens http://example.com/rest/draw
- The request body contains x/y values that should be plotted in a diagram e.g. [[0,1],[1,1],[2,4]]
- The app generates an image for the x/y values (using something like plotinum or go-gnuplot)
- The app sends an email with the generated image as an attachment (using the GAE Mail API)
There are a couple of challenges:
- I need a Go plotting library that runs on Google App Engine. My options might be limited since I cannot write to the filesystem.
- I need a plotting library which can produce the image in memory instead of writing to disk. The raw/base64-encoded data should be attached to an email.
- Assuming I get the raw image data from a GAE-compatible plotting library, how can I attach it to the email? Can someone share an example that attaches the in-memory image data to the email?
- Is there a way to use the blob store to store and retrieve images instead of writing to a file system? Is there a way to use existing Go plotting libraries and let them write to the blob store instead of the file system? Ideally all data stays in memory for the duration of the request.
Thanks,Ingo
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/u7gxdkSAGnI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts+unsubscribe@googlegroups.com.
Replying to all:
Hi Ingo,
See my comment here: https://code.google.com/p/plotinum/issues/detail?id=101
Documenting this is on my todo list (though it's near the bottom).
Hope that helps,
Ethan