[PATCH] DLD upload

Dirk Hohndel dirk at hohndel.org
Wed Mar 13 07:12:53 PDT 2013


"Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>> in the tradition of sending something semi-working in the hope
>> somebody else finishes it, here is an implementation of the actual
>> upload to divelogs.de.

It's a great tradition. Linus has perfected this for kernel development
:-)

>> 1) I was not able to understand the libsoup documentation as how one is supposed to upload a file (together with parameters in a POST operation). Thus I used libcurl. As I did this on my Mac I had to port install curl. I changed the Makefile accordingly.
>
> frankly, the only reason i've used libsoup in the webservice dialog,
> was due to how poorly the packaging (or lack off) of libcurl was done
> for native windows, which may not be the case for the cross-build. if
> you decide to use libcurl, we may as well re-write the other dialog to
> use it, but that means that the native windows build is
> out-of-the-game (which is not a biggie), until i find i way to build
> libcurl or download from somewhere pre-built properly. since gnome
> officially supports libsoup the integration was less painful, but i'm
> also aware that libcurl is the more mature library out of the two.

Anything that makes it hard to build Subsurface for one of our key
contributors makes me very unhappy.
I'm much more interseted in having one infrastructure that we use for
all the web integration work (there are a few more sites that also offer
APIs and that we might want to integrate).

I haven't looked at libsoup at all but what I saw in the webservice.c
file didn't seem all that horrible.

I'm at a conference today - let me see if I can find someone familiar
with it who might be willing to lend a hand.

>> 2) On divelogs.de, I created an account "subsurface" test with
>> password "geheim". Currently, these are hardcoded in divelist.c as I
>> did not have time to learn how to modify the GUI to obtain this
>> information from the user.

Ok - that really isn't all that hard :-)

Of course there is the issue that by storing this password in the config
it becomes rather easy to obtain. But then again, Subsurface doesn't
password protect its data file, so this is likely a moot point.

>> 4) There is no error handling so far. Instead libcurl prints the
>> result (some xml) to STDOUT and I have not yet figured out how to
>> stop it.

Error handling. Ha.

>> 5) My indentation is still horrible. All the .emacs stuff you friendly people sent so far did not help. I am really sorry about this.

Ok, everything else so far I can forgive. But BAD INDENTATION? NEVER!!!

(hmmm... I should send email before I had coffee...)

>> I understand, libcurl comes with a MIT license. I don't know if this
>> creates any problems if it is included in a GPL'ed project. We might
>> have to ask the curl author for permission.
>
> AFAIK, the licenses are compatible where GPL2 "overpowers" the MIT
> license, as can be confirmed here:
> http://en.wikipedia.org/wiki/License_compatibility#GPL_compatibility

Yes. We would have to carry the copyright, though.

But as I said earlier, I'd rather make all of this work with libsoup.

>> If you still don't mind:
>>
>> Signed-off-by: Robert C. Helling <helling at atdotde.de>

Thanks for doing that - given some of the issues above I won't apply as
is... but hopefully we can use it to learn from when doing the libsoup
implementation

/D


More information about the subsurface mailing list