close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#927 closed task (fixed)

file transfer API

Reported by: Jorge Owned by: Jorge
Priority: normal Milestone: TOL Packages
Component: Various Version: 2.0.1
Severity: normal Keywords: http, ftp, file transfer, download, upload, scp
Cc:

Description

Implement a TOL API in order to perform file transfer operations. Consider an implementation based on http://personal1.iddeo.es/andresgarci/tclcurl/english/

Change History (16)

comment:1 Changed 15 years ago by Jorge

(In [2298]) refs #927, including package TclCurl

comment:2 Changed 15 years ago by Jorge

(In [2299]) refs #927, implementing Curl::Get

comment:3 Changed 15 years ago by Jorge

(In [2301]) refs #927, trick to ensure tcl code is evaluated before invoking any Curl API

comment:4 Changed 15 years ago by Jorge

(In [2303]) refs #927, including Curl API

comment:5 Changed 15 years ago by Víctor de Buen Remiro

Cuando se le pasan parámetros correctos lo hace todo bien sin problemas, o al menos eso parece, pero si le paso un path local que no existe me devuelve omitido y si le paso una URL que no existe entonces devuelve cierto, cuando debería devolver falso en ambos casos.

En el caso de haber problemas en ejecutar la orden debería mostrar algún mensaje explicativo de porqué ha fallado, pero eso sí de forma opcional, controlada por un argumento extra Real showMsg, porque a veces puede usarse esta herramienta sólo para saber si existe algo.

Quizás habría que ver qué otras capacidades ofrece el TclCurl para saber si existe o no una URL, leer directorios remotos, fechas de última actualización, etc.; lo cual le daría un gran valor añadido.

comment:6 Changed 15 years ago by Víctor de Buen Remiro

Component: ASCII data filesVarious
Owner: changed from Jorge to Víctor de Buen Remiro
Priority: highestnormal
Severity: criticalnormal
Status: newaccepted

comment:7 Changed 15 years ago by Jorge

(In [2356]) refs #927:

  • Curl renamed to CurlApi
  • Get renamed to GetUrl
  • GetUrl now return a Set with the following elements:
    • Rail failStatus : 0 if not fail otherwise contain the error code
    • Text explain: this item only appear if failStatus != 0 and contains the error description
    • if failStatus == 0 then the following items are returned:
      • Real fileTime
      • Real totalTime
      • Real connectTime
      • Real sizeDownload
      • Real speedDownload

comment:8 Changed 15 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: acceptedclosed

comment:9 Changed 15 years ago by Víctor de Buen Remiro

(In [2371]) Refs #927
Renaming Curl to CurlApi and Curl::Get to CurlApi::GetUrl

comment:10 Changed 15 years ago by Jorge

(In [2387]) refs #927, in case of error the field status should be named as failStatus

comment:11 Changed 15 years ago by Jorge

Keywords: download upload scp added
Resolution: fixed
Status: closedreopened

Consider the implementation of upload operation.

comment:12 Changed 14 years ago by Víctor de Buen Remiro

Owner: changed from Víctor de Buen Remiro to Jorge
Status: reopenedassigned

comment:13 Changed 14 years ago by Víctor de Buen Remiro

Resolution: remind
Status: assignedclosed

comment:14 Changed 14 years ago by Víctor de Buen Remiro

Resolution: remind
Status: closedreopened

No hay ninguna descripción y la API es inesxcrutable.
No hay forma de averiguar que argumentos espera ni qué cosa devuelve.

Set GetUrl( NameBlock args )

comment:15 Changed 14 years ago by Jorge

Resolution: fixed
Status: reopenedclosed

(In [3575]) - puede resolver #1166

  • fixes #927
  • el loop de 1 a 100 del ticket #1207 no falla, al menos en linux, habria que reescribirlo asi:
    Set For(1, 100, Set (Real i) {
      WriteLn(""<<i);
      Set CurlApi::GetUrl(
      [[ Text url = "http://packages.tol-project.org/OfficialTolArchiveNetwork/"
        "repository.php?tol_package_version=1.1&tol_version=v2.0.1%20b.4&"
        "action=ping&key=658184943" ]]
      )});
    

comment:16 Changed 14 years ago by Víctor de Buen Remiro

(In [3579]) Fixes #1207
Refs #927

Note: See TracTickets for help on using tickets.