Hi<br><br>What I search is a Scilab command which would look something like:<br>--> txt=read_from_web('<a href="http://adress">http://adress</a>')<br><br>Such a command exists in software R, but I did found the equivalent in Scilab.<br>
<br>And if I understand well, what you suggests is an indirect way: first download the text, then read it into Scilab, which is not exactly the same (no automatisation of routine tasks from instance)<br><br>Éric.<br><br><div class="gmail_quote">
2012/3/18 Adrien Vogt-Schilb <span dir="ltr"><<a href="mailto:vogt@centre-cired.fr">vogt@centre-cired.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#330000">
Hi<br>
<br>
I don't understand. <br>
<br>
I would download the text with wget to TMPDIR, then read with scilab
(by "open "myfile.txt", i wxas suggesting to do this from scilab).
This would use the harddrive as an intermediairy beetween wget and
scilab.<br>
Maybe you could use
<div>
<div>
<pre><span></span><span>unix_g</span></pre>
</div>
</div>
instead of unix. unix_g will capture the output of wget and return
it to scilab directly<br>
<br>
I wish i could post an example, but i don't have wget installed in
my PC anymore<br>
you may try something like:<span><br>
a= unix_g</span>("wget <a href="http://www.google.com/" target="_blank">http://www.google.com/</a>")<br>
<br>
of course you still have to install wget, but that seems very
reasonable to me.<br>
<br>
(just to be sure: unix and unix_g are scilab commands)<div><div class="h5"><br>
<br>
<br>
On 15/03/2012 21:24, Eric Dubois wrote:
<blockquote type="cite">Thanks for your quick answer.
<div><br>
However I am not sure that it answers exactly to my needs: what
I am looking for is a way to do that FROM Scilab (that is with a
Scilab command, encapsulated in a script or a function for
instance) and if I have well understood what you suggest, your
proposal is to go through a download as a text file on my
computer.</div>
<div><br>
</div>
<div>Eric.</div>
<div><br>
</div>
<div><br>
<div class="gmail_quote">2012/3/14 Adrien Vogt-Schilb <span dir="ltr"><<a href="mailto:vogt@centre-cired.fr" target="_blank">vogt@centre-cired.fr</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#330000">
<div>
<div> On 14/03/2012 21:58, Eric Dubois wrote:
<blockquote type="cite">Hello
<div><br>
</div>
<div>Does anyone know how to recover the (text)
content of a web page from Scilab (as it is
possible with function dowlaod.file in R
software)?</div>
<div><br>
</div>
<div>Thanks for your answer!.</div>
<div> <br>
</div>
<div>Eric. </div>
</blockquote>
</div>
</div>
hi<br>
<br>
if your machine runs on linux, you can use unix("wget -O
myfile.txt <a href="http://www.url.com" target="_blank">http://www.url.com</a>")<br>
and then open "myfile.txt"<br>
<br>
(you may want to deletefile("myfile.txt") once you are
done)<br>
<br>
if you are using windows you can always install wget for
windows (<a href="http://gnuwin32.sourceforge.net/packages/wget.htm" target="_blank">http://gnuwin32.sourceforge.net/packages/wget.htm</a>)
and use it the same way<br>
<br>
on mac i guess you can natively use wget too.<br>
<br>
<br>
hope this helps<span><font color="#888888"><br>
<br>
Adrien Vogt-Schilb<br>
</font></span></div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br>