Line breaks in twtxt
The twtxt file format does not allow newlines in the text of the status update (or “twt”). Since users of competing technologies often use line breaks in their statuses, not having line breaks limits users’ ability to write what they want in twtxt. Therefore, I propose a backwards-compatible convention for line breaks in twtxt: when the client sees a sequence of statuses with the same timestamp in a feed, have it join their text with a newline or another line-breaking sequence as appropriate. To simplify parsing, the client should not merge statuses with the same timestamp in the anomalous situation when they do not occur in sequence.
A feed following this convention looks reasonable in a client that does not understand it as long as the client displays statues with the same timestamp in the order they appear. For example, buckket’s original implementation of twtxt renders
1845-01-29T12:00:00Z Once upon a midnight dreary, while I pondered, weak and weary, 1845-01-29T12:00:00Z Over many a quaint and curious volume of forgotten lore—
➤ http://127.0.0.1:8081/poe.txt (175 years ago): Once upon a midnight dreary, while I pondered, weak and weary, ➤ http://127.0.0.1:8081/poe.txt (175 years ago): Over many a quaint and curious volume of forgotten lore—
The convention is already implemented in the twtxt.tcl library and GUI feed reader.
Tags: file format, Internet, my work, programming, protocol.