[Portland] xdg_vfs_gnome command line client

nf2 nf2 at scheinwelt.at
Thu Jun 1 06:13:17 PDT 2006


Kevin Krammer wrote:
>
>
> I like the concept, though I think the shell mode or tagged mode are asking 
> for difficulties when control data and payload data are mixed.
>
>   
Definitely. This also gives me headache. It would be nice if there where 
a common standard for machine-readable output of cli tools. Kind of 
simple out-of-process components. I'm currently using

[Sections]
key=value pairs
and raw-data with a user-defined escape character.

Maybe something like XML would be more appropriate. But i don't know if 
you can use CDATA sections for binary data. Perhaps switching between 
XML and Raw-data...

<job>
    <openfiledlg>
          <pair key="selected_file" 
type="String">sftp://usr@host/file</pair>
    </openfiledlg>
    <fileinfo>
          <pair key="name" type="String">sftp://usr@host/file</pair>
          <pair key="size" type="int">1234</pair>
          <pair key="mimetype" type="String">text/plain</pair>
    </fileinfo>
    <get>
          <pair key="name" type="String">sftp://usr@host/file</pair>
          <rawdata name="filedata" escapechar="~">
+++++++++++++++
+++++++++++++++
+++++++++~
          </rawdata>
          <progressinfo>
                   <pair key="percent" type="int">25</pair>
          </progressinfo>
          <rawdata name="filedata" escapechar="~">
+++++++++++++++
+++++++++++++++
+++++++++~
          </rawdata>
          <progressinfo>
                   <pair key="percent" type="int">100</pair>
          </progressinfo>
          <rawdataend name="filedata"/>
    </get>
    <errorcode value="0"/>
</job>

Norbert



More information about the Portland mailing list