Hi Andre, > Hi, Would someone be able to tell me if there an easy way to reproduce > in a text file how the body of an item appears in the detail view on the > screen, that is, with the same carriage returns/line feeds? When I > encode as utf-8 (or ascii-us) and write to a file, the control > characters seem to be left out. Lists I've entered into the body of > Chandler items appear as "paragraphs" in the text file. > > I've been reading the detail block scripts. Will I need to call some of > the "multi-line" type and line-representation type logic? > > (I hope this exchange doesn't seem like only a Python tutorial. In part, > to me, it's a bit of a tour of Chandler internals.)
If you've explicitly added line feeds into the detail view, those should be preserved by both utf-8 and ascii-us encodings. Is it possible \n is being added to the file, but not \r, and you're viewing the file in an editor that doesn't recognize UNIX line endings? That shouldn't happen if your script opens the file in text mode, perhaps you're opening the file in binary mode? You want to open in text mode, 'w' or 'a', not 'wb' or 'ab'. If none of the above, I'm stumped. Sincerely, Jeffrey _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
