[Sugar-devel] [PATCH] Add ds2xos conversion script to export

Michael Stone michael at laptop.org
Mon Jun 28 00:57:42 EDT 2010


Scott wrote:
>On Sun, Jun 27, 2010 at 9:53 PM, Michael Stone <michael at laptop.org> wrote:
>> El Sat, 26-06-2010 a las 23:07 -0400, Michael Stone escribi=C3=B3:
>>
>>>> * whose name is URL-encoded with spaces encoded as pluses
>>>
>>> Why pluses?
>>
>> Because they're nicer than %20 and python provides urllib.quote_plus?
>>
>>> Can't we simply leave spaces as spaces?
>>
>> Have you got a shell that doesn't require me to escape them in order to
>> process the resulting files?
>>
>>> Or convert them to '_' and use '~' or ';' as a version separator?
>>
>> Thanks; I prefer characters which don't need to be shell-escaped.
> 
> FWIW:
> shell will only expand ~ in first position; a~b is fine.
> using ; as a version separator has a long and distinguished history
> (http://en.wikipedia.org/wiki/Files-11)

Good points. Thanks. 

> anyone who hasn't figured out how to use -0 options to grep, xargs,
> find, etc in order to properly handle spaces is living in the past

Null-separation works well with find and xargs and not-so-well with pretty much
everything else, no?

> filenames in spanish will look terrible with %-escapes for 

I've been thinking about this for a while but I don't see any easy solutions.
(Other than saying "screw it; let's go with Plan 9...")

Is this:

   http://tools.ietf.org/html/rfc3987

still your recommended reading?

> anyway, and utf-8 is not reliable on FAT (sigh).  if you can get
> people to format their USB sticks with NTFS, whose kernel support is
> pretty good, you can use utf-16 and a much smallest set of "bad"
> codepoints.

My main goal was to produce directory names that are 

   a) fully determined by the activity metadata, 
   b) vaguely human readable, and 
   c) shell-friendly 

from whatever crap I'm handed. 

My further thought was that smarter viewers like the Journal would use the
authoritative data in the .xos/metadata.json to figure out how to render the
session.

Regards, and thanks very much for your comments,

Michael


More information about the Sugar-devel mailing list