Noel

I originally had happyHTTP in the resolver format as you suggested, 
giving good modularity.

But it seems a shame not to be able to access files directly from the 
web for any input format, as in the last example I gave or

   obabel  http://gaseq.co.uk/OB/first.sdf  -osmi

The http call needs to be in OBConversion to do this, and there are 
minor mods to obabel.cpp and obgui.cpp to avoid the URL being filtered 
out. It does mean that all input file names are tested to see if they 
start with "http://"; but ones that don't are handled as before, so the 
risk of unexpected consequences is low. The code is conditionally 
compiled and is not built unless -DUSE_WEB is used. But I can see the 
danger of making such mods close to a release.

Is the Linux build ok? Assuming it is,
The possible ways ahead are:

1) Postpone anything to do with http access until the next release. This 
would be necessary if there were concerns about the http library used.

2) Move happyHTTP into resolverformat and abandon universal http file 
access. (If it was reinstated later, happyHTTP would have to be moved back.)

3) Release with the current code.

I would find any of these acceptable. What do others think?

Chris

On 23/06/2012 22:37, Noel O'Boyle wrote:
> Hi Chris,
>
> I see that happyhttp is compiled into the OB library, which I think
> makes it a fairly major API addition. Would it not be better to do
> like I do for Cairo and just make it part of the particular format? Or
> is there some reason you want to do it this way?
>
> - Noel
>
> On 23 June 2012 12:36, Noel O'Boyle <baoille...@gmail.com> wrote:
>> On 23 June 2012 12:02, Chris Morley <c.mor...@gaseq.co.uk> wrote:
>>> On 23/06/2012 10:29, Noel O'Boyle wrote:
>>>>
>>>> It seems that libcurl would be a better choice for other operating
>>>> systems. HappyHttp is not even available as a Debian package, for
>>>> example, and *everything* is available as a Debian package :-)
>>>
>>>
>>> libcurl is a big beast with a C interface. libxml2 was similar and its use,
>>> in retrospect, was a mistake in my view. HappyHTTP is a very light-weight,
>>> which matches our requirements, and it is all in the 30K of cpp and h files.
>>> I guess (but do not know) that additionally it needs no more than routine OS
>>> calls. If it usable on Linux I would say it is better to avoid the extra
>>> dependency.
>>>
>>> If it's not suitable I'll have a go at the rewriting for libcurl.
>>
>> Ah right - I didn't realise that HappyHTTP was included in your
>> checkin. Forget my comments about libcurl. I'll try and get the
>> current code working if it doesn't already..
>>
>>>
>>>> For the moment, it might be best to disable on non-windows platforms
>>>> so that the dashboard doesn't have errors. I'll look into rewriting it
>>>> against libcurl (if someone else has time, let me know as I'm somewhat
>>>> short of time right now) as I've found this (in Cinfony) so useful
>>>> from the point of view of teaching.
>>>
>>>
>>> By default, this facility should not be built on any platform unless
>>> -DUSE_WEB is used. The errors last night were cause by me committing the
>>> wrong file, which I hope is now corrected, and for which I apologize.
>>
>> Yes - it's working fine now.
>>
>>> Chris
>>>
>>>
>>>>
>>>> - Noel
>>>>
>>>> On 22 June 2012 19:54, Chris Morley <c.mor...@gaseq.co.uk> wrote:
>>>>>
>>>>> I have eventually committed formats that use the NIH Resolver via the web
>>>>> to
>>>>> read trivial and systematic names and InChIKeys, and to write IUPAC
>>>>> names.
>>>>> See the previous discussion:
>>>>>
>>>>> http://forums.openbabel.org/Converting-from-compound-names-in-OpenBabel-td4170258.html
>>>>> . I have tried to incorporate the suggestions of Noel and Geoff.
>>>>>
>>>>> Files can now also be loaded directly from the web for any format using a
>>>>> http://... URL in place of an input filename.
>>>>>
>>>>> On Windows, CMake will build the required files only if -DUSE_WEB is
>>>>> specified. I do not know what is required for other operating systems and
>>>>> would appreciate if someone who does could add what is necessary.
>>>>> HappyHttp
>>>>> is supposedly cross-platform, although I guess it would not have been
>>>>> first
>>>>> choice for most operating systems.
>>>>>
>>>>> Chris
>>>>>
>>>>> Some examples
>>>>>
>>>>> obabel -iweb example.nam -osmi
>>>>>
>>>>> echo vancomycin | obabel -iweb -O out.png
>>>>>
>>>>> obabel -:O=C1NCC(=O)NC1 -oweb
>>>>>
>>>>> obabel
>>>>>
>>>>> http://showme.physics.drexel.edu/usefulchem/Software/MoleculeBlogInfo/usefulchem-molecules/usefulchem-molecules.feed.smi
>>>>> -O out.svg -s O=C1NCC(=O)NC1 green showall -xh !L5 -l42
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Live Security Virtual Conference
>>>>> Exclusive live event will cover all the ways today's security and
>>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>>> will include endpoint security, mobile security and the latest in malware
>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>>> _______________________________________________
>>>>> OpenBabel-Devel mailing list
>>>>> OpenBabel-Devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>> will include endpoint security, mobile security and the latest in malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> OpenBabel-Devel mailing list
>>>> OpenBabel-Devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>>>>
>>>
>>>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to